mac80211/cfg80211: add support for userspace to handle auth frames on adhoc ifaces
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
@@ -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
@@ -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,