Skip to contentSkip to conversation

mac80211/cfg80211: add support for userspace to handle auth frames on adhoc ifaces

PATCH Superseded Will Hawkins 1 participant 1 message Jun 19, 2012 mac80211

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 mac80211/cfg80211: add support for userspace to handle auth frames on adhoc ifaces

Set the necessary flags to allow user space applications to register for authentication frames on adhoc interfaces. Also, check to make sure that "open" authentication frames are not sent when a userspace application is registered for authentication frames.

---

net/mac80211/ibss.c +0 -0
index 725cb4b..5709dcb 100644
@@ -279,7 +279,8 @@ static struct sta_info

*ieee80211_ibss_finish_sta(struct sta_info *sta,
/* If it fails, maybe we raced another insertion? */
if (sta_info_insert_rcu(sta))
return sta_info_get(sdata, addr);
- if (auth) {
+ if (auth && !cfg80211_mgmt_reg_match(sdata->dev,
+ IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH)) {
ibss_vdbg("TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=1)\n",
sdata->vif.addr, sdata->u.ibss.bssid, addr);
ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, NULL, 0,

net/mac80211/main.c +3 -1
index d81c178..4467162 100644
@@ -455,7 +455,9 @@ static const struct ieee80211_txrx_stypes
 ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
 	[NL80211_IFTYPE_ADHOC] = {
 		.tx = 0xffff,
-		.rx = BIT(IEEE80211_STYPE_ACTION >> 4),
+		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+			BIT(IEEE80211_STYPE_AUTH >> 4) |
+			BIT(IEEE80211_STYPE_DEAUTH >> 4),
 	},
 	[NL80211_IFTYPE_STATION] = {
 		.tx = 0xffff,