Commit 6b89dcb3 authored by Hante Meuleman's avatar Hante Meuleman Committed by Kalle Valo

brcmfmac: signal completion of 802.1x.

Use cfg80211 change_station to signal the completion of 802.1x
to firmware. This allows FW to take appropriate actions.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 63db1a49
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "proto.h" #include "proto.h"
#include "vendor.h" #include "vendor.h"
#include "bus.h" #include "bus.h"
#include "common.h"
#define BRCMF_SCAN_IE_LEN_MAX 2048 #define BRCMF_SCAN_IE_LEN_MAX 2048
#define BRCMF_PNO_VERSION 2 #define BRCMF_PNO_VERSION 2
...@@ -4241,6 +4242,34 @@ brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev, ...@@ -4241,6 +4242,34 @@ brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev,
return err; 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 static void
brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy, brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
...@@ -4515,6 +4544,7 @@ static struct cfg80211_ops wl_cfg80211_ops = { ...@@ -4515,6 +4544,7 @@ static struct cfg80211_ops wl_cfg80211_ops = {
.stop_ap = brcmf_cfg80211_stop_ap, .stop_ap = brcmf_cfg80211_stop_ap,
.change_beacon = brcmf_cfg80211_change_beacon, .change_beacon = brcmf_cfg80211_change_beacon,
.del_station = brcmf_cfg80211_del_station, .del_station = brcmf_cfg80211_del_station,
.change_station = brcmf_cfg80211_change_station,
.sched_scan_start = brcmf_cfg80211_sched_scan_start, .sched_scan_start = brcmf_cfg80211_sched_scan_start,
.sched_scan_stop = brcmf_cfg80211_sched_scan_stop, .sched_scan_stop = brcmf_cfg80211_sched_scan_stop,
.mgmt_frame_register = brcmf_cfg80211_mgmt_frame_register, .mgmt_frame_register = brcmf_cfg80211_mgmt_frame_register,
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include "fwil.h" #include "fwil.h"
#include "fwil_types.h" #include "fwil_types.h"
#include "tracepoint.h" #include "tracepoint.h"
#include "common.h"
const u8 ALLFFMAC[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
#define BRCMF_DEFAULT_BCN_TIMEOUT 3 #define BRCMF_DEFAULT_BCN_TIMEOUT 3
#define BRCMF_DEFAULT_SCAN_CHANNEL_TIME 40 #define BRCMF_DEFAULT_SCAN_CHANNEL_TIME 40
......
/* Copyright (c) 2014 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef BRCMFMAC_COMMON_H
#define BRCMFMAC_COMMON_H
extern const u8 ALLFFMAC[ETH_ALEN];
#endif /* BRCMFMAC_COMMON_H */
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "proto.h" #include "proto.h"
#include "flowring.h" #include "flowring.h"
#include "msgbuf.h" #include "msgbuf.h"
#include "common.h"
#define BRCMF_FLOWRING_HIGH 1024 #define BRCMF_FLOWRING_HIGH 1024
...@@ -34,9 +35,6 @@ ...@@ -34,9 +35,6 @@
#define BRCMF_FLOWRING_HASH_AP(da, fifo, ifidx) (da[5] + fifo + ifidx * 16) #define BRCMF_FLOWRING_HASH_AP(da, fifo, ifidx) (da[5] + fifo + ifidx * 16)
#define BRCMF_FLOWRING_HASH_STA(fifo, ifidx) (fifo + ifidx * 16) #define BRCMF_FLOWRING_HASH_STA(fifo, ifidx) (fifo + ifidx * 16)
static const u8 ALLZEROMAC[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
static const u8 ALLFFMAC[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
static const u8 brcmf_flowring_prio2fifo[] = { static const u8 brcmf_flowring_prio2fifo[] = {
1, 1,
0, 0,
...@@ -137,7 +135,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN], ...@@ -137,7 +135,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
hash = flow->hash; hash = flow->hash;
for (i = 0; i < BRCMF_FLOWRING_HASHSIZE; i++) { for (i = 0; i < BRCMF_FLOWRING_HASHSIZE; i++) {
if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) && if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) &&
(memcmp(hash[hash_idx].mac, ALLZEROMAC, ETH_ALEN) == 0)) { (is_zero_ether_addr(hash[hash_idx].mac))) {
found = true; found = true;
break; break;
} }
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
#define BRCMF_C_GET_CURR_RATESET 114 #define BRCMF_C_GET_CURR_RATESET 114
#define BRCMF_C_GET_AP 117 #define BRCMF_C_GET_AP 117
#define BRCMF_C_SET_AP 118 #define BRCMF_C_SET_AP 118
#define BRCMF_C_SET_SCB_AUTHORIZE 121
#define BRCMF_C_SET_SCB_DEAUTHORIZE 122
#define BRCMF_C_GET_RSSI 127 #define BRCMF_C_GET_RSSI 127
#define BRCMF_C_GET_WSEC 133 #define BRCMF_C_GET_WSEC 133
#define BRCMF_C_SET_WSEC 134 #define BRCMF_C_SET_WSEC 134
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment