aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c47
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c43
3 files changed, 47 insertions, 45 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 57a853d22115..311b37c383c0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2074,49 +2074,6 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id,
2074 return 0; 2074 return 0;
2075} 2075}
2076 2076
2077static int iwl4965_rx_agg_start(struct iwl_priv *priv,
2078 const u8 *addr, int tid, u16 ssn)
2079{
2080 unsigned long flags;
2081 int sta_id;
2082
2083 sta_id = iwl_find_station(priv, addr);
2084 if (sta_id == IWL_INVALID_STATION)
2085 return -ENXIO;
2086
2087 spin_lock_irqsave(&priv->sta_lock, flags);
2088 priv->stations[sta_id].sta.station_flags_msk = 0;
2089 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_ADDBA_TID_MSK;
2090 priv->stations[sta_id].sta.add_immediate_ba_tid = (u8)tid;
2091 priv->stations[sta_id].sta.add_immediate_ba_ssn = cpu_to_le16(ssn);
2092 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
2093 spin_unlock_irqrestore(&priv->sta_lock, flags);
2094
2095 return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
2096 CMD_ASYNC);
2097}
2098
2099static int iwl4965_rx_agg_stop(struct iwl_priv *priv,
2100 const u8 *addr, int tid)
2101{
2102 unsigned long flags;
2103 int sta_id;
2104
2105 sta_id = iwl_find_station(priv, addr);
2106 if (sta_id == IWL_INVALID_STATION)
2107 return -ENXIO;
2108
2109 spin_lock_irqsave(&priv->sta_lock, flags);
2110 priv->stations[sta_id].sta.station_flags_msk = 0;
2111 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_DELBA_TID_MSK;
2112 priv->stations[sta_id].sta.remove_immediate_ba_tid = (u8)tid;
2113 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
2114 spin_unlock_irqrestore(&priv->sta_lock, flags);
2115
2116 return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
2117 CMD_ASYNC);
2118}
2119
2120int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, 2077int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
2121 enum ieee80211_ampdu_mlme_action action, 2078 enum ieee80211_ampdu_mlme_action action,
2122 const u8 *addr, u16 tid, u16 *ssn) 2079 const u8 *addr, u16 tid, u16 *ssn)
@@ -2130,10 +2087,10 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
2130 switch (action) { 2087 switch (action) {
2131 case IEEE80211_AMPDU_RX_START: 2088 case IEEE80211_AMPDU_RX_START:
2132 IWL_DEBUG_HT("start Rx\n"); 2089 IWL_DEBUG_HT("start Rx\n");
2133 return iwl4965_rx_agg_start(priv, addr, tid, *ssn); 2090 return iwl_rx_agg_start(priv, addr, tid, *ssn);
2134 case IEEE80211_AMPDU_RX_STOP: 2091 case IEEE80211_AMPDU_RX_STOP:
2135 IWL_DEBUG_HT("stop Rx\n"); 2092 IWL_DEBUG_HT("stop Rx\n");
2136 return iwl4965_rx_agg_stop(priv, addr, tid); 2093 return iwl_rx_agg_stop(priv, addr, tid);
2137 case IEEE80211_AMPDU_TX_START: 2094 case IEEE80211_AMPDU_TX_START:
2138 IWL_DEBUG_HT("start Tx\n"); 2095 IWL_DEBUG_HT("start Tx\n");
2139 return iwl_tx_agg_start(priv, addr, tid, ssn); 2096 return iwl_tx_agg_start(priv, addr, tid, ssn);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 06c272cee97d..7814a48ccd0b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -211,6 +211,8 @@ int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
211void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq); 211void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
212void iwl_rx_replenish(struct iwl_priv *priv); 212void iwl_rx_replenish(struct iwl_priv *priv);
213int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq); 213int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
214int iwl_rx_agg_start(struct iwl_priv *priv, const u8 *addr, int tid, u16 ssn);
215int iwl_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid);
214/* FIXME: remove when TX is moved to iwl core */ 216/* FIXME: remove when TX is moved to iwl core */
215int iwl_rx_queue_restock(struct iwl_priv *priv); 217int iwl_rx_queue_restock(struct iwl_priv *priv);
216int iwl_rx_queue_space(const struct iwl_rx_queue *q); 218int iwl_rx_queue_space(const struct iwl_rx_queue *q);
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 9c346cc9476c..bfe1ad262484 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -468,6 +468,49 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
468} 468}
469EXPORT_SYMBOL(iwl_rx_missed_beacon_notif); 469EXPORT_SYMBOL(iwl_rx_missed_beacon_notif);
470 470
471int iwl_rx_agg_start(struct iwl_priv *priv, const u8 *addr, int tid, u16 ssn)
472{
473 unsigned long flags;
474 int sta_id;
475
476 sta_id = iwl_find_station(priv, addr);
477 if (sta_id == IWL_INVALID_STATION)
478 return -ENXIO;
479
480 spin_lock_irqsave(&priv->sta_lock, flags);
481 priv->stations[sta_id].sta.station_flags_msk = 0;
482 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_ADDBA_TID_MSK;
483 priv->stations[sta_id].sta.add_immediate_ba_tid = (u8)tid;
484 priv->stations[sta_id].sta.add_immediate_ba_ssn = cpu_to_le16(ssn);
485 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
486 spin_unlock_irqrestore(&priv->sta_lock, flags);
487
488 return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
489 CMD_ASYNC);
490}
491EXPORT_SYMBOL(iwl_rx_agg_start);
492
493int iwl_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid)
494{
495 unsigned long flags;
496 int sta_id;
497
498 sta_id = iwl_find_station(priv, addr);
499 if (sta_id == IWL_INVALID_STATION)
500 return -ENXIO;
501
502 spin_lock_irqsave(&priv->sta_lock, flags);
503 priv->stations[sta_id].sta.station_flags_msk = 0;
504 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_DELBA_TID_MSK;
505 priv->stations[sta_id].sta.remove_immediate_ba_tid = (u8)tid;
506 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
507 spin_unlock_irqrestore(&priv->sta_lock, flags);
508
509 return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
510 CMD_ASYNC);
511}
512EXPORT_SYMBOL(iwl_rx_agg_stop);
513
471 514
472/* Calculate noise level, based on measurements during network silence just 515/* Calculate noise level, based on measurements during network silence just
473 * before arriving beacon. This measurement can be done only if we know 516 * before arriving beacon. This measurement can be done only if we know