]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
iwlagn: fix interface combinations
authorJohannes Berg <johannes.berg@intel.com>
Thu, 2 Jun 2011 17:38:43 +0000 (19:38 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 2 Jun 2011 19:50:47 +0000 (15:50 -0400)
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c

index 5d2bd88101f8304cb9324badbc2653c524d3c489..6ad3376563795e047ce70c06c2923e7e82c0cff9 100644 (file)
@@ -2533,11 +2533,11 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
 
        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);