Skip to contentSkip to conversation

ath6kl: Use new del_station parameters

RFC New Jouni Malinen 1 participant 1 message Oct 10, 2014 Atheros ATH6KL wireless driver

lore
Share & tools
lore
#0 lore raw

RFC 1/1 ath6kl: Use new del_station parameters

This allows user space (mainly, hostapd or wpa_supplicant in AP mode) to specify whether to use Deauthentication or Disassociation frame and which reason code to use in that frame when removing the station.

---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

This uses the proposed del_station() changes that I just posted on linux-wireless. Once those are accepted into cfg80211, the following changes in ath6kl could be used to take the extensions into use. This is sent as an RFC since I have not had any chance of testing this yet.

drivers/net/wireless/ath/ath6kl/cfg80211.c +9 -3
index 7a53378..f787bc7 100644
@@ -2981,9 +2981,15 @@ static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
 	struct ath6kl *ar = ath6kl_priv(dev);
 	struct ath6kl_vif *vif = netdev_priv(dev);
 	const u8 *addr = params->mac ? params->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);
+	u8 cmd = WMI_AP_DEAUTH;
+	u16 reason = WLAN_REASON_PREV_AUTH_NOT_VALID;
+
+	if (params->subtype == IEEE80211_STYPE_DISASSOC >> 4)
+		cmd = WMI_AP_DISASSOC;
+	if (params->reason_code)
+		reason = params->reason_code;
+	return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, cmd, addr,
+				      reason);
 }
 
 static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
Signature · 5 lines
1.9.1


-- 
Jouni Malinen                                            PGP id EFC895FA