Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291167
b: refs/heads/master
c: d316383
h: refs/heads/master
i:
  291165: 68d4fbc
  291163: 950c425
  291159: 7a30993
  291151: f7ebe3e
  291135: 524815e
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 6, 2012
1 parent a68927b commit a14c714
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9a8e8ec1e487536568adc4b3efa8f56e4391a7b
refs/heads/master: d316383dfdb51d46fb9681a68b395a5735f3f4b3
35 changes: 35 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
35 changes: 0 additions & 35 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a14c714

Please sign in to comment.