linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Add del_station cfg80211_ops
@ 2011-12-27  9:02 Jouni Malinen
  2012-01-02 16:15 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Jouni Malinen @ 2011-12-27  9:02 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel

hostapd/wpa_supplicant AP mode uses this operation to flush the station
entries. Implement this in ath6kl to avoid unnecessary warnings from
NL80211_CMD_DEL_STATION failing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index d6806be..f74762e 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2300,6 +2300,19 @@ static int ath6kl_del_beacon(struct wiphy *wiphy, struct net_device *dev)
 	return 0;
 }
 
+static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+
+static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
+			      u8 *mac)
+{
+	struct ath6kl *ar = ath6kl_priv(dev);
+	struct ath6kl_vif *vif = netdev_priv(dev);
+	const u8 *addr = mac ? mac : bcast_addr;
+
+	return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, WMI_AP_DEAUTH,
+				      addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
+}
+
 static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
 				 u8 *mac, struct station_parameters *params)
 {
@@ -2603,6 +2616,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
 	.add_beacon = ath6kl_add_beacon,
 	.set_beacon = ath6kl_set_beacon,
 	.del_beacon = ath6kl_del_beacon,
+	.del_station = ath6kl_del_station,
 	.change_station = ath6kl_change_station,
 	.remain_on_channel = ath6kl_remain_on_channel,
 	.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
-- 
1.7.4.1


-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath6kl: Add del_station cfg80211_ops
  2011-12-27  9:02 [PATCH] ath6kl: Add del_station cfg80211_ops Jouni Malinen
@ 2012-01-02 16:15 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-01-02 16:15 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: linux-wireless, ath6kl-devel

On 12/27/2011 11:02 AM, Jouni Malinen wrote:
> hostapd/wpa_supplicant AP mode uses this operation to flush the station
> entries. Implement this in ath6kl to avoid unnecessary warnings from
> NL80211_CMD_DEL_STATION failing.
> 
> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>

Thanks, applied.

Kalle

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-02 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-27  9:02 [PATCH] ath6kl: Add del_station cfg80211_ops Jouni Malinen
2012-01-02 16:15 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).