aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-26 12:47:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:54:04 -0400
commit81ddbb5c1188dfaa98c67832a751117fcacda75d (patch)
treefe15f28483843f5daa2f14b1ee3ed29802e2d21a
parenta75e2ad772b6c26efd702f04be1f9a6414d24f22 (diff)
mac80211: don't always advertise remain-on-channel
Not all devices are really capable of implementing remain-on-channel, even if it is implemented in SW, as they can't necessarily deal with channel changes while associated. Remove the WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL and add it only if either the driver has remain_on_channel implemented in the driver/device. Also add it to all drivers that advertise P2P right now since those definitely have to have it working. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c1
-rw-r--r--drivers/net/wireless/ath/carl9170/fw.c2
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c3
-rw-r--r--drivers/net/wireless/wl12xx/main.c3
-rw-r--r--net/mac80211/main.c6
6 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index a2e939a280aa..25213d521bc2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -713,7 +713,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
713 713
714 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 714 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
715 715
716 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 716 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |
717 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
717 718
718 hw->queues = 4; 719 hw->queues = 4;
719 hw->channel_change_time = 5000; 720 hw->channel_change_time = 5000;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index fc8156eb6eba..daaa86f2463b 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -678,6 +678,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
678 678
679 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 679 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
680 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; 680 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
681 hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
681 682
682 hw->queues = 4; 683 hw->queues = 4;
683 hw->max_rates = 4; 684 hw->max_rates = 4;
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c
index cffde8d9a521..5c73c03872f3 100644
--- a/drivers/net/wireless/ath/carl9170/fw.c
+++ b/drivers/net/wireless/ath/carl9170/fw.c
@@ -355,6 +355,8 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)
355 355
356 ar->hw->wiphy->interface_modes |= if_comb_types; 356 ar->hw->wiphy->interface_modes |= if_comb_types;
357 357
358 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
359
358#undef SUPPORTED 360#undef SUPPORTED
359 return carl9170_fw_tx_sequence(ar); 361 return carl9170_fw_tx_sequence(ar);
360} 362}
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index b7ce6a6e355f..8737f4e52cbc 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1791,7 +1791,8 @@ static int __init init_mac80211_hwsim(void)
1791 IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | 1791 IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
1792 IEEE80211_HW_AMPDU_AGGREGATION; 1792 IEEE80211_HW_AMPDU_AGGREGATION;
1793 1793
1794 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; 1794 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
1795 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
1795 1796
1796 /* ask mac80211 to reserve space for magic */ 1797 /* ask mac80211 to reserve space for magic */
1797 hw->vif_data_size = sizeof(struct hwsim_vif_priv); 1798 hw->vif_data_size = sizeof(struct hwsim_vif_priv);
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index b1555fb5815b..362ff1a7067e 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -5242,7 +5242,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
5242 wl->hw->wiphy->max_sched_scan_ie_len = WL1271_CMD_TEMPL_MAX_SIZE - 5242 wl->hw->wiphy->max_sched_scan_ie_len = WL1271_CMD_TEMPL_MAX_SIZE -
5243 sizeof(struct ieee80211_header); 5243 sizeof(struct ieee80211_header);
5244 5244
5245 wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; 5245 wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD |
5246 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
5246 5247
5247 /* make sure all our channels fit in the scanned_ch bitmask */ 5248 /* make sure all our channels fit in the scanned_ch bitmask */
5248 BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + 5249 BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 16336480c631..d019f0d3a0fe 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -557,8 +557,10 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
557 WIPHY_FLAG_4ADDR_AP | 557 WIPHY_FLAG_4ADDR_AP |
558 WIPHY_FLAG_4ADDR_STATION | 558 WIPHY_FLAG_4ADDR_STATION |
559 WIPHY_FLAG_REPORTS_OBSS | 559 WIPHY_FLAG_REPORTS_OBSS |
560 WIPHY_FLAG_OFFCHAN_TX | 560 WIPHY_FLAG_OFFCHAN_TX;
561 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; 561
562 if (ops->remain_on_channel)
563 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
562 564
563 wiphy->features = NL80211_FEATURE_SK_TX_STATUS | 565 wiphy->features = NL80211_FEATURE_SK_TX_STATUS |
564 NL80211_FEATURE_HT_IBSS; 566 NL80211_FEATURE_HT_IBSS;