diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-11-10 12:56:38 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:26:43 -0500 |
commit | ae79d23d0b2c16998e60f49a16dae53521c76a45 (patch) | |
tree | 09af0e450cb44daa707c7ba77735453a9ac96baa /drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |
parent | 2a21ff446c07b95d08cbb830bd20112f3ee1d76e (diff) |
iwlagn: fix non-5000+ build
When building 4965 without 5000+ there were a
lot of build errors due to functions being used
that weren't even compiled in. To fix this move
some code around and only compile the HCMD code
for 5000+ series as it's not used for 4965.
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/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 35a30d2e0734..35f085ac336b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -684,7 +684,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, | |||
684 | return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); | 684 | return iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); |
685 | } | 685 | } |
686 | 686 | ||
687 | void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id) | 687 | static void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id) |
688 | { | 688 | { |
689 | unsigned long flags; | 689 | unsigned long flags; |
690 | 690 | ||
@@ -714,3 +714,33 @@ void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt) | |||
714 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 714 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
715 | 715 | ||
716 | } | 716 | } |
717 | |||
718 | void iwlagn_mac_sta_notify(struct ieee80211_hw *hw, | ||
719 | struct ieee80211_vif *vif, | ||
720 | enum sta_notify_cmd cmd, | ||
721 | struct ieee80211_sta *sta) | ||
722 | { | ||
723 | struct iwl_priv *priv = hw->priv; | ||
724 | struct iwl_station_priv *sta_priv = (void *)sta->drv_priv; | ||
725 | int sta_id; | ||
726 | |||
727 | switch (cmd) { | ||
728 | case STA_NOTIFY_SLEEP: | ||
729 | WARN_ON(!sta_priv->client); | ||
730 | sta_priv->asleep = true; | ||
731 | if (atomic_read(&sta_priv->pending_frames) > 0) | ||
732 | ieee80211_sta_block_awake(hw, sta, true); | ||
733 | break; | ||
734 | case STA_NOTIFY_AWAKE: | ||
735 | WARN_ON(!sta_priv->client); | ||
736 | if (!sta_priv->asleep) | ||
737 | break; | ||
738 | sta_priv->asleep = false; | ||
739 | sta_id = iwl_sta_id(sta); | ||
740 | if (sta_id != IWL_INVALID_STATION) | ||
741 | iwl_sta_modify_ps_wake(priv, sta_id); | ||
742 | break; | ||
743 | default: | ||
744 | break; | ||
745 | } | ||
746 | } | ||