aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:35:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:25 -0400
commit5083e56326208f9a1d4e597529912004968c77d7 (patch)
tree66dea49a256741a33b4fda5cecb0bfcf5850c5b6 /drivers/net/wireless/iwlwifi
parentfe7a90c2b73f0c1da0882861cd015c835ed28781 (diff)
iwlwifi: move iwl_sta_modify_enable_tid_tx to iwl-sta.c
This patch moves iwl_sta_modify_enable_tid_tx into iwl-sta.c. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c20
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.h1
3 files changed, 23 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 1d95e8c65276..b719d19361ac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -44,6 +44,7 @@
44#include "iwl-io.h" 44#include "iwl-io.h"
45#include "iwl-helpers.h" 45#include "iwl-helpers.h"
46#include "iwl-calib.h" 46#include "iwl-calib.h"
47#include "iwl-sta.h"
47 48
48/* module parameters */ 49/* module parameters */
49static struct iwl_mod_params iwl4965_mod_params = { 50static struct iwl_mod_params iwl4965_mod_params = {
@@ -2900,24 +2901,6 @@ static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv,
2900#ifdef CONFIG_IWL4965_HT 2901#ifdef CONFIG_IWL4965_HT
2901 2902
2902/** 2903/**
2903 * iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table
2904 */
2905static void iwl4965_sta_modify_enable_tid_tx(struct iwl_priv *priv,
2906 int sta_id, int tid)
2907{
2908 unsigned long flags;
2909
2910 /* Remove "disable" flag, to enable Tx for this TID */
2911 spin_lock_irqsave(&priv->sta_lock, flags);
2912 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_TID_DISABLE_TX;
2913 priv->stations[sta_id].sta.tid_disable_tx &= cpu_to_le16(~(1 << tid));
2914 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
2915 spin_unlock_irqrestore(&priv->sta_lock, flags);
2916
2917 iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
2918}
2919
2920/**
2921 * iwl4965_tx_status_reply_compressed_ba - Update tx status from block-ack 2904 * iwl4965_tx_status_reply_compressed_ba - Update tx status from block-ack
2922 * 2905 *
2923 * Go through block-ack's bitmap of ACK'd frames, update driver's record of 2906 * Go through block-ack's bitmap of ACK'd frames, update driver's record of
@@ -3193,7 +3176,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,
3193 ra_tid = BUILD_RAxTID(sta_id, tid); 3176 ra_tid = BUILD_RAxTID(sta_id, tid);
3194 3177
3195 /* Modify device's station table to Tx this TID */ 3178 /* Modify device's station table to Tx this TID */
3196 iwl4965_sta_modify_enable_tid_tx(priv, sta_id, tid); 3179 iwl_sta_modify_enable_tid_tx(priv, sta_id, tid);
3197 3180
3198 spin_lock_irqsave(&priv->lock, flags); 3181 spin_lock_irqsave(&priv->lock, flags);
3199 rc = iwl_grab_nic_access(priv); 3182 rc = iwl_grab_nic_access(priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index ed07566f22ee..983f10760fb0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -921,3 +921,23 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
921} 921}
922EXPORT_SYMBOL(iwl_get_sta_id); 922EXPORT_SYMBOL(iwl_get_sta_id);
923 923
924
925/**
926 * iwl_sta_modify_enable_tid_tx - Enable Tx for this TID in station table
927 */
928void iwl_sta_modify_enable_tid_tx(struct iwl_priv *priv, int sta_id, int tid)
929{
930 unsigned long flags;
931
932 /* Remove "disable" flag, to enable Tx for this TID */
933 spin_lock_irqsave(&priv->sta_lock, flags);
934 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_TID_DISABLE_TX;
935 priv->stations[sta_id].sta.tid_disable_tx &= cpu_to_le16(~(1 << tid));
936 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
937 spin_unlock_irqrestore(&priv->sta_lock, flags);
938
939 iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
940}
941EXPORT_SYMBOL(iwl_sta_modify_enable_tid_tx);
942
943
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h
index 500e1df9c0ef..3d55716f5301 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.h
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.h
@@ -45,4 +45,5 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
45int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap); 45int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap);
46u8 iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap); 46u8 iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap);
47int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr); 47int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr);
48void iwl_sta_modify_enable_tid_tx(struct iwl_priv *priv, int sta_id, int tid);
48#endif /* __iwl_sta_h__ */ 49#endif /* __iwl_sta_h__ */