Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102937
b: refs/heads/master
c: c46fbef
h: refs/heads/master
i:
  102935: 93e7479
v: v3
  • Loading branch information
Assaf Krauss authored and John W. Linville committed Jun 14, 2008
1 parent cfeb0bc commit a6e189a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 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: f3d5b45b40c42b0b55710667740cc545b6e17c10
refs/heads/master: c46fbefa32c3c314884d3d3be27d0e1839de2c24
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv);
#define STATUS_POWER_PMI 16
#define STATUS_FW_ERROR 17
#define STATUS_CONF_PENDING 18
#define STATUS_MODE_PENDING 19


static inline int iwl_is_ready(struct iwl_priv *priv)
Expand Down
30 changes: 19 additions & 11 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2900,6 +2900,10 @@ static void iwl_alive_start(struct iwl_priv *priv)

iwlcore_low_level_notify(priv, IWLCORE_START_EVT);
ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);

if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
iwl4965_set_mode(priv, priv->iw_mode);

return;

restart:
Expand Down Expand Up @@ -3189,16 +3193,20 @@ static void iwl4965_bg_set_monitor(struct work_struct *work)
{
struct iwl_priv *priv = container_of(work,
struct iwl_priv, set_monitor);
int ret;

IWL_DEBUG(IWL_DL_STATE, "setting monitor mode\n");

mutex_lock(&priv->mutex);

if (!iwl_is_ready(priv))
IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
else
if (iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0)
IWL_ERROR("iwl4965_set_mode() failed\n");
ret = iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR);

if (ret) {
if (ret == -EAGAIN)
IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
else
IWL_ERROR("iwl4965_set_mode() failed ret = %d\n", ret);
}

mutex_unlock(&priv->mutex);
}
Expand Down Expand Up @@ -3575,10 +3583,9 @@ static void iwl4965_post_associate(struct iwl_priv *priv)

case IEEE80211_IF_TYPE_IBSS:

/* clear out the station table */
iwlcore_clear_stations_table(priv);
/* assume default assoc id */
priv->assoc_id = 1;

iwl_rxon_add_station(priv, iwl_bcast_addr, 0);
iwl_rxon_add_station(priv, priv->bssid, 0);
iwl4965_rate_scale_init(priv->hw, IWL_STA_ID);
iwl4965_send_beacon_cmd(priv);
Expand Down Expand Up @@ -3826,8 +3833,9 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN);
}

if (iwl_is_ready(priv))
iwl4965_set_mode(priv, conf->type);
if (iwl4965_set_mode(priv, conf->type) == -EAGAIN)
/* we are not ready, will run again when ready */
set_bit(STATUS_MODE_PENDING, &priv->status);

mutex_unlock(&priv->mutex);

Expand Down Expand Up @@ -4608,7 +4616,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk

iwl_reset_qos(priv);

queue_work(priv->workqueue, &priv->post_associate.work);
iwl4965_post_associate(priv);

mutex_unlock(&priv->mutex);

Expand Down

0 comments on commit a6e189a

Please sign in to comment.