All of lore.kernel.org
 help / color / mirror / Atom feed
From: John W. Linville <linville@tuxdriver.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 2/2] ath9k: fix regression in bssidmask calculation
Date: Tue, 11 Nov 2014 16:19:21 -0500	[thread overview]
Message-ID: <20141111211921.GF6780@tuxdriver.com> (raw)
In-Reply-To: <1415143370-15173-2-git-send-email-greearb@candelatech.com>

On Tue, Nov 04, 2014 at 03:22:50PM -0800, greearb at candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> The commit that went into 3.17:
> 
>     ath9k: Summarize hw state per channel context
> 
>     Group and set hw state (opmode, primary_sta, beacon conf) per
>     channel context instead of whole list of vifs. This would allow
>     each channel context to run in different mode (STA/AP).
> 
>     Signed-off-by: Felix Fietkau <nbd@openwrt.org>
>     Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
>     Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> broke multi-vif configuration due to not properly calculating
> the bssid mask.
> 
> The test case that caught this was:
> 
>  create wlan0 and sta0-4 (6 total), not sure how much that matters.
>  associate all 6 (works fine)
>  disconnect 5 of them, leaving sta0 up
>  Start trying to bring up the other 5 one at a time.  It will
>  fail, with iw events looking like this (in these logs, several
>  sta are trying to come up, but symptom is the same with just one)
> 
> The patch causing the regression made quite a few changes, but
> the part I think caused this particular problem was not
> recalculating the bssid mask when adding and removing interfaces.
> 
> Re-adding those calls fixes my test case.  Fix bad comment
> as well.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> 
> This needs to be reviewed by ath9k driver folks that added
> the original patch, at least.

Any word from the ath9k posse?

> And, should be considered for 3.17 stable if fix is accepted upstream.
> 
>  drivers/net/wireless/ath/ath9k/main.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index fbf23ac..d2ad9e95 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -947,9 +947,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc,
>  	struct ath_vif *avp;
>  
>  	/*
> -	 * Pick the MAC address of the first interface as the new hardware
> -	 * MAC address. The hardware will use it together with the BSSID mask
> -	 * when matching addresses.
> +	 * The hardware will use primary station addr together with the
> +	 * BSSID mask when matching addresses.
>  	 */
>  	memset(iter_data, 0, sizeof(*iter_data));
>  	memset(&iter_data->mask, 0xff, ETH_ALEN);
> @@ -1169,6 +1168,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
>  		list_add_tail(&avp->list, &avp->chanctx->vifs);
>  	}
>  
> +	ath9k_calculate_summary_state(sc, avp->chanctx);
> +
>  	ath9k_assign_hw_queues(hw, vif);
>  
>  	an->sc = sc;
> @@ -1238,6 +1239,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
>  
>  	ath_tx_node_cleanup(sc, &avp->mcast_node);
>  
> +	ath9k_calculate_summary_state(sc, avp->chanctx);
> +
>  	mutex_unlock(&sc->mutex);
>  }
>  
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.

WARNING: multiple messages have this Message-ID (diff)
From: "John W. Linville" <linville@tuxdriver.com>
To: greearb@candelatech.com
Cc: ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org,
	rmanohar@qti.qualcomm.com, nbd@openwrt.org
Subject: Re: [PATCH 2/2] ath9k:  fix regression in bssidmask calculation
Date: Tue, 11 Nov 2014 16:19:21 -0500	[thread overview]
Message-ID: <20141111211921.GF6780@tuxdriver.com> (raw)
In-Reply-To: <1415143370-15173-2-git-send-email-greearb@candelatech.com>

On Tue, Nov 04, 2014 at 03:22:50PM -0800, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> The commit that went into 3.17:
> 
>     ath9k: Summarize hw state per channel context
> 
>     Group and set hw state (opmode, primary_sta, beacon conf) per
>     channel context instead of whole list of vifs. This would allow
>     each channel context to run in different mode (STA/AP).
> 
>     Signed-off-by: Felix Fietkau <nbd@openwrt.org>
>     Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
>     Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> broke multi-vif configuration due to not properly calculating
> the bssid mask.
> 
> The test case that caught this was:
> 
>  create wlan0 and sta0-4 (6 total), not sure how much that matters.
>  associate all 6 (works fine)
>  disconnect 5 of them, leaving sta0 up
>  Start trying to bring up the other 5 one at a time.  It will
>  fail, with iw events looking like this (in these logs, several
>  sta are trying to come up, but symptom is the same with just one)
> 
> The patch causing the regression made quite a few changes, but
> the part I think caused this particular problem was not
> recalculating the bssid mask when adding and removing interfaces.
> 
> Re-adding those calls fixes my test case.  Fix bad comment
> as well.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> 
> This needs to be reviewed by ath9k driver folks that added
> the original patch, at least.

Any word from the ath9k posse?

> And, should be considered for 3.17 stable if fix is accepted upstream.
> 
>  drivers/net/wireless/ath/ath9k/main.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index fbf23ac..d2ad9e95 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -947,9 +947,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc,
>  	struct ath_vif *avp;
>  
>  	/*
> -	 * Pick the MAC address of the first interface as the new hardware
> -	 * MAC address. The hardware will use it together with the BSSID mask
> -	 * when matching addresses.
> +	 * The hardware will use primary station addr together with the
> +	 * BSSID mask when matching addresses.
>  	 */
>  	memset(iter_data, 0, sizeof(*iter_data));
>  	memset(&iter_data->mask, 0xff, ETH_ALEN);
> @@ -1169,6 +1168,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
>  		list_add_tail(&avp->list, &avp->chanctx->vifs);
>  	}
>  
> +	ath9k_calculate_summary_state(sc, avp->chanctx);
> +
>  	ath9k_assign_hw_queues(hw, vif);
>  
>  	an->sc = sc;
> @@ -1238,6 +1239,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
>  
>  	ath_tx_node_cleanup(sc, &avp->mcast_node);
>  
> +	ath9k_calculate_summary_state(sc, avp->chanctx);
> +
>  	mutex_unlock(&sc->mutex);
>  }
>  
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2014-11-11 21:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 23:22 [ath9k-devel] [PATCH 1/2] ath9k: fix misc debugfs when not using chan context greearb at candelatech.com
2014-11-04 23:22 ` greearb
2014-11-04 23:22 ` [ath9k-devel] [PATCH 2/2] ath9k: fix regression in bssidmask calculation greearb at candelatech.com
2014-11-04 23:22   ` greearb
2014-11-11 21:19   ` John W. Linville [this message]
2014-11-11 21:19     ` John W. Linville
2014-11-12  7:39     ` [ath9k-devel] " Sujith Manoharan
2014-11-12  7:39       ` Sujith Manoharan

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=20141111211921.GF6780@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.