Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: linville@tuxdriver.com, yi.zhu@intel.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/1] mac80211: call bss_info_change only once upon disassociation
Date: Thu, 03 Jul 2008 00:33:40 +0200	[thread overview]
Message-ID: <1215038020.13270.13.camel@johannes.berg> (raw)
In-Reply-To: <1215037633-27975-1-git-send-email-tomas.winkler@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3482 bytes --]

On Thu, 2008-07-03 at 01:27 +0300, Tomas Winkler wrote:
> This patch removes call of ieee80211_bss_info_change_notify from within
> ieee80211_reset_erp_info. This allows gathering all bss info changes
> into one call to the driver in the disassociation flow.

Seems sane to me.

> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
>  net/mac80211/ieee80211_i.h |    2 +-
>  net/mac80211/main.c        |   12 ++++++------
>  net/mac80211/mlme.c        |    2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 775d5e8..c916c2f 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -892,7 +892,7 @@ int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason);
>  int ieee80211_sta_disassociate(struct net_device *dev, u16 reason);
>  void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
>  				      u32 changed);
> -void ieee80211_reset_erp_info(struct net_device *dev);
> +u32 ieee80211_reset_erp_info(struct net_device *dev);
>  int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,
>  				   struct ieee80211_ht_info *ht_info);
>  int ieee80211_ht_addt_info_ie_to_ht_bss_info(
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index 074f71a..cc756e9 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev)
>  {
>  	struct ieee80211_sub_if_data *sdata, *nsdata;
>  	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> +	struct sta_info *sta;
>  	struct ieee80211_if_init_conf conf;
> +	u32 changed = 0;
>  	int res;
>  	bool need_hw_reconfig = 0;
> -	struct sta_info *sta;
>  
>  	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>  
> @@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev)
>  			goto err_stop;
>  
>  		ieee80211_if_config(dev);
> -		ieee80211_reset_erp_info(dev);
> +		changed |= ieee80211_reset_erp_info(dev);
> +		ieee80211_bss_info_change_notify(sdata, changed);
>  		ieee80211_enable_keys(sdata);
>  
>  		if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
> @@ -1190,15 +1192,13 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
>  					     changed);
>  }
>  
> -void ieee80211_reset_erp_info(struct net_device *dev)
> +u32 ieee80211_reset_erp_info(struct net_device *dev)
>  {
>  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>  
>  	sdata->bss_conf.use_cts_prot = 0;
>  	sdata->bss_conf.use_short_preamble = 0;
> -	ieee80211_bss_info_change_notify(sdata,
> -					 BSS_CHANGED_ERP_CTS_PROT |
> -					 BSS_CHANGED_ERP_PREAMBLE);
> +	return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE;
>  }
>  
>  void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 2a92708..37ea04f 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -573,7 +573,7 @@ static void ieee80211_set_associated(struct net_device *dev,
>  		ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid);
>  		ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
>  		netif_carrier_off(dev);
> -		ieee80211_reset_erp_info(dev);
> +		changed |= ieee80211_reset_erp_info(dev);
>  
>  		sdata->bss_conf.assoc_ht = 0;
>  		sdata->bss_conf.ht_conf = NULL;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2008-07-02 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 22:27 [PATCH 1/1] mac80211: call bss_info_change only once upon disassociation Tomas Winkler
2008-07-02 22:33 ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1215038020.13270.13.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomas.winkler@intel.com \
    --cc=yi.zhu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox