Skip to contentSkip to conversation

mac80211: allow self-protected frame tx without sta

PATCH In review Thomas Pedersen 2 participants 3 messages Jun 21, 2013 – Jun 24, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mac80211: allow self-protected frame tx without sta

Useful for userspace mesh to authenticate and peer without a station entry, since both steps may fail anyway.

---
 net/mac80211/cfg.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/cfg.c +2 -1
index 18ba7ed..d6f9823 100644
@@ -2821,7 +2821,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 		    !rcu_access_pointer(sdata->bss->beacon))
 			need_offchan = true;
 		if (!ieee80211_is_action(mgmt->frame_control) ||
-		    mgmt->u.action.category == WLAN_CATEGORY_PUBLIC)
+		    mgmt->u.action.category == WLAN_CATEGORY_PUBLIC ||
+		    mgmt->u.action.category == WLAN_CATEGORY_SELF_PROTECTED)
 			break;
 		rcu_read_lock();
 		sta = sta_info_get(sdata, mgmt->da);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 mac80211: initialize power mode for mesh STAs

Previously the default mesh STA nonpeer power mode was UNKNOWN (0) make the default mesh STA power mode ACTIVE, to prevent unnecessary frame buffering while peering is not yet complete. Fixes a panic in ath9k_htc when adding stations from userspace, and mcast buffered frames are later released.

Thanks to Bob Copeland for his help debugging this.

---
 net/mac80211/sta_info.c |    1 +
 1 file changed, 1 insertion(+)
net/mac80211/sta_info.c +1 -0
index aaf68d2..aeb967a 100644
@@ -347,6 +347,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
 	if (ieee80211_vif_is_mesh(&sdata->vif) &&
 	    !sdata->u.mesh.user_mpm)
 		init_timer(&sta->plink_timer);
+	sta->nonpeer_pm = NL80211_MESH_POWER_ACTIVE;
 #endif
 
 	memcpy(sta->sta.addr, addr, ETH_ALEN);
Signature · 1 line
1.7.10.4
maintainer
#2 lore raw
In reply to Thomas Pedersen
Quoted 2 lines · Thomas Pedersen

Useful for userspace mesh to authenticate and peer without a station entry, since both steps may fail anyway.

Both patches applied.

johannes