diff options
| author | Avinash Patil <patila@marvell.com> | 2014-12-05 12:53:42 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2014-12-05 14:15:25 -0500 |
| commit | fc99dd0829fd4d080b78141ade9a79bcc3dcd160 (patch) | |
| tree | 5210e90d67e3b9de583201e67a82ebe97692a124 | |
| parent | c11fb9857f8c7951e30509c5af72ada8e121be8b (diff) | |
mwifiex: do not process broadcast mac address for del_sta
Generally broadcast mac address deauth is followed by stop_ap or start_ap.
In both cases, FW already has provision to send deauth; so there is no
need to handle broadcast mac deauthentication.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
| -rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index e111ff51cbc1..4a66a6555366 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
| @@ -1296,31 +1296,30 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, | |||
| 1296 | { | 1296 | { |
| 1297 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | 1297 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
| 1298 | struct mwifiex_sta_node *sta_node; | 1298 | struct mwifiex_sta_node *sta_node; |
| 1299 | u8 deauth_mac[ETH_ALEN]; | ||
| 1299 | unsigned long flags; | 1300 | unsigned long flags; |
| 1300 | 1301 | ||
| 1301 | if (list_empty(&priv->sta_list) || !priv->bss_started) | 1302 | if (list_empty(&priv->sta_list) || !priv->bss_started) |
| 1302 | return 0; | 1303 | return 0; |
| 1303 | 1304 | ||
| 1304 | if (!params->mac || is_broadcast_ether_addr(params->mac)) { | 1305 | if (!params->mac || is_broadcast_ether_addr(params->mac)) |
| 1305 | wiphy_dbg(wiphy, "%s: NULL/broadcast mac address\n", __func__); | 1306 | return 0; |
| 1306 | list_for_each_entry(sta_node, &priv->sta_list, list) { | 1307 | |
| 1307 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH, | 1308 | wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__, params->mac); |
| 1308 | HostCmd_ACT_GEN_SET, 0, | 1309 | |
| 1309 | sta_node->mac_addr, true)) | 1310 | memset(deauth_mac, 0, ETH_ALEN); |
| 1310 | return -1; | 1311 | |
| 1311 | } | 1312 | spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
| 1312 | } else { | 1313 | sta_node = mwifiex_get_sta_entry(priv, params->mac); |
| 1313 | wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__, | 1314 | if (sta_node) |
| 1314 | params->mac); | 1315 | ether_addr_copy(deauth_mac, params->mac); |
| 1315 | spin_lock_irqsave(&priv->sta_list_spinlock, flags); | 1316 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
| 1316 | sta_node = mwifiex_get_sta_entry(priv, params->mac); | 1317 | |
| 1317 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); | 1318 | if (is_valid_ether_addr(deauth_mac)) { |
| 1318 | if (sta_node) { | 1319 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH, |
| 1319 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH, | 1320 | HostCmd_ACT_GEN_SET, 0, |
| 1320 | HostCmd_ACT_GEN_SET, 0, | 1321 | deauth_mac, true)) |
| 1321 | sta_node->mac_addr, true)) | 1322 | return -1; |
| 1322 | return -1; | ||
| 1323 | } | ||
| 1324 | } | 1323 | } |
| 1325 | 1324 | ||
| 1326 | return 0; | 1325 | return 0; |
