aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-12 04:55:53 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-18 03:01:52 -0400
commitb292219fa5061e2657ecf518b48426913d0ddae6 (patch)
tree5e08aeaca0c5793c92febcb84ea581e54dcd6124
parent46856bbf0f0412c12e9674df68822cb531d49327 (diff)
wireless: use OR operation to set wiphy features
The next patch will introduce a flag that is set by default in cfg80211 so drivers and mac80211 need to use |= to set features they have so that they don't clear the already-set feature. We could set the flag in wiphy_register() instead of wiphy_new() to avoid this patch, but then the drivers couldn't *unset* flags they don't want to use even though the implementation is generic. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c2
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c4
-rw-r--r--net/mac80211/main.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 7089f8160ad5..99a75d92c6cf 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3651,7 +3651,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3651 3651
3652 if (test_bit(ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT, 3652 if (test_bit(ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT,
3653 ar->fw_capabilities)) 3653 ar->fw_capabilities))
3654 ar->wiphy->features = NL80211_FEATURE_INACTIVITY_TIMER; 3654 ar->wiphy->features |= NL80211_FEATURE_INACTIVITY_TIMER;
3655 3655
3656 ar->wiphy->probe_resp_offload = 3656 ar->wiphy->probe_resp_offload =
3657 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | 3657 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 0679458a1bac..38a58713de6a 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -2250,8 +2250,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
2250 wiphy->available_antennas_tx = BIT(adapter->number_of_antenna) - 1; 2250 wiphy->available_antennas_tx = BIT(adapter->number_of_antenna) - 1;
2251 wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1; 2251 wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1;
2252 2252
2253 wiphy->features = NL80211_FEATURE_HT_IBSS | 2253 wiphy->features |= NL80211_FEATURE_HT_IBSS |
2254 NL80211_FEATURE_INACTIVITY_TIMER; 2254 NL80211_FEATURE_INACTIVITY_TIMER;
2255 2255
2256 /* Reserve space for mwifiex specific private data for BSS */ 2256 /* Reserve space for mwifiex specific private data for BSS */
2257 wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv); 2257 wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 620f427069c8..931f14f3281f 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -598,9 +598,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
598 if (ops->remain_on_channel) 598 if (ops->remain_on_channel)
599 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; 599 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
600 600
601 wiphy->features = NL80211_FEATURE_SK_TX_STATUS | 601 wiphy->features |= NL80211_FEATURE_SK_TX_STATUS |
602 NL80211_FEATURE_SAE | 602 NL80211_FEATURE_SAE |
603 NL80211_FEATURE_HT_IBSS; 603 NL80211_FEATURE_HT_IBSS;
604 604
605 if (!ops->set_key) 605 if (!ops->set_key)
606 wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 606 wiphy->flags |= WIPHY_FLAG_IBSS_RSN;