diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2007-12-25 10:00:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:41 -0500 |
commit | 9ab461732a3cd8e7a7cf13cc46ed4c1ac7907824 (patch) | |
tree | cf1245a670262c56abd94d9a1163b188d2752212 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 132127e5057be70112bb974b8a3aaa0f7b14847f (diff) |
iwlwifi: A-MPDU Rx flow enabled
This patch enables the A-MPDU Rx flow. it contains several
adjustments to new mac80211 A-MPDU Rx flow.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 0f58acabb973..89e2c44bfcca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -3968,9 +3968,6 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv, | |||
3968 | .antenna = 0, | 3968 | .antenna = 0, |
3969 | .rate = iwl4965_hw_get_rate(rx_start->rate_n_flags), | 3969 | .rate = iwl4965_hw_get_rate(rx_start->rate_n_flags), |
3970 | .flag = 0, | 3970 | .flag = 0, |
3971 | #ifdef CONFIG_IWL4965_HT_AGG | ||
3972 | .ordered = 0 | ||
3973 | #endif /* CONFIG_IWL4965_HT_AGG */ | ||
3974 | }; | 3971 | }; |
3975 | u8 network_packet; | 3972 | u8 network_packet; |
3976 | 3973 | ||
@@ -4165,7 +4162,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv, | |||
4165 | break; | 4162 | break; |
4166 | 4163 | ||
4167 | case IEEE80211_FTYPE_CTL: | 4164 | case IEEE80211_FTYPE_CTL: |
4168 | #ifdef CONFIG_IWL4965_HT_AGG | 4165 | #ifdef CONFIG_IWL4965_HT |
4169 | switch (fc & IEEE80211_FCTL_STYPE) { | 4166 | switch (fc & IEEE80211_FCTL_STYPE) { |
4170 | case IEEE80211_STYPE_BACK_REQ: | 4167 | case IEEE80211_STYPE_BACK_REQ: |
4171 | IWL_DEBUG_HT("IEEE80211_STYPE_BACK_REQ arrived\n"); | 4168 | IWL_DEBUG_HT("IEEE80211_STYPE_BACK_REQ arrived\n"); |
@@ -4176,7 +4173,6 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv, | |||
4176 | break; | 4173 | break; |
4177 | } | 4174 | } |
4178 | #endif | 4175 | #endif |
4179 | |||
4180 | break; | 4176 | break; |
4181 | 4177 | ||
4182 | case IEEE80211_FTYPE_DATA: { | 4178 | case IEEE80211_FTYPE_DATA: { |
@@ -4763,8 +4759,6 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index, | |||
4763 | return; | 4759 | return; |
4764 | } | 4760 | } |
4765 | 4761 | ||
4766 | #ifdef CONFIG_IWL4965_HT_AGG | ||
4767 | |||
4768 | static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv, | 4762 | static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv, |
4769 | int sta_id, int tid, u16 ssn) | 4763 | int sta_id, int tid, u16 ssn) |
4770 | { | 4764 | { |
@@ -4796,6 +4790,36 @@ static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv, | |||
4796 | iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); | 4790 | iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC); |
4797 | } | 4791 | } |
4798 | 4792 | ||
4793 | int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | ||
4794 | enum ieee80211_ampdu_mlme_action action, | ||
4795 | const u8 *addr, u16 tid, u16 ssn) | ||
4796 | { | ||
4797 | struct iwl4965_priv *priv = hw->priv; | ||
4798 | int sta_id; | ||
4799 | DECLARE_MAC_BUF(mac); | ||
4800 | |||
4801 | IWL_DEBUG_HT("A-MPDU action on da=%s tid=%d ", | ||
4802 | print_mac(mac, addr), tid); | ||
4803 | sta_id = iwl4965_hw_find_station(priv, addr); | ||
4804 | switch (action) { | ||
4805 | case IEEE80211_AMPDU_RX_START: | ||
4806 | IWL_DEBUG_HT("start Rx\n"); | ||
4807 | iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, ssn); | ||
4808 | break; | ||
4809 | case IEEE80211_AMPDU_RX_STOP: | ||
4810 | IWL_DEBUG_HT("stop Rx\n"); | ||
4811 | iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); | ||
4812 | break; | ||
4813 | default: | ||
4814 | IWL_DEBUG_HT("unknown\n"); | ||
4815 | return -EINVAL; | ||
4816 | break; | ||
4817 | } | ||
4818 | return 0; | ||
4819 | } | ||
4820 | |||
4821 | #ifdef CONFIG_IWL4965_HT_AGG | ||
4822 | |||
4799 | static const u16 default_tid_to_tx_fifo[] = { | 4823 | static const u16 default_tid_to_tx_fifo[] = { |
4800 | IWL_TX_FIFO_AC1, | 4824 | IWL_TX_FIFO_AC1, |
4801 | IWL_TX_FIFO_AC0, | 4825 | IWL_TX_FIFO_AC0, |
@@ -4925,33 +4949,6 @@ int iwl4965_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid, | |||
4925 | return 0; | 4949 | return 0; |
4926 | } | 4950 | } |
4927 | 4951 | ||
4928 | int iwl4965_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da, | ||
4929 | u16 tid, u16 start_seq_num) | ||
4930 | { | ||
4931 | struct iwl4965_priv *priv = hw->priv; | ||
4932 | int sta_id; | ||
4933 | DECLARE_MAC_BUF(mac); | ||
4934 | |||
4935 | IWL_WARNING("iwl-AGG iwl4965_mac_ht_rx_agg_start on da=%s" | ||
4936 | " tid=%d\n", print_mac(mac, da), tid); | ||
4937 | sta_id = iwl4965_hw_find_station(priv, da); | ||
4938 | iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num); | ||
4939 | return 0; | ||
4940 | } | ||
4941 | |||
4942 | int iwl4965_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da, | ||
4943 | u16 tid, int generator) | ||
4944 | { | ||
4945 | struct iwl4965_priv *priv = hw->priv; | ||
4946 | int sta_id; | ||
4947 | DECLARE_MAC_BUF(mac); | ||
4948 | |||
4949 | IWL_WARNING("iwl-AGG iwl4965_mac_ht_rx_agg_stop on da=%s tid=%d\n", | ||
4950 | print_mac(mac, da), tid); | ||
4951 | sta_id = iwl4965_hw_find_station(priv, da); | ||
4952 | iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); | ||
4953 | return 0; | ||
4954 | } | ||
4955 | 4952 | ||
4956 | #endif /* CONFIG_IWL4965_HT_AGG */ | 4953 | #endif /* CONFIG_IWL4965_HT_AGG */ |
4957 | #endif /* CONFIG_IWL4965_HT */ | 4954 | #endif /* CONFIG_IWL4965_HT */ |