From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes.berg@intel.com>,
Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 001/101] iwlwifi: move iwl_clear_driver_stations to user
Date: Sun, 4 Mar 2012 11:28:15 -0800 [thread overview]
Message-ID: <1330889395-533-2-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1330889395-533-1-git-send-email-wey-yi.w.guy@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
There's only one place using this function, so
move it where it's needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 35 ++++++++++++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-agn.h | 35 --------------------------------
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e0fef9f..a7f3a70 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -738,6 +738,41 @@ int iwl_alive_start(struct iwl_priv *priv)
return iwl_power_update_mode(priv, true);
}
+/**
+ * iwl_clear_driver_stations - clear knowledge of all stations from driver
+ * @priv: iwl priv struct
+ *
+ * This is called during iwl_down() to make sure that in the case
+ * we're coming there from a hardware restart mac80211 will be
+ * able to reconfigure stations -- if we're getting there in the
+ * normal down flow then the stations will already be cleared.
+ */
+static void iwl_clear_driver_stations(struct iwl_priv *priv)
+{
+ unsigned long flags;
+ struct iwl_rxon_context *ctx;
+
+ spin_lock_irqsave(&priv->shrd->sta_lock, flags);
+ memset(priv->stations, 0, sizeof(priv->stations));
+ priv->num_stations = 0;
+
+ priv->ucode_key_table = 0;
+
+ for_each_context(priv, ctx) {
+ /*
+ * Remove all key information that is not stored as part
+ * of station information since mac80211 may not have had
+ * a chance to remove all the keys. When device is
+ * reconfigured by mac80211 after an error all keys will
+ * be reconfigured.
+ */
+ memset(ctx->wep_keys, 0, sizeof(ctx->wep_keys));
+ ctx->key_mapping_keys = 0;
+ }
+
+ spin_unlock_irqrestore(&priv->shrd->sta_lock, flags);
+}
+
void iwl_down(struct iwl_priv *priv)
{
int exit_pending;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index cb484e2..ef0cdf5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -232,41 +232,6 @@ int iwl_add_sta_callback(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
struct iwl_device_cmd *cmd);
-/**
- * iwl_clear_driver_stations - clear knowledge of all stations from driver
- * @priv: iwl priv struct
- *
- * This is called during iwl_down() to make sure that in the case
- * we're coming there from a hardware restart mac80211 will be
- * able to reconfigure stations -- if we're getting there in the
- * normal down flow then the stations will already be cleared.
- */
-static inline void iwl_clear_driver_stations(struct iwl_priv *priv)
-{
- unsigned long flags;
- struct iwl_rxon_context *ctx;
-
- spin_lock_irqsave(&priv->shrd->sta_lock, flags);
- memset(priv->stations, 0, sizeof(priv->stations));
- priv->num_stations = 0;
-
- priv->ucode_key_table = 0;
-
- for_each_context(priv, ctx) {
- /*
- * Remove all key information that is not stored as part
- * of station information since mac80211 may not have had
- * a chance to remove all the keys. When device is
- * reconfigured by mac80211 after an error all keys will
- * be reconfigured.
- */
- memset(ctx->wep_keys, 0, sizeof(ctx->wep_keys));
- ctx->key_mapping_keys = 0;
- }
-
- spin_unlock_irqrestore(&priv->shrd->sta_lock, flags);
-}
-
static inline int iwl_sta_id(struct ieee80211_sta *sta)
{
if (WARN_ON(!sta))
--
1.7.0.4
next prev parent reply other threads:[~2012-03-04 20:42 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 19:28 [PATCH 000/101] update for 3.4: iwlwifi 2012-03-04 Wey-Yi Guy
2012-03-04 19:28 ` Wey-Yi Guy [this message]
2012-03-05 1:32 ` [PATCH 001/101] iwlwifi: move iwl_clear_driver_stations to user David Miller
2012-03-05 0:37 ` Guy, Wey-Yi
2012-03-05 19:59 ` John W. Linville
2012-03-04 19:28 ` [PATCH 002/101] iwlwifi: remove an unused argument Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 003/101] iwlwifi: reduce sta_lock hold time in TX Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 004/101] iwlwifi: simplify code in iwlagn_key_sta_id Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 005/101] iwlwifi: build some station commands directly Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 006/101] iwlwifi: introduce per-queue locks Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 007/101] iwlwifi: make sta lock private & BH lock Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 008/101] iwlwifi: introduce statistics lock Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 009/101] iwlwifi: remove shared lock Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 010/101] iwlwifi: make EXIT_PENDING depend on mac80211 Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 011/101] iwlwifi: simplify auth/assoc flow Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 012/101] iwlwifi: remove per-device debug level Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 013/101] iwlwifi: remove SKU from config Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 014/101] iwlwifi: use valid TX/RX antenna from hw_params Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 015/101] iwlwifi: make config const Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 016/101] iwlwifi: reduce IDI code ifdef Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 017/101] iwlwifi: clean up (wowlan) suspend flow Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 018/101] iwlwifi: move wowlan bool into priv Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 019/101] iwlwifi: use ieee80211_tx_status Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 020/101] iwlwifi: pass response packet directly Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 021/101] iwlwifi: don't pass iwl_rx_mem_buffer to upper layers Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 022/101] iwlwifi: refactor PCI-E RX path Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 023/101] iwlwifi: transport's tx_agg_alloc must not sleep Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 024/101] iwlwifi: move queue functions to PCI-E Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 025/101] iwlwifi: iwl_rx_cmd_buffer belongs to transport API Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 026/101] iwlwifi: move tid_to_ac to PCI-E Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 027/101] iwlwifi: move IWL_MASK into file using it Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 028/101] iwlwifi: move traffic log definitions Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 029/101] iwlwifi: fix station HT parameters Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 030/101] iwlwifi: move uCode deallocation to drv Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 031/101] iwlwifi: move iwl_base_params to shared header Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 032/101] iwlwifi: move firmware request into drv Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 033/101] iwlwifi: move firmware completion wait Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 034/101] iwlwifi: move ucode loading to op_mode Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 035/101] iwlwifi: split out firmware store Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 036/101] iwlwifi: remove iwl-wifi.h Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 037/101] iwlwifi: add wrappers for command sending Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 038/101] iwlwifi: move RF/CT kill check to command wrapper Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 039/101] iwlwifi: move lockdep assertion into DVM Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 040/101] iwlwifi: move mutex out of shared Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 041/101] iwlwifi: move rfkill status handling out of transport Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 042/101] iwlwifi: rename ucode.h to fw-file.h Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 043/101] iwlwifi: remove AMT check from transport Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 044/101] iwlwifi: remove shadow_reg_enable from hw_params Wey-Yi Guy
2012-03-04 19:28 ` [PATCH 045/101] iwlwifi: move status check functions out of shared Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 046/101] iwlwifi: make tracing use device as identifier Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 047/101] iwlwifi: virtualize command queue full behaviour Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 048/101] iwlwifi: clean up iwl-core.h inclusions Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 049/101] iwlwifi: remove num_of_queues module parameter Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 050/101] iwlwifi: remove max_txq_num from hw_params Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 051/101] iwlwifi: keep plcp_delta_threshold in priv Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 052/101] iwlwifi: use watchdog timeout from hw_params Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 053/101] iwlwifi: put use_rts_for_aggregation into hw_params Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 054/101] iwlwifi: constify remaining config data Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 055/101] iwlwifi: fix notification wait bug Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 056/101] iwlwifi: abstract out notification wait support Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 057/101] iwlwifi: move ucode_owner to priv Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 058/101] iwlwifi: move all uCode load variables Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 059/101] iwlwifi: move irq to PCIe Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 060/101] iwlwifi: move packet to transport Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 061/101] iwlwifi: virtualize nic_config Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 062/101] iwlwifi: remove priv from shared Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 063/101] iwlwifi: remove PA type configuration Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 064/101] iwlwifi: don't include iwl-prph.h everywhere Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 065/101] iwlwifi: clean up iwl-commands.h Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 066/101] iwlwifi: make iwl_fill_probe_req static Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 067/101] iwlwifi: remove unused arguments from iwlagn_gain_computation Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 068/101] iwlwifi: remove unused argument from rs_initialize_lq Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 069/101] iwlwifi: move iwl_sta_id_or_broadcast to user Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 070/101] iwlwifi: remove unused argument from iwl_init_hw_rates Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 071/101] iwlwifi: remove two unused arguments in testmode Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 072/101] iwlwifi: remove unused argument from iwlagn_suspend Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 073/101] iwlwifi: redesign PASSIVE_NO_RX workaround Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 074/101] iwlwifi: transport's tx_agg_disable must be atomic Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 075/101] iwlwifi: remove BT handlers from lib_ops Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 076/101] iwlwifi: move BT/HT params to shared Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 077/101] iwlwifi: make EEPROM enhanced TX power a bool Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 078/101] iwlwifi: remove unused max_nrg_cck from sensitivity and constify Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 079/101] iwlwifi: return error if loading uCode failed Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 080/101] iwlwifi: dump stack when fail to gain access to the device Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 081/101] iwlwifi: always check if got h/w access before write Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 082/101] iwlwifi: cleanup/fix memory barriers Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 083/101] iwlwifi: use writeb,writel,readl directly Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 084/101] iwlwifi: print DMA stop timeout error only if it happened Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 085/101] iwlwifi: reintroduce iwl_enable_rfkill_int Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 086/101] iwlwifi: add testmode command for rx forwarding Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 087/101] iwlwifi: fixed testmode notifications length Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 088/101] iwlwifi: add option to test MFP Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 089/101] iwlwifi: separate status to priv and trans Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 090/101] iwlwifi: make tx_cmd_pool kmem cache global Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 091/101] iwlwifi: log stop / wake queues Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 092/101] iwlwifi: configure transport layer from dvm op mode Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 093/101] iwlwifi: move setting up fw parameters Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 094/101] iwlwifi: more status bit factoring Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 095/101] iwlwifi: move command queue number out of the iwl_shared struct Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 096/101] iwlwifi: remove messages from queue wake/stop Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 097/101] iwlwifi: make iwl_init_context static Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 098/101] iwlwifi: restore PAN support Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 099/101] iwlwifi: don't delete AP station directly Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 100/101] iwlwifi: correct status bit refactoring errors Wey-Yi Guy
2012-03-04 19:29 ` [PATCH 101/101] iwlwifi: always monitor for stuck queues Wey-Yi Guy
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=1330889395-533-2-git-send-email-wey-yi.w.guy@intel.com \
--to=wey-yi.w.guy@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).