OSDN Git Service

iwlwifi: optimize power saving
authorDaniel Halperin <dhalperi@cs.washington.edu>
Tue, 19 Jan 2010 18:22:19 +0000 (10:22 -0800)
committerReinette Chatre <reinette.chatre@intel.com>
Fri, 29 Jan 2010 19:13:19 +0000 (11:13 -0800)
In hostap AP mode, every time the client sends the AP
a packet the STA_NOTIFY_AWAKE code is sent from mac80211.
This results in a command being sent to the uCode even if
the client was not asleep.

The following simple patch has fixed the issue for me without any
degradation that I can find.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c

index 4a26892..380d208 100644 (file)
@@ -3007,6 +3007,8 @@ static void iwl_mac_sta_notify(struct ieee80211_hw *hw,
                break;
        case STA_NOTIFY_AWAKE:
                WARN_ON(!sta_priv->client);
+               if (!sta_priv->asleep)
+                       break;
                sta_priv->asleep = false;
                sta_id = iwl_find_station(priv, sta->addr);
                if (sta_id != IWL_INVALID_STATION)