Return-path: Received: from mail-vk0-f50.google.com ([209.85.213.50]:33748 "EHLO mail-vk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965077AbbLHPjP (ORCPT ); Tue, 8 Dec 2015 10:39:15 -0500 Received: by vkca188 with SMTP id a188so16506792vkc.0 for ; Tue, 08 Dec 2015 07:39:14 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1449583479-26658-7-git-send-email-emmanuel.grumbach@intel.com> References: <1449583479-26658-1-git-send-email-emmanuel.grumbach@intel.com> <1449583479-26658-7-git-send-email-emmanuel.grumbach@intel.com> From: Krishna Chaitanya Date: Tue, 8 Dec 2015 21:08:55 +0530 Message-ID: (sfid-20151208_163919_565040_F09BEA4A) Subject: Re: [PATCH 6/9] mac80211: handle width changes from opmode notification IE in beacon To: Emmanuel Grumbach Cc: Johannes Berg , linux-wireless , Eyal Shapira , Eyal Shapira Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, Dec 8, 2015 at 7:34 PM, Emmanuel Grumbach wrote: > > From: Eyal Shapira > > An AP can send an operating channel width change in a beacon > opmode notification IE as long as there's a change in the nss as > well (See 802.11ac-2013 section 10.41). > So don't limit updating to nss only from an opmode notification IE. > > Signed-off-by: Eyal Shapira > Signed-off-by: Emmanuel Grumbach > --- > net/mac80211/cfg.c | 3 +-- > net/mac80211/ieee80211_i.h | 4 ++-- > net/mac80211/mlme.c | 2 +- > net/mac80211/rx.c | 3 +-- > net/mac80211/vht.c | 10 +++------- > 5 files changed, 8 insertions(+), 14 deletions(-) > > diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c > index b9e2c2f..a90d875 100644 > --- a/net/mac80211/cfg.c > +++ b/net/mac80211/cfg.c > @@ -1198,8 +1198,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, > * rc isn't initialized here yet, so ignore it > */ > __ieee80211_vht_handle_opmode(sdata, sta, > - params->opmode_notif, > - band, false); > + params->opmode_notif, band); > } > > if (ieee80211_vif_is_mesh(&sdata->vif)) > diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h > index 582ea86..747402d 100644 > --- a/net/mac80211/ieee80211_i.h > +++ b/net/mac80211/ieee80211_i.h > @@ -1718,10 +1718,10 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata, > struct ieee80211_mgmt *mgmt); > u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, > struct sta_info *sta, u8 opmode, > - enum ieee80211_band band, bool nss_only); > + enum ieee80211_band band); > void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, > struct sta_info *sta, u8 opmode, > - enum ieee80211_band band, bool nss_only); > + enum ieee80211_band band); > void ieee80211_apply_vhtcap_overrides(struct ieee80211_sub_if_data *sdata, > struct ieee80211_sta_vht_cap *vht_cap); > void ieee80211_get_vht_mask_from_cap(__le16 vht_cap, > diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c > index 1e6b337..62c8e4f 100644 > --- a/net/mac80211/mlme.c > +++ b/net/mac80211/mlme.c > @@ -3584,7 +3584,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, > > if (sta && elems.opmode_notif) > ieee80211_vht_handle_opmode(sdata, sta, *elems.opmode_notif, > - rx_status->band, true); > + rx_status->band); > mutex_unlock(&local->sta_mtx); > > changed |= ieee80211_handle_pwr_constr(sdata, chan, mgmt, > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c > index 901c72b..fe675d7 100644 > --- a/net/mac80211/rx.c > +++ b/net/mac80211/rx.c > @@ -2738,8 +2738,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) > opmode = mgmt->u.action.u.vht_opmode_notif.operating_mode; > > ieee80211_vht_handle_opmode(rx->sdata, rx->sta, > - opmode, status->band, > - false); > + opmode, status->band); > goto handled; > } > case WLAN_VHT_ACTION_GROUPID_MGMT: { > diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c > index d2f2ff6..a02525a 100644 > --- a/net/mac80211/vht.c > +++ b/net/mac80211/vht.c > @@ -399,7 +399,7 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta) > > u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, > struct sta_info *sta, u8 opmode, > - enum ieee80211_band band, bool nss_only) > + enum ieee80211_band band) > { > struct ieee80211_local *local = sdata->local; > struct ieee80211_supported_band *sband; > @@ -422,9 +422,6 @@ u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, > changed |= IEEE80211_RC_NSS_CHANGED; > } > > - if (nss_only) > - return changed; > - > switch (opmode & IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK) { > case IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ: > sta->cur_max_bandwidth = IEEE80211_STA_RX_BW_20; > @@ -473,13 +470,12 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata, > > void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, > struct sta_info *sta, u8 opmode, > - enum ieee80211_band band, bool nss_only) > + enum ieee80211_band band) > { > struct ieee80211_local *local = sdata->local; > struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; > > - u32 changed = __ieee80211_vht_handle_opmode(sdata, sta, opmode, > - band, nss_only); > + u32 changed = __ieee80211_vht_handle_opmode(sdata, sta, opmode, band); > > if (changed > 0) > rate_control_rate_update(local, sband, sta, changed); Not related to current change. I was looking at this code a while ago and found that rate_control_rate_update doesn't update the rates from rx_nss, rather it updates from HT/VHT capabilities. So how does the NSS update from OP MODE IE work? (BW part is handled in minstrel from sta->bandwidth)