This patch set is addressing some issues found in the current 802.11s implementation,
specifically when using hostap mpm.
It's aligning the beacon format and handling some corner cases.
Maital Hahn (2):
mac80211: mesh: flush stations before beacons are stopped
mac80211/cfg: mesh: fix healing time when a mesh peer is disconnecting
Meirav Kama (2):
mac80211: mesh: fixed HT ies in beacon template
mac80211: sta_info: max_peers reached falsely
net/mac80211/cfg.c | 1 +
net/mac80211/mesh.c | 46 ++++++++++++++++++++++++++++++++++++++++------
net/mac80211/mesh_hwmp.c | 42 +++++++++++++++++++++++++-----------------
net/mac80211/sta_info.c | 14 ++++++++++++++
net/mac80211/util.c | 3 ---
net/wireless/mesh.c | 2 +-
6 files changed, 81 insertions(+), 27 deletions(-)
--
2.9.0
From: Maital Hahn <redacted>
Some drivers (e.g. wl18xx) expect that the last stage in the
de-initialization process will be stopping the beacons, similar to ap.
Update ieee80211_stop_mesh() flow accordingly.
Signed-off-by: Maital Hahn <redacted>
Acked-by: Yaniv Machani <redacted>
---
net/mac80211/mesh.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
@@ -896,20 +896,22 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)netif_carrier_off(sdata->dev);+/* flush STAs and mpaths on this iface */+sta_info_flush(sdata);+mesh_path_flush_by_iface(sdata);+/* stop the beacon */ifmsh->mesh_id_len=0;sdata->vif.bss_conf.enable_beacon=false;clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED,&sdata->state);ieee80211_bss_info_change_notify(sdata,BSS_CHANGED_BEACON_ENABLED);++/* remove beacon */bcn=rcu_dereference_protected(ifmsh->beacon,lockdep_is_held(&sdata->wdev.mtx));RCU_INIT_POINTER(ifmsh->beacon,NULL);kfree_rcu(bcn,rcu_head);-/* flush STAs and mpaths on this iface */-sta_info_flush(sdata);-mesh_path_flush_by_iface(sdata);-/* free all potentially still buffered group-addressed frames */local->total_ps_buffered-=skb_queue_len(&ifmsh->ps.bc_buf);skb_queue_purge(&ifmsh->ps.bc_buf);
From: Maital Hahn <redacted>
Once receiving a CLOSE action frame from the disconnecting peer,
flush all entries in the path table which has this peer as the
next hop.
In addition, upon receiving a packet, if next hop is not found,
trigger PERQ immidiatly, instead of just putting it in the queue.
Signed-off-by: Maital Hahn <redacted>
Acked-by: Yaniv Machani <redacted>
---
net/mac80211/cfg.c | 1 +
net/mac80211/mesh.c | 3 ++-
net/mac80211/mesh_hwmp.c | 42 +++++++++++++++++++++++++-----------------
3 files changed, 28 insertions(+), 18 deletions(-)
@@ -159,7 +159,8 @@ void mesh_sta_cleanup(struct sta_info *sta)if(!sdata->u.mesh.user_mpm){changed|=mesh_plink_deactivate(sta);del_timer_sync(&sta->mesh->plink_timer);-}+}else+mesh_path_flush_by_nexthop(sta);/* make sure no readers can access nexthop sta from here on */mesh_path_flush_by_nexthop(sta);
@@ -964,18 +965,24 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)++ifmsh->preq_queue_len;spin_unlock_bh(&ifmsh->mesh_preq_queue_lock);-if(time_after(jiffies,ifmsh->last_preq+min_preq_int_jiff(sdata)))+if(immediate){ieee80211_queue_work(&sdata->local->hw,&sdata->work);+}else{+if(time_after(jiffies,+ifmsh->last_preq+min_preq_int_jiff(sdata))){+ieee80211_queue_work(&sdata->local->hw,&sdata->work);-elseif(time_before(jiffies,ifmsh->last_preq)){-/* avoid long wait if did not send preqs for a long time-*andjiffieswrappedaround-*/-ifmsh->last_preq=jiffies-min_preq_int_jiff(sdata)-1;-ieee80211_queue_work(&sdata->local->hw,&sdata->work);-}else-mod_timer(&ifmsh->mesh_path_timer,ifmsh->last_preq+-min_preq_int_jiff(sdata));+}elseif(time_before(jiffies,ifmsh->last_preq)){+/* avoid long wait if did not send preqs for a long time+*andjiffieswrappedaround+*/+ifmsh->last_preq=jiffies-+min_preq_int_jiff(sdata)-1;+ieee80211_queue_work(&sdata->local->hw,&sdata->work);+}else+mod_timer(&ifmsh->mesh_path_timer,ifmsh->last_preq++min_preq_int_jiff(sdata));+}}/**
@@ -1110,7 +1117,7 @@ int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata,}if(!(mpath->flags&MESH_PATH_RESOLVING))-mesh_queue_preq(mpath,PREQ_Q_F_START);+mesh_queue_preq(mpath,PREQ_Q_F_START,true);if(skb_queue_len(&mpath->frame_queue)>=MESH_FRAME_QUEUE_LEN)skb_to_free=skb_dequeue(&mpath->frame_queue);
@@ -1157,8 +1164,9 @@ int mesh_nexthop_lookup(struct ieee80211_sub_if_data *sdata,msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time))&ðer_addr_equal(sdata->vif.addr,hdr->addr4)&&!(mpath->flags&MESH_PATH_RESOLVING)&&-!(mpath->flags&MESH_PATH_FIXED))-mesh_queue_preq(mpath,PREQ_Q_F_START|PREQ_Q_F_REFRESH);+!(mpath->flags&MESH_PATH_FIXED)){+mesh_queue_preq(mpath,PREQ_Q_F_START|PREQ_Q_F_REFRESH,false);+}next_hop=rcu_dereference(mpath->next_hop);if(next_hop){
@@ -1192,7 +1200,7 @@ void mesh_path_timer(unsigned long data)mpath->discovery_timeout*=2;mpath->flags&=~MESH_PATH_REQ_QUEUED;spin_unlock_bh(&mpath->state_lock);-mesh_queue_preq(mpath,0);+mesh_queue_preq(mpath,0,false);}else{mpath->flags&=~(MESH_PATH_RESOLVING|MESH_PATH_RESOLVED|
From: Meirav Kama <redacted>
There are several values in HT info elements of mesh beacon (built by the
mac80211) that are incorrect.
To fix them:
1. mac80211 will check configuration from cfg and will build accordingly.
2. changes made in mesh default values.
Signed-off-by: Meirav Kama <redacted>
Acked-by: Yaniv Machani <redacted>
---
net/mac80211/mesh.c | 33 ++++++++++++++++++++++++++++++++-
net/mac80211/util.c | 3 ---
net/wireless/mesh.c | 2 +-
3 files changed, 33 insertions(+), 5 deletions(-)
@@ -2349,10 +2349,7 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,ht_oper->operation_mode=cpu_to_le16(prot_mode);ht_oper->stbc_param=0x0000;-/* It seems that Basic MCS set and Supported MCS set-areidenticalforthefirst10bytes*/memset(&ht_oper->basic_set,0,16);-memcpy(&ht_oper->basic_set,&ht_cap->mcs,10);returnpos+sizeof(structieee80211_ht_operation);}
From: Meirav Kama <redacted>
Issue happened when receiving delete_sta command without
changing plink_state from ESTAB to HOLDING before.
When receiving delete_sta command for mesh interface
verify plink_state is not ESTAB and if so, decrease
plink count and update beacon.
Signed-off-by: Meirav Kama <redacted>
Acked-by: Yaniv Machani <redacted>
---
net/mac80211/sta_info.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
From: Bob Copeland <me@bobcopeland.com> Date: 2016-06-28 12:28:06
On Tue, Jun 28, 2016 at 02:13:05PM +0300, Yaniv Machani wrote:
From: Maital Hahn <redacted>
Once receiving a CLOSE action frame from the disconnecting peer,
flush all entries in the path table which has this peer as the
next hop.
Please address the user-visible behavior in your commit messages.
Does it crash? Does it send frames to an invalid peer? Do
frames get dropped?
In addition, upon receiving a packet, if next hop is not found,
trigger PERQ immidiatly, instead of just putting it in the queue.
"PREQ"
Please split this into a separate patch that we can review
separately (and also give the "why" in the commit log).
This isn't necessary, caller should already be doing
mesh_path_flush_by_nexthop() in every case I could see. Besides it
cannot be done under plink lock.
And this is already fixed in mac80211-next.
--
Bob Copeland %% http://bobcopeland.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Bob Copeland <me@bobcopeland.com> Date: 2016-06-28 12:56:37
On Tue, Jun 28, 2016 at 02:13:07PM +0300, Yaniv Machani wrote:
From: Meirav Kama <redacted>
Issue happened when receiving delete_sta command without
changing plink_state from ESTAB to HOLDING before.
When receiving delete_sta command for mesh interface
verify plink_state is not ESTAB and if so, decrease
plink count and update beacon.
This should be fixed already (and properly) by the patch
"mac80211: Fix mesh estab links counting" -- please let us
know if you have a case that's still broken with that fix.
--
Bob Copeland %% http://bobcopeland.com/
On Tue, Jun 28, 2016 at 15:56:21, Bob Copeland wrote:
linux- wireless@vger.kernel.org; netdev@vger.kernel.org; Kama, Meirav
Subject: Re: [PATCH 4/4] mac80211: sta_info: max_peers reached falsely
On Tue, Jun 28, 2016 at 02:13:07PM +0300, Yaniv Machani wrote:
quoted
From: Meirav Kama <redacted>
Issue happened when receiving delete_sta command without changing
plink_state from ESTAB to HOLDING before.
When receiving delete_sta command for mesh interface verify
plink_state is not ESTAB and if so, decrease plink count and update
beacon.
This should be fixed already (and properly) by the patch
"mac80211: Fix mesh estab links counting" -- please let us know if you
have a case that's still broken with that fix.
On Tue, Jun 28, 2016 at 15:27:47, Bob Copeland wrote:
linux- wireless@vger.kernel.org; netdev@vger.kernel.org; Hahn, Maital
Subject: Re: [PATCH 2/4] mac80211/cfg: mesh: fix healing time when a
mesh peer is disconnecting
On Tue, Jun 28, 2016 at 02:13:05PM +0300, Yaniv Machani wrote:
quoted
From: Maital Hahn <redacted>
Once receiving a CLOSE action frame from the disconnecting peer,
flush all entries in the path table which has this peer as the next hop.
Please address the user-visible behavior in your commit messages.
Does it crash? Does it send frames to an invalid peer? Do frames get dropped?
Hi Bob,
It was a crash, apparently already fixed by your patches some time ago.
I'll remove that part and resend the 2nd part (with some more 'why', and less typos..)
quoted
In addition, upon receiving a packet, if next hop is not found,
trigger PERQ immidiatly, instead of just putting it in the queue.
"PREQ"
Please split this into a separate patch that we can review separately
(and also give the "why" in the commit log).
This isn't necessary, caller should already be doing
mesh_path_flush_by_nexthop() in every case I could see. Besides it
cannot be done under plink lock.
I believe this was fixed in your patch "mac80211: mesh: flush paths outside of plink lock"
There is probably no need in that on the latest as well.
Thanks,
Yaniv
Hi Yaniv,
On Tue, Jun 28, 2016 at 9:13 PM, Yaniv Machani [off-list ref] wrote:
This patch set is addressing some issues found in the current 802.11s implementation,
specifically when using hostap mpm.
It's aligning the beacon format and handling some corner cases.
Maital Hahn (2):
mac80211: mesh: flush stations before beacons are stopped
mac80211/cfg: mesh: fix healing time when a mesh peer is disconnecting
Meirav Kama (2):
mac80211: mesh: fixed HT ies in beacon template
mac80211: sta_info: max_peers reached falsely
Patches that you send must be signed off by you, not ack'd by you.
I.e.
From: Random Developer <redacted>
.....
Signed-off-by: Random Developer <redacted>
Signed-off-by: Patch Sender <redacted>
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/