diff mbox

iwlagn: fix interface combinations

Message ID 1307036323.3738.3.camel@jlt3.sipsolutions.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Johannes Berg June 2, 2011, 5:38 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

My patch to advertise interface combinations
worked by pure luck in the P2P case, but all
other cases are broken. This is due to a dumb
mistake in the code that checks what should
be advertised, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Alternatively, this fixes it. Sorry.

 drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




--
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

Comments

John W. Linville June 2, 2011, 7:49 p.m. UTC | #1
On Thu, Jun 02, 2011 at 07:38:43PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> My patch to advertise interface combinations
> worked by pure luck in the P2P case, but all
> other cases are broken. This is due to a dumb
> mistake in the code that checks what should
> be advertised, fix that.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I swear, I thought I had taken it out of my queue.  I'm getting old... :-(

> ---
> Alternatively, this fixes it. Sorry.

I'd rather just apply this -- any objections?

> 
>  drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:36:58.000000000 +0200
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:37:09.000000000 +0200
> @@ -2533,11 +2533,11 @@ static int iwl_mac_setup_register(struct
>  
>  	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
>  
> -	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
> +	if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT)) {
>  		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
>  		hw->wiphy->n_iface_combinations =
>  			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
> -	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
> +	} else if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
>  		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
>  		hw->wiphy->n_iface_combinations =
>  			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);
> 
> 
> 
>
Guy, Wey-Yi W June 2, 2011, 7:56 p.m. UTC | #2
On Thu, 2011-06-02 at 12:49 -0700, John W. Linville wrote:
> On Thu, Jun 02, 2011 at 07:38:43PM +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > My patch to advertise interface combinations
> > worked by pure luck in the P2P case, but all
> > other cases are broken. This is due to a dumb
> > mistake in the code that checks what should
> > be advertised, fix that.
> > 
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> 
> I swear, I thought I had taken it out of my queue.  I'm getting old... :-(
> 
> > ---
> > Alternatively, this fixes it. Sorry.
> 
> I'd rather just apply this -- any objections?

It works, thanks
My mistake to push and ask revert at the first place, sorry :-(

Wey



--
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
diff mbox

Patch

--- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:36:58.000000000 +0200
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:37:09.000000000 +0200
@@ -2533,11 +2533,11 @@  static int iwl_mac_setup_register(struct
 
 	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
 
-	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
+	if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT)) {
 		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
 		hw->wiphy->n_iface_combinations =
 			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
-	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
+	} else if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
 		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
 		hw->wiphy->n_iface_combinations =
 			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);