From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Ron Rindjunsky <ron.rindjunsky@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>,
Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 12/33] iwlwifi: move rx aggregation functions to iwl-rx.c
Date: Mon, 30 Jun 2008 17:23:12 +0800 [thread overview]
Message-ID: <1214817813-17639-13-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1214817813-17639-12-git-send-email-yi.zhu@intel.com>
From: Ron Rindjunsky <ron.rindjunsky@intel.com>
This patch moves Rx aggregation functions into iwl-rx.c
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 47 +-----------------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 2 +
drivers/net/wireless/iwlwifi/iwl-rx.c | 43 ++++++++++++++++++++++++++++
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 57a853d..311b37c 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,
return 0;
}
-static int iwl4965_rx_agg_start(struct iwl_priv *priv,
- const u8 *addr, int tid, u16 ssn)
-{
- unsigned long flags;
- int sta_id;
-
- sta_id = iwl_find_station(priv, addr);
- if (sta_id == IWL_INVALID_STATION)
- return -ENXIO;
-
- spin_lock_irqsave(&priv->sta_lock, flags);
- priv->stations[sta_id].sta.station_flags_msk = 0;
- priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_ADDBA_TID_MSK;
- priv->stations[sta_id].sta.add_immediate_ba_tid = (u8)tid;
- priv->stations[sta_id].sta.add_immediate_ba_ssn = cpu_to_le16(ssn);
- priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
- spin_unlock_irqrestore(&priv->sta_lock, flags);
-
- return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
- CMD_ASYNC);
-}
-
-static int iwl4965_rx_agg_stop(struct iwl_priv *priv,
- const u8 *addr, int tid)
-{
- unsigned long flags;
- int sta_id;
-
- sta_id = iwl_find_station(priv, addr);
- if (sta_id == IWL_INVALID_STATION)
- return -ENXIO;
-
- spin_lock_irqsave(&priv->sta_lock, flags);
- priv->stations[sta_id].sta.station_flags_msk = 0;
- priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_DELBA_TID_MSK;
- priv->stations[sta_id].sta.remove_immediate_ba_tid = (u8)tid;
- priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
- spin_unlock_irqrestore(&priv->sta_lock, flags);
-
- return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
- CMD_ASYNC);
-}
-
int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
enum ieee80211_ampdu_mlme_action action,
const u8 *addr, u16 tid, u16 *ssn)
@@ -2130,10 +2087,10 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
switch (action) {
case IEEE80211_AMPDU_RX_START:
IWL_DEBUG_HT("start Rx\n");
- return iwl4965_rx_agg_start(priv, addr, tid, *ssn);
+ return iwl_rx_agg_start(priv, addr, tid, *ssn);
case IEEE80211_AMPDU_RX_STOP:
IWL_DEBUG_HT("stop Rx\n");
- return iwl4965_rx_agg_stop(priv, addr, tid);
+ return iwl_rx_agg_stop(priv, addr, tid);
case IEEE80211_AMPDU_TX_START:
IWL_DEBUG_HT("start Tx\n");
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 06c272c..7814a48 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,
void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
void iwl_rx_replenish(struct iwl_priv *priv);
int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
+int iwl_rx_agg_start(struct iwl_priv *priv, const u8 *addr, int tid, u16 ssn);
+int iwl_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid);
/* FIXME: remove when TX is moved to iwl core */
int iwl_rx_queue_restock(struct iwl_priv *priv);
int 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 9c346cc..bfe1ad2 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,
}
EXPORT_SYMBOL(iwl_rx_missed_beacon_notif);
+int iwl_rx_agg_start(struct iwl_priv *priv, const u8 *addr, int tid, u16 ssn)
+{
+ unsigned long flags;
+ int sta_id;
+
+ sta_id = iwl_find_station(priv, addr);
+ if (sta_id == IWL_INVALID_STATION)
+ return -ENXIO;
+
+ spin_lock_irqsave(&priv->sta_lock, flags);
+ priv->stations[sta_id].sta.station_flags_msk = 0;
+ priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_ADDBA_TID_MSK;
+ priv->stations[sta_id].sta.add_immediate_ba_tid = (u8)tid;
+ priv->stations[sta_id].sta.add_immediate_ba_ssn = cpu_to_le16(ssn);
+ priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
+ spin_unlock_irqrestore(&priv->sta_lock, flags);
+
+ return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
+ CMD_ASYNC);
+}
+EXPORT_SYMBOL(iwl_rx_agg_start);
+
+int iwl_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid)
+{
+ unsigned long flags;
+ int sta_id;
+
+ sta_id = iwl_find_station(priv, addr);
+ if (sta_id == IWL_INVALID_STATION)
+ return -ENXIO;
+
+ spin_lock_irqsave(&priv->sta_lock, flags);
+ priv->stations[sta_id].sta.station_flags_msk = 0;
+ priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_DELBA_TID_MSK;
+ priv->stations[sta_id].sta.remove_immediate_ba_tid = (u8)tid;
+ priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
+ spin_unlock_irqrestore(&priv->sta_lock, flags);
+
+ return iwl_send_add_sta(priv, &priv->stations[sta_id].sta,
+ CMD_ASYNC);
+}
+EXPORT_SYMBOL(iwl_rx_agg_stop);
+
/* Calculate noise level, based on measurements during network silence just
* before arriving beacon. This measurement can be done only if we know
--
1.5.3.6
next prev parent reply other threads:[~2008-06-30 9:27 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 9:23 [PATCH 00/33] iwlwifi driver 06/30 updates Zhu Yi
2008-06-30 9:23 ` [PATCH 01/33] iwlwifi: configure uCode to use open loop tx power algorithm Zhu Yi
2008-06-30 9:23 ` [PATCH 02/33] iwlwifi: Add eeprom version to the version file in sysfs Zhu Yi
2008-06-30 9:23 ` [PATCH 03/33] iwlwifi: better station table maintenance Zhu Yi
2008-06-30 9:23 ` [PATCH 04/33] iwlwifi: use iwl_is_associated when possible Zhu Yi
2008-06-30 9:23 ` [PATCH 05/33] iwlwifi: add REPLY_TX_POWER_DBM_CMD to get_cmd_string Zhu Yi
2008-06-30 9:23 ` [PATCH 06/33] iwlwifi: send ADD_STA before RXON with assoc bit Zhu Yi
2008-06-30 9:23 ` [PATCH 07/33] iwlwifi: move RX stats to core, and move temperature to handler Zhu Yi
2008-06-30 9:23 ` [PATCH 08/33] iwlwifi: don't send REPLY_REMOVE_ALL_STA upon exit Zhu Yi
2008-06-30 9:23 ` [PATCH 09/33] iwlwifi: move RX handlers to iwl-rx.c Zhu Yi
2008-06-30 9:23 ` [PATCH 10/33] iwlwifi: remove useless network and duplicate checking Zhu Yi
2008-06-30 9:23 ` [PATCH 11/33] iwlwifi: setup compressed BA handler Zhu Yi
2008-06-30 9:23 ` Zhu Yi [this message]
2008-06-30 9:23 ` [PATCH 13/33] iwlwifi: remove obsolete lq_ready use Zhu Yi
2008-06-30 9:23 ` [PATCH 14/33] iwlwifi: fix IBSS association flow Zhu Yi
2008-06-30 9:23 ` [PATCH 15/33] iwlwifi: keep the STATUS_EXIT_PENDING flag till the end of down flow Zhu Yi
2008-06-30 9:23 ` [PATCH 16/33] mac80211: add beacon timestamp to beacon template in IBSS Zhu Yi
2008-06-30 9:23 ` [PATCH 17/33] iwlwifi: adjust TSF " Zhu Yi
2008-06-30 9:23 ` [PATCH 18/33] iwlwifi : Patch adds rfkill subsystem for 3945 Zhu Yi
2008-06-30 9:23 ` [PATCH 19/33] iwlwifi: don't bring up interface if RF-kill avoids radio Zhu Yi
2008-06-30 9:23 ` [PATCH 20/33] iwlwifi: unite common settings of HW params Zhu Yi
2008-06-30 9:23 ` [PATCH 21/33] iwlwifi: control 11n capabilities through module param Zhu Yi
2008-06-30 9:23 ` [PATCH 22/33] iwlwifi: Remove unnecessary code Zhu Yi
2008-06-30 9:23 ` [PATCH 23/33] iwlwifi: eliminate iwl4965_mac_get_tsf Zhu Yi
2008-06-30 9:23 ` [PATCH 24/33] iwlwifi: blocking mac_start until uCode is complete Zhu Yi
2008-06-30 9:23 ` [PATCH 25/33] iwlwifi: clean up HW RF-kill state machine and restarts Zhu Yi
2008-06-30 9:23 ` [PATCH 26/33] iwlwifi: fix 4965 uCode load Zhu Yi
2008-06-30 9:23 ` [PATCH 27/33] iwlwifi: fix incorrect 5GHz rates reported in monitor mode Zhu Yi
2008-06-30 9:23 ` [PATCH 28/33] iwlwifi: fix incorrect monitor mode operation Zhu Yi
2008-06-30 9:23 ` [PATCH 29/33] iwlwifi: drop skb silently for Tx request in monitor mode Zhu Yi
2008-06-30 9:23 ` [PATCH 30/33] iwlwifi: enable packet injection for iwl3945 Zhu Yi
2008-06-30 9:23 ` [PATCH 31/33] iwlwifi: fix iwl4965 temperature callback calibration issue Zhu Yi
2008-06-30 9:23 ` [PATCH 32/33] iwl3945: remove RFKILL_STATE_HARD_BLOCKED warnings Zhu Yi
2008-06-30 9:23 ` [PATCH 33/33] iwlwifi: remove the input device from rfkill_mngr Zhu Yi
2008-06-30 10:07 ` [PATCH 30/33] iwlwifi: enable packet injection for iwl3945 Stefanik Gábor
2008-06-30 10:22 ` [PATCH 29/33] iwlwifi: drop skb silently for Tx request in monitor mode Stefanik Gábor
2008-06-30 10:26 ` Michael Buesch
2008-06-30 10:28 ` Stefanik Gábor
2008-07-02 1:07 ` Zhu Yi
2008-06-30 9:56 ` [PATCH 00/33] iwlwifi driver 06/30 updates drago01
2008-07-02 3:05 ` Zhu Yi
2008-07-02 8:39 ` drago01
2008-07-02 8:41 ` Zhu Yi
2008-07-02 8:51 ` drago01
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214817813-17639-13-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.