|
@@ -38,6 +38,7 @@
|
|
|
#include "proto.h"
|
|
|
#include "vendor.h"
|
|
|
#include "bus.h"
|
|
|
+#include "common.h"
|
|
|
|
|
|
#define BRCMF_SCAN_IE_LEN_MAX 2048
|
|
|
#define BRCMF_PNO_VERSION 2
|
|
@@ -4241,6 +4242,34 @@ brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+static int
|
|
|
+brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
|
|
|
+ const u8 *mac, struct station_parameters *params)
|
|
|
+{
|
|
|
+ struct brcmf_if *ifp = netdev_priv(ndev);
|
|
|
+ s32 err;
|
|
|
+
|
|
|
+ brcmf_dbg(TRACE, "Enter, MAC %pM, mask 0x%04x set 0x%04x\n", mac,
|
|
|
+ params->sta_flags_mask, params->sta_flags_set);
|
|
|
+
|
|
|
+ /* Ignore all 00 MAC */
|
|
|
+ if (is_zero_ether_addr(mac))
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ if (!(params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)))
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))
|
|
|
+ err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_AUTHORIZE,
|
|
|
+ (void *)mac, ETH_ALEN);
|
|
|
+ else
|
|
|
+ err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE,
|
|
|
+ (void *)mac, ETH_ALEN);
|
|
|
+ if (err < 0)
|
|
|
+ brcmf_err("Setting SCB (de-)authorize failed, %d\n", err);
|
|
|
+
|
|
|
+ return err;
|
|
|
+}
|
|
|
|
|
|
static void
|
|
|
brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
|
|
@@ -4515,6 +4544,7 @@ static struct cfg80211_ops wl_cfg80211_ops = {
|
|
|
.stop_ap = brcmf_cfg80211_stop_ap,
|
|
|
.change_beacon = brcmf_cfg80211_change_beacon,
|
|
|
.del_station = brcmf_cfg80211_del_station,
|
|
|
+ .change_station = brcmf_cfg80211_change_station,
|
|
|
.sched_scan_start = brcmf_cfg80211_sched_scan_start,
|
|
|
.sched_scan_stop = brcmf_cfg80211_sched_scan_stop,
|
|
|
.mgmt_frame_register = brcmf_cfg80211_mgmt_frame_register,
|