|
@@ -203,3 +203,68 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
|
|
|
|
|
return flags;
|
|
|
}
|
|
|
+
|
|
|
+QDF_STATUS wlan_son_peer_set_kickout_allow(struct wlan_objmgr_vdev *vdev,
|
|
|
+ struct wlan_objmgr_peer *peer,
|
|
|
+ bool kickout_allow)
|
|
|
+{
|
|
|
+ struct peer_mlme_priv_obj *peer_priv;
|
|
|
+
|
|
|
+ if (!peer) {
|
|
|
+ qdf_err("invalid peer");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+ if (!vdev) {
|
|
|
+ qdf_err("invalid vdev");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ peer_priv = wlan_objmgr_peer_get_comp_private_obj(peer,
|
|
|
+ WLAN_UMAC_COMP_MLME);
|
|
|
+ if (!peer_priv) {
|
|
|
+ qdf_err("invalid vdev");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ peer_priv->allow_kickout = kickout_allow;
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev,
|
|
|
+ uint8_t *macaddr)
|
|
|
+{
|
|
|
+ bool kickout_allow = true;
|
|
|
+ struct wlan_objmgr_peer *peer;
|
|
|
+ struct wlan_objmgr_psoc *psoc;
|
|
|
+ struct peer_mlme_priv_obj *peer_priv;
|
|
|
+
|
|
|
+ if (!vdev) {
|
|
|
+ qdf_err("invalid vdev");
|
|
|
+ return kickout_allow;
|
|
|
+ }
|
|
|
+ psoc = wlan_vdev_get_psoc(vdev);
|
|
|
+ if (!psoc) {
|
|
|
+ qdf_err("invalid psoc");
|
|
|
+ return kickout_allow;
|
|
|
+ }
|
|
|
+ peer = wlan_objmgr_get_peer_by_mac(psoc, macaddr,
|
|
|
+ WLAN_SON_ID);
|
|
|
+
|
|
|
+ if (!peer) {
|
|
|
+ qdf_err("peer is null");
|
|
|
+ return kickout_allow;
|
|
|
+ }
|
|
|
+
|
|
|
+ peer_priv = wlan_objmgr_peer_get_comp_private_obj(peer,
|
|
|
+ WLAN_UMAC_COMP_MLME);
|
|
|
+ if (!peer_priv) {
|
|
|
+ qdf_err("invalid vdev");
|
|
|
+ wlan_objmgr_peer_release_ref(peer, WLAN_SON_ID);
|
|
|
+ return kickout_allow;
|
|
|
+ }
|
|
|
+ kickout_allow = peer_priv->allow_kickout;
|
|
|
+ wlan_objmgr_peer_release_ref(peer, WLAN_SON_ID);
|
|
|
+
|
|
|
+ return kickout_allow;
|
|
|
+}
|