From f4eabc918c3b88763bc20dd9e2b248aa6c757005 Mon Sep 17 00:00:00 2001 From: Chun-Yeow Yeoh Date: Thu, 13 Dec 2012 18:59:57 +0800 Subject: [PATCH] mac80211: use short slot time in mesh for 5GHz Use short slot time in 5GHz for mesh. The performance is increased from 16.4Mbps to 23.4Mbps for two directly connected mesh STAs operating in legacy rate using iperf measurement. Almost similar to the results claimed in IBSS mode. Signed-off-by: Chun-Yeow Yeoh [call ieee80211_get_sdata_band() only once] Signed-off-by: Johannes Berg --- net/mac80211/mesh.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 649ad513547f..8565c00cb644 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -607,6 +607,12 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_local *local = sdata->local; + u32 changed = BSS_CHANGED_BEACON | + BSS_CHANGED_BEACON_ENABLED | + BSS_CHANGED_HT | + BSS_CHANGED_BASIC_RATES | + BSS_CHANGED_BEACON_INT; + enum ieee80211_band band = ieee80211_get_sdata_band(sdata); local->fif_other_bss++; /* mesh ifaces must set allmulti to forward mcast traffic */ @@ -626,13 +632,14 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) ifmsh->mshcfg.ht_opmode; sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; sdata->vif.bss_conf.basic_rates = - ieee80211_mandatory_rates(sdata->local, - ieee80211_get_sdata_band(sdata)); - ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | - BSS_CHANGED_BEACON_ENABLED | - BSS_CHANGED_HT | - BSS_CHANGED_BASIC_RATES | - BSS_CHANGED_BEACON_INT); + ieee80211_mandatory_rates(local, band); + + if (band == IEEE80211_BAND_5GHZ) { + sdata->vif.bss_conf.use_short_slot = true; + changed |= BSS_CHANGED_ERP_SLOT; + } + + ieee80211_bss_info_change_notify(sdata, changed); netif_carrier_on(sdata->dev); } -- 2.20.1