aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-10-10 10:26:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-14 14:48:09 -0400
commit3bde2b68cfdeb3b68284172fa7759287a63cd981 (patch)
treea93a6cc0a34e469b55428d36258653f92566fd0f /drivers/net
parent7e4005cc4ae49100582ee1c97368dd79474f0a82 (diff)
iwlagn: update beacon smarter
Updating the beacon every time right after one was transmitted is pointless, most of the time we might not even have to update it. We will update it every time it changes, which includes from set_tim(), a callback iwlwifi didn't implement so far. This also reduces latency for clients, previously we would update the beacon right after the previous one was transmitted, and then a TIM change would only take effect after that again -- updating the beacon right after the TIM changes makes the TIM change go out to the air faster. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c2
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 3af49ae62979..30a4ba677042 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3074,6 +3074,16 @@ static void iwl_mac_rssi_callback(struct ieee80211_hw *hw,
3074 mutex_unlock(&priv->shrd->mutex); 3074 mutex_unlock(&priv->shrd->mutex);
3075} 3075}
3076 3076
3077static int iwl_mac_set_tim(struct ieee80211_hw *hw,
3078 struct ieee80211_sta *sta, bool set)
3079{
3080 struct iwl_priv *priv = hw->priv;
3081
3082 queue_work(priv->shrd->workqueue, &priv->beacon_update);
3083
3084 return 0;
3085}
3086
3077struct ieee80211_ops iwlagn_hw_ops = { 3087struct ieee80211_ops iwlagn_hw_ops = {
3078 .tx = iwlagn_mac_tx, 3088 .tx = iwlagn_mac_tx,
3079 .start = iwlagn_mac_start, 3089 .start = iwlagn_mac_start,
@@ -3107,6 +3117,7 @@ struct ieee80211_ops iwlagn_hw_ops = {
3107 CFG80211_TESTMODE_DUMP(iwl_testmode_dump) 3117 CFG80211_TESTMODE_DUMP(iwl_testmode_dump)
3108 .tx_sync = iwl_mac_tx_sync, 3118 .tx_sync = iwl_mac_tx_sync,
3109 .finish_tx_sync = iwl_mac_finish_tx_sync, 3119 .finish_tx_sync = iwl_mac_finish_tx_sync,
3120 .set_tim = iwl_mac_set_tim,
3110}; 3121};
3111 3122
3112static u32 iwl_hw_detect(struct iwl_priv *priv) 3123static u32 iwl_hw_detect(struct iwl_priv *priv)
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index bbd674061d2e..1d781bc60663 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -243,8 +243,6 @@ static int iwl_rx_beacon_notif(struct iwl_priv *priv,
243 243
244 priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status); 244 priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status);
245 245
246 if (!test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
247 queue_work(priv->shrd->workqueue, &priv->beacon_update);
248 return 0; 246 return 0;
249} 247}
250 248