diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-29 05:48:00 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-29 05:48:00 -0400 |
commit | 3830de73000c07b2cbdf8cc31a46a01dda28c5df (patch) | |
tree | 97633f920fa275a73f735b3eab0ad7728c44fdd1 /drivers/net | |
parent | 2a6f4e4983918b18fe5d3fb364afe33db7139870 (diff) | |
parent | 6ef89d0afabe472dd17caff85cec2f9cefeb5f06 (diff) |
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 56 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 56 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtl8187_dev.c | 20 |
9 files changed, 121 insertions, 40 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 9d9ff76a9bc6..5058e60e5703 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2391,7 +2391,7 @@ out_requeue: | |||
2391 | if (b43_debug(dev, B43_DBG_PWORK_FAST)) | 2391 | if (b43_debug(dev, B43_DBG_PWORK_FAST)) |
2392 | delay = msecs_to_jiffies(50); | 2392 | delay = msecs_to_jiffies(50); |
2393 | else | 2393 | else |
2394 | delay = round_jiffies(HZ * 15); | 2394 | delay = round_jiffies_relative(HZ * 15); |
2395 | queue_delayed_work(wl->hw->workqueue, &dev->periodic_work, delay); | 2395 | queue_delayed_work(wl->hw->workqueue, &dev->periodic_work, delay); |
2396 | out: | 2396 | out: |
2397 | mutex_unlock(&wl->mutex); | 2397 | mutex_unlock(&wl->mutex); |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index d09479e816cd..f0e56dfc9ecf 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -2260,7 +2260,7 @@ out_requeue: | |||
2260 | if (b43legacy_debug(dev, B43legacy_DBG_PWORK_FAST)) | 2260 | if (b43legacy_debug(dev, B43legacy_DBG_PWORK_FAST)) |
2261 | delay = msecs_to_jiffies(50); | 2261 | delay = msecs_to_jiffies(50); |
2262 | else | 2262 | else |
2263 | delay = round_jiffies(HZ); | 2263 | delay = round_jiffies_relative(HZ); |
2264 | queue_delayed_work(dev->wl->hw->workqueue, | 2264 | queue_delayed_work(dev->wl->hw->workqueue, |
2265 | &dev->periodic_work, delay); | 2265 | &dev->periodic_work, delay); |
2266 | out: | 2266 | out: |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index a6c7904de282..8d53d08b9691 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -1769,7 +1769,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) | |||
1769 | if (priv->stop_rf_kill) { | 1769 | if (priv->stop_rf_kill) { |
1770 | priv->stop_rf_kill = 0; | 1770 | priv->stop_rf_kill = 0; |
1771 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 1771 | queue_delayed_work(priv->workqueue, &priv->rf_kill, |
1772 | round_jiffies(HZ)); | 1772 | round_jiffies_relative(HZ)); |
1773 | } | 1773 | } |
1774 | 1774 | ||
1775 | deferred = 1; | 1775 | deferred = 1; |
@@ -2086,7 +2086,8 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | |||
2086 | /* Make sure the RF Kill check timer is running */ | 2086 | /* Make sure the RF Kill check timer is running */ |
2087 | priv->stop_rf_kill = 0; | 2087 | priv->stop_rf_kill = 0; |
2088 | cancel_delayed_work(&priv->rf_kill); | 2088 | cancel_delayed_work(&priv->rf_kill); |
2089 | queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ)); | 2089 | queue_delayed_work(priv->workqueue, &priv->rf_kill, |
2090 | round_jiffies_relative(HZ)); | ||
2090 | } | 2091 | } |
2091 | 2092 | ||
2092 | static void send_scan_event(void *data) | 2093 | static void send_scan_event(void *data) |
@@ -2123,7 +2124,7 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) | |||
2123 | if (!delayed_work_pending(&priv->scan_event_later)) | 2124 | if (!delayed_work_pending(&priv->scan_event_later)) |
2124 | queue_delayed_work(priv->workqueue, | 2125 | queue_delayed_work(priv->workqueue, |
2125 | &priv->scan_event_later, | 2126 | &priv->scan_event_later, |
2126 | round_jiffies(msecs_to_jiffies(4000))); | 2127 | round_jiffies_relative(msecs_to_jiffies(4000))); |
2127 | } else { | 2128 | } else { |
2128 | priv->user_requested_scan = 0; | 2129 | priv->user_requested_scan = 0; |
2129 | cancel_delayed_work(&priv->scan_event_later); | 2130 | cancel_delayed_work(&priv->scan_event_later); |
@@ -4242,7 +4243,7 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio) | |||
4242 | priv->stop_rf_kill = 0; | 4243 | priv->stop_rf_kill = 0; |
4243 | cancel_delayed_work(&priv->rf_kill); | 4244 | cancel_delayed_work(&priv->rf_kill); |
4244 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 4245 | queue_delayed_work(priv->workqueue, &priv->rf_kill, |
4245 | round_jiffies(HZ)); | 4246 | round_jiffies_relative(HZ)); |
4246 | } else | 4247 | } else |
4247 | schedule_reset(priv); | 4248 | schedule_reset(priv); |
4248 | } | 4249 | } |
@@ -5981,7 +5982,7 @@ static void ipw2100_rf_kill(struct work_struct *work) | |||
5981 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); | 5982 | IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); |
5982 | if (!priv->stop_rf_kill) | 5983 | if (!priv->stop_rf_kill) |
5983 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 5984 | queue_delayed_work(priv->workqueue, &priv->rf_kill, |
5984 | round_jiffies(HZ)); | 5985 | round_jiffies_relative(HZ)); |
5985 | goto exit_unlock; | 5986 | goto exit_unlock; |
5986 | } | 5987 | } |
5987 | 5988 | ||
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index e3c828401b9a..54f44e5473c0 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -1753,7 +1753,7 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) | |||
1753 | /* Make sure the RF_KILL check timer is running */ | 1753 | /* Make sure the RF_KILL check timer is running */ |
1754 | cancel_delayed_work(&priv->rf_kill); | 1754 | cancel_delayed_work(&priv->rf_kill); |
1755 | queue_delayed_work(priv->workqueue, &priv->rf_kill, | 1755 | queue_delayed_work(priv->workqueue, &priv->rf_kill, |
1756 | round_jiffies(2 * HZ)); | 1756 | round_jiffies_relative(2 * HZ)); |
1757 | } else | 1757 | } else |
1758 | queue_work(priv->workqueue, &priv->up); | 1758 | queue_work(priv->workqueue, &priv->up); |
1759 | } | 1759 | } |
@@ -4364,7 +4364,7 @@ static void handle_scan_event(struct ipw_priv *priv) | |||
4364 | if (!priv->user_requested_scan) { | 4364 | if (!priv->user_requested_scan) { |
4365 | if (!delayed_work_pending(&priv->scan_event)) | 4365 | if (!delayed_work_pending(&priv->scan_event)) |
4366 | queue_delayed_work(priv->workqueue, &priv->scan_event, | 4366 | queue_delayed_work(priv->workqueue, &priv->scan_event, |
4367 | round_jiffies(msecs_to_jiffies(4000))); | 4367 | round_jiffies_relative(msecs_to_jiffies(4000))); |
4368 | } else { | 4368 | } else { |
4369 | union iwreq_data wrqu; | 4369 | union iwreq_data wrqu; |
4370 | 4370 | ||
@@ -4728,7 +4728,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4728 | && priv->status & STATUS_ASSOCIATED) | 4728 | && priv->status & STATUS_ASSOCIATED) |
4729 | queue_delayed_work(priv->workqueue, | 4729 | queue_delayed_work(priv->workqueue, |
4730 | &priv->request_scan, | 4730 | &priv->request_scan, |
4731 | round_jiffies(HZ)); | 4731 | round_jiffies_relative(HZ)); |
4732 | 4732 | ||
4733 | /* Send an empty event to user space. | 4733 | /* Send an empty event to user space. |
4734 | * We don't send the received data on the event because | 4734 | * We don't send the received data on the event because |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 557deebca1b9..891f90d2f019 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -3232,9 +3232,7 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd, | |||
3232 | tx->rate_n_flags = iwl_hw_set_rate_n_flags(iwl_rates[rate_index].plcp, | 3232 | tx->rate_n_flags = iwl_hw_set_rate_n_flags(iwl_rates[rate_index].plcp, |
3233 | rate_flags); | 3233 | rate_flags); |
3234 | 3234 | ||
3235 | if (ieee80211_is_probe_request(fc)) | 3235 | if (ieee80211_is_back_request(fc)) |
3236 | tx->tx_flags |= TX_CMD_FLG_TSF_MSK; | ||
3237 | else if (ieee80211_is_back_request(fc)) | ||
3238 | tx->tx_flags |= TX_CMD_FLG_ACK_MSK | | 3236 | tx->tx_flags |= TX_CMD_FLG_ACK_MSK | |
3239 | TX_CMD_FLG_IMM_BA_RSP_MASK; | 3237 | TX_CMD_FLG_IMM_BA_RSP_MASK; |
3240 | #ifdef CONFIG_IWLWIFI_HT | 3238 | #ifdef CONFIG_IWLWIFI_HT |
@@ -3872,7 +3870,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
3872 | */ | 3870 | */ |
3873 | case IEEE80211_STYPE_ASSOC_RESP: | 3871 | case IEEE80211_STYPE_ASSOC_RESP: |
3874 | case IEEE80211_STYPE_REASSOC_RESP: | 3872 | case IEEE80211_STYPE_REASSOC_RESP: |
3875 | if (network_packet && iwl_is_associated(priv)) { | 3873 | if (network_packet) { |
3876 | #ifdef CONFIG_IWLWIFI_HT | 3874 | #ifdef CONFIG_IWLWIFI_HT |
3877 | u8 *pos = NULL; | 3875 | u8 *pos = NULL; |
3878 | struct ieee802_11_elems elems; | 3876 | struct ieee802_11_elems elems; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 83019d1d7ccc..4f22a7174caf 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6478,8 +6478,9 @@ static void iwl_bg_scan_check(struct work_struct *data) | |||
6478 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, | 6478 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, |
6479 | "Scan completion watchdog resetting adapter (%dms)\n", | 6479 | "Scan completion watchdog resetting adapter (%dms)\n", |
6480 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); | 6480 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); |
6481 | |||
6481 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6482 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6482 | queue_work(priv->workqueue, &priv->restart); | 6483 | iwl_send_scan_abort(priv); |
6483 | } | 6484 | } |
6484 | mutex_unlock(&priv->mutex); | 6485 | mutex_unlock(&priv->mutex); |
6485 | } | 6486 | } |
@@ -6575,7 +6576,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6575 | spin_unlock_irqrestore(&priv->lock, flags); | 6576 | spin_unlock_irqrestore(&priv->lock, flags); |
6576 | 6577 | ||
6577 | scan->suspend_time = 0; | 6578 | scan->suspend_time = 0; |
6578 | scan->max_out_time = cpu_to_le32(600 * 1024); | 6579 | scan->max_out_time = cpu_to_le32(200 * 1024); |
6579 | if (!interval) | 6580 | if (!interval) |
6580 | interval = suspend_time; | 6581 | interval = suspend_time; |
6581 | /* | 6582 | /* |
@@ -6605,7 +6606,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6605 | memcpy(scan->direct_scan[0].ssid, | 6606 | memcpy(scan->direct_scan[0].ssid, |
6606 | priv->direct_ssid, priv->direct_ssid_len); | 6607 | priv->direct_ssid, priv->direct_ssid_len); |
6607 | direct_mask = 1; | 6608 | direct_mask = 1; |
6608 | } else if (!iwl_is_associated(priv)) { | 6609 | } else if (!iwl_is_associated(priv) && priv->essid_len) { |
6609 | scan->direct_scan[0].id = WLAN_EID_SSID; | 6610 | scan->direct_scan[0].id = WLAN_EID_SSID; |
6610 | scan->direct_scan[0].len = priv->essid_len; | 6611 | scan->direct_scan[0].len = priv->essid_len; |
6611 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 6612 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
@@ -6744,6 +6745,12 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
6744 | 6745 | ||
6745 | mutex_lock(&priv->mutex); | 6746 | mutex_lock(&priv->mutex); |
6746 | 6747 | ||
6748 | if (!priv->interface_id || !priv->is_open) { | ||
6749 | mutex_unlock(&priv->mutex); | ||
6750 | return; | ||
6751 | } | ||
6752 | iwl_scan_cancel_timeout(priv, 200); | ||
6753 | |||
6747 | conf = ieee80211_get_hw_conf(priv->hw); | 6754 | conf = ieee80211_get_hw_conf(priv->hw); |
6748 | 6755 | ||
6749 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 6756 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
@@ -6882,9 +6889,19 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
6882 | struct iwl_priv *priv = hw->priv; | 6889 | struct iwl_priv *priv = hw->priv; |
6883 | 6890 | ||
6884 | IWL_DEBUG_MAC80211("enter\n"); | 6891 | IWL_DEBUG_MAC80211("enter\n"); |
6892 | |||
6893 | |||
6894 | mutex_lock(&priv->mutex); | ||
6895 | /* stop mac, cancel any scan request and clear | ||
6896 | * RXON_FILTER_ASSOC_MSK BIT | ||
6897 | */ | ||
6885 | priv->is_open = 0; | 6898 | priv->is_open = 0; |
6886 | /*netif_stop_queue(dev); */ | 6899 | iwl_scan_cancel_timeout(priv, 100); |
6887 | flush_workqueue(priv->workqueue); | 6900 | cancel_delayed_work(&priv->post_associate); |
6901 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
6902 | iwl_commit_rxon(priv); | ||
6903 | mutex_unlock(&priv->mutex); | ||
6904 | |||
6888 | IWL_DEBUG_MAC80211("leave\n"); | 6905 | IWL_DEBUG_MAC80211("leave\n"); |
6889 | } | 6906 | } |
6890 | 6907 | ||
@@ -7169,8 +7186,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7169 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) | 7186 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) |
7170 | iwl_config_ap(priv); | 7187 | iwl_config_ap(priv); |
7171 | else { | 7188 | else { |
7172 | priv->staging_rxon.filter_flags |= | ||
7173 | RXON_FILTER_ASSOC_MSK; | ||
7174 | rc = iwl_commit_rxon(priv); | 7189 | rc = iwl_commit_rxon(priv); |
7175 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) | 7190 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) |
7176 | iwl_add_station(priv, | 7191 | iwl_add_station(priv, |
@@ -7178,6 +7193,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7178 | } | 7193 | } |
7179 | 7194 | ||
7180 | } else { | 7195 | } else { |
7196 | iwl_scan_cancel_timeout(priv, 100); | ||
7181 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 7197 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
7182 | iwl_commit_rxon(priv); | 7198 | iwl_commit_rxon(priv); |
7183 | } | 7199 | } |
@@ -7217,6 +7233,12 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
7217 | IWL_DEBUG_MAC80211("enter\n"); | 7233 | IWL_DEBUG_MAC80211("enter\n"); |
7218 | 7234 | ||
7219 | mutex_lock(&priv->mutex); | 7235 | mutex_lock(&priv->mutex); |
7236 | |||
7237 | iwl_scan_cancel_timeout(priv, 100); | ||
7238 | cancel_delayed_work(&priv->post_associate); | ||
7239 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7240 | iwl_commit_rxon(priv); | ||
7241 | |||
7220 | if (priv->interface_id == conf->if_id) { | 7242 | if (priv->interface_id == conf->if_id) { |
7221 | priv->interface_id = 0; | 7243 | priv->interface_id = 0; |
7222 | memset(priv->bssid, 0, ETH_ALEN); | 7244 | memset(priv->bssid, 0, ETH_ALEN); |
@@ -7238,6 +7260,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7238 | 7260 | ||
7239 | IWL_DEBUG_MAC80211("enter\n"); | 7261 | IWL_DEBUG_MAC80211("enter\n"); |
7240 | 7262 | ||
7263 | mutex_lock(&priv->mutex); | ||
7241 | spin_lock_irqsave(&priv->lock, flags); | 7264 | spin_lock_irqsave(&priv->lock, flags); |
7242 | 7265 | ||
7243 | if (!iwl_is_ready_rf(priv)) { | 7266 | if (!iwl_is_ready_rf(priv)) { |
@@ -7268,7 +7291,8 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7268 | priv->direct_ssid_len = (u8) | 7291 | priv->direct_ssid_len = (u8) |
7269 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); | 7292 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); |
7270 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); | 7293 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); |
7271 | } | 7294 | } else |
7295 | priv->one_direct_scan = 0; | ||
7272 | 7296 | ||
7273 | rc = iwl_scan_initiate(priv); | 7297 | rc = iwl_scan_initiate(priv); |
7274 | 7298 | ||
@@ -7276,6 +7300,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7276 | 7300 | ||
7277 | out_unlock: | 7301 | out_unlock: |
7278 | spin_unlock_irqrestore(&priv->lock, flags); | 7302 | spin_unlock_irqrestore(&priv->lock, flags); |
7303 | mutex_unlock(&priv->mutex); | ||
7279 | 7304 | ||
7280 | return rc; | 7305 | return rc; |
7281 | } | 7306 | } |
@@ -7310,6 +7335,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
7310 | 7335 | ||
7311 | mutex_lock(&priv->mutex); | 7336 | mutex_lock(&priv->mutex); |
7312 | 7337 | ||
7338 | iwl_scan_cancel_timeout(priv, 100); | ||
7339 | |||
7313 | switch (cmd) { | 7340 | switch (cmd) { |
7314 | case SET_KEY: | 7341 | case SET_KEY: |
7315 | rc = iwl_update_sta_key_info(priv, key, sta_id); | 7342 | rc = iwl_update_sta_key_info(priv, key, sta_id); |
@@ -7479,8 +7506,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7479 | 7506 | ||
7480 | spin_unlock_irqrestore(&priv->lock, flags); | 7507 | spin_unlock_irqrestore(&priv->lock, flags); |
7481 | 7508 | ||
7509 | /* we are restarting association process | ||
7510 | * clear RXON_FILTER_ASSOC_MSK bit | ||
7511 | */ | ||
7512 | if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { | ||
7513 | iwl_scan_cancel_timeout(priv, 100); | ||
7514 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7515 | iwl_commit_rxon(priv); | ||
7516 | } | ||
7517 | |||
7482 | /* Per mac80211.h: This is only used in IBSS mode... */ | 7518 | /* Per mac80211.h: This is only used in IBSS mode... */ |
7483 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { | 7519 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { |
7520 | |||
7484 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); | 7521 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); |
7485 | mutex_unlock(&priv->mutex); | 7522 | mutex_unlock(&priv->mutex); |
7486 | return; | 7523 | return; |
@@ -8558,6 +8595,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) | |||
8558 | iwl_rate_control_unregister(priv->hw); | 8595 | iwl_rate_control_unregister(priv->hw); |
8559 | } | 8596 | } |
8560 | 8597 | ||
8598 | /*netif_stop_queue(dev); */ | ||
8599 | flush_workqueue(priv->workqueue); | ||
8600 | |||
8561 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes | 8601 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes |
8562 | * priv->workqueue... so we can't take down the workqueue | 8602 | * priv->workqueue... so we can't take down the workqueue |
8563 | * until now... */ | 8603 | * until now... */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 5e1279263b22..d60adcb9bd4a 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -6845,8 +6845,9 @@ static void iwl_bg_scan_check(struct work_struct *data) | |||
6845 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, | 6845 | IWL_DEBUG(IWL_DL_INFO | IWL_DL_SCAN, |
6846 | "Scan completion watchdog resetting adapter (%dms)\n", | 6846 | "Scan completion watchdog resetting adapter (%dms)\n", |
6847 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); | 6847 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); |
6848 | |||
6848 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6849 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) |
6849 | queue_work(priv->workqueue, &priv->restart); | 6850 | iwl_send_scan_abort(priv); |
6850 | } | 6851 | } |
6851 | mutex_unlock(&priv->mutex); | 6852 | mutex_unlock(&priv->mutex); |
6852 | } | 6853 | } |
@@ -6942,7 +6943,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6942 | spin_unlock_irqrestore(&priv->lock, flags); | 6943 | spin_unlock_irqrestore(&priv->lock, flags); |
6943 | 6944 | ||
6944 | scan->suspend_time = 0; | 6945 | scan->suspend_time = 0; |
6945 | scan->max_out_time = cpu_to_le32(600 * 1024); | 6946 | scan->max_out_time = cpu_to_le32(200 * 1024); |
6946 | if (!interval) | 6947 | if (!interval) |
6947 | interval = suspend_time; | 6948 | interval = suspend_time; |
6948 | 6949 | ||
@@ -6965,7 +6966,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6965 | memcpy(scan->direct_scan[0].ssid, | 6966 | memcpy(scan->direct_scan[0].ssid, |
6966 | priv->direct_ssid, priv->direct_ssid_len); | 6967 | priv->direct_ssid, priv->direct_ssid_len); |
6967 | direct_mask = 1; | 6968 | direct_mask = 1; |
6968 | } else if (!iwl_is_associated(priv)) { | 6969 | } else if (!iwl_is_associated(priv) && priv->essid_len) { |
6969 | scan->direct_scan[0].id = WLAN_EID_SSID; | 6970 | scan->direct_scan[0].id = WLAN_EID_SSID; |
6970 | scan->direct_scan[0].len = priv->essid_len; | 6971 | scan->direct_scan[0].len = priv->essid_len; |
6971 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 6972 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
@@ -7118,6 +7119,12 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
7118 | 7119 | ||
7119 | mutex_lock(&priv->mutex); | 7120 | mutex_lock(&priv->mutex); |
7120 | 7121 | ||
7122 | if (!priv->interface_id || !priv->is_open) { | ||
7123 | mutex_unlock(&priv->mutex); | ||
7124 | return; | ||
7125 | } | ||
7126 | iwl_scan_cancel_timeout(priv, 200); | ||
7127 | |||
7121 | conf = ieee80211_get_hw_conf(priv->hw); | 7128 | conf = ieee80211_get_hw_conf(priv->hw); |
7122 | 7129 | ||
7123 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 7130 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
@@ -7271,9 +7278,19 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
7271 | struct iwl_priv *priv = hw->priv; | 7278 | struct iwl_priv *priv = hw->priv; |
7272 | 7279 | ||
7273 | IWL_DEBUG_MAC80211("enter\n"); | 7280 | IWL_DEBUG_MAC80211("enter\n"); |
7281 | |||
7282 | |||
7283 | mutex_lock(&priv->mutex); | ||
7284 | /* stop mac, cancel any scan request and clear | ||
7285 | * RXON_FILTER_ASSOC_MSK BIT | ||
7286 | */ | ||
7274 | priv->is_open = 0; | 7287 | priv->is_open = 0; |
7275 | /*netif_stop_queue(dev); */ | 7288 | iwl_scan_cancel_timeout(priv, 100); |
7276 | flush_workqueue(priv->workqueue); | 7289 | cancel_delayed_work(&priv->post_associate); |
7290 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7291 | iwl_commit_rxon(priv); | ||
7292 | mutex_unlock(&priv->mutex); | ||
7293 | |||
7277 | IWL_DEBUG_MAC80211("leave\n"); | 7294 | IWL_DEBUG_MAC80211("leave\n"); |
7278 | } | 7295 | } |
7279 | 7296 | ||
@@ -7573,8 +7590,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7573 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) | 7590 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) |
7574 | iwl_config_ap(priv); | 7591 | iwl_config_ap(priv); |
7575 | else { | 7592 | else { |
7576 | priv->staging_rxon.filter_flags |= | ||
7577 | RXON_FILTER_ASSOC_MSK; | ||
7578 | rc = iwl_commit_rxon(priv); | 7593 | rc = iwl_commit_rxon(priv); |
7579 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) | 7594 | if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) |
7580 | iwl_rxon_add_station( | 7595 | iwl_rxon_add_station( |
@@ -7582,6 +7597,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id, | |||
7582 | } | 7597 | } |
7583 | 7598 | ||
7584 | } else { | 7599 | } else { |
7600 | iwl_scan_cancel_timeout(priv, 100); | ||
7585 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 7601 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
7586 | iwl_commit_rxon(priv); | 7602 | iwl_commit_rxon(priv); |
7587 | } | 7603 | } |
@@ -7621,6 +7637,12 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
7621 | IWL_DEBUG_MAC80211("enter\n"); | 7637 | IWL_DEBUG_MAC80211("enter\n"); |
7622 | 7638 | ||
7623 | mutex_lock(&priv->mutex); | 7639 | mutex_lock(&priv->mutex); |
7640 | |||
7641 | iwl_scan_cancel_timeout(priv, 100); | ||
7642 | cancel_delayed_work(&priv->post_associate); | ||
7643 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7644 | iwl_commit_rxon(priv); | ||
7645 | |||
7624 | if (priv->interface_id == conf->if_id) { | 7646 | if (priv->interface_id == conf->if_id) { |
7625 | priv->interface_id = 0; | 7647 | priv->interface_id = 0; |
7626 | memset(priv->bssid, 0, ETH_ALEN); | 7648 | memset(priv->bssid, 0, ETH_ALEN); |
@@ -7642,6 +7664,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7642 | 7664 | ||
7643 | IWL_DEBUG_MAC80211("enter\n"); | 7665 | IWL_DEBUG_MAC80211("enter\n"); |
7644 | 7666 | ||
7667 | mutex_lock(&priv->mutex); | ||
7645 | spin_lock_irqsave(&priv->lock, flags); | 7668 | spin_lock_irqsave(&priv->lock, flags); |
7646 | 7669 | ||
7647 | if (!iwl_is_ready_rf(priv)) { | 7670 | if (!iwl_is_ready_rf(priv)) { |
@@ -7672,7 +7695,8 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7672 | priv->direct_ssid_len = (u8) | 7695 | priv->direct_ssid_len = (u8) |
7673 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); | 7696 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); |
7674 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); | 7697 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); |
7675 | } | 7698 | } else |
7699 | priv->one_direct_scan = 0; | ||
7676 | 7700 | ||
7677 | rc = iwl_scan_initiate(priv); | 7701 | rc = iwl_scan_initiate(priv); |
7678 | 7702 | ||
@@ -7680,6 +7704,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7680 | 7704 | ||
7681 | out_unlock: | 7705 | out_unlock: |
7682 | spin_unlock_irqrestore(&priv->lock, flags); | 7706 | spin_unlock_irqrestore(&priv->lock, flags); |
7707 | mutex_unlock(&priv->mutex); | ||
7683 | 7708 | ||
7684 | return rc; | 7709 | return rc; |
7685 | } | 7710 | } |
@@ -7713,6 +7738,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
7713 | 7738 | ||
7714 | mutex_lock(&priv->mutex); | 7739 | mutex_lock(&priv->mutex); |
7715 | 7740 | ||
7741 | iwl_scan_cancel_timeout(priv, 100); | ||
7742 | |||
7716 | switch (cmd) { | 7743 | switch (cmd) { |
7717 | case SET_KEY: | 7744 | case SET_KEY: |
7718 | rc = iwl_update_sta_key_info(priv, key, sta_id); | 7745 | rc = iwl_update_sta_key_info(priv, key, sta_id); |
@@ -7903,8 +7930,18 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7903 | 7930 | ||
7904 | spin_unlock_irqrestore(&priv->lock, flags); | 7931 | spin_unlock_irqrestore(&priv->lock, flags); |
7905 | 7932 | ||
7933 | /* we are restarting association process | ||
7934 | * clear RXON_FILTER_ASSOC_MSK bit | ||
7935 | */ | ||
7936 | if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { | ||
7937 | iwl_scan_cancel_timeout(priv, 100); | ||
7938 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7939 | iwl_commit_rxon(priv); | ||
7940 | } | ||
7941 | |||
7906 | /* Per mac80211.h: This is only used in IBSS mode... */ | 7942 | /* Per mac80211.h: This is only used in IBSS mode... */ |
7907 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { | 7943 | if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { |
7944 | |||
7908 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); | 7945 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); |
7909 | mutex_unlock(&priv->mutex); | 7946 | mutex_unlock(&priv->mutex); |
7910 | return; | 7947 | return; |
@@ -9152,6 +9189,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) | |||
9152 | iwl_rate_control_unregister(priv->hw); | 9189 | iwl_rate_control_unregister(priv->hw); |
9153 | } | 9190 | } |
9154 | 9191 | ||
9192 | /*netif_stop_queue(dev); */ | ||
9193 | flush_workqueue(priv->workqueue); | ||
9194 | |||
9155 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes | 9195 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes |
9156 | * priv->workqueue... so we can't take down the workqueue | 9196 | * priv->workqueue... so we can't take down the workqueue |
9157 | * until now... */ | 9197 | * until now... */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 298faa9d3f61..06d9bc0015c0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -30,7 +30,7 @@ | |||
30 | * Interval defines | 30 | * Interval defines |
31 | * Both the link tuner as the rfkill will be called once per second. | 31 | * Both the link tuner as the rfkill will be called once per second. |
32 | */ | 32 | */ |
33 | #define LINK_TUNE_INTERVAL ( round_jiffies(HZ) ) | 33 | #define LINK_TUNE_INTERVAL ( round_jiffies_relative(HZ) ) |
34 | #define RFKILL_POLL_INTERVAL ( 1000 ) | 34 | #define RFKILL_POLL_INTERVAL ( 1000 ) |
35 | 35 | ||
36 | /* | 36 | /* |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index de61c8fe6492..e454ae83e97a 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -433,6 +433,9 @@ static int rtl8187_start(struct ieee80211_hw *dev) | |||
433 | 433 | ||
434 | rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0xFFFF); | 434 | rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0xFFFF); |
435 | 435 | ||
436 | rtl818x_iowrite32(priv, &priv->map->MAR[0], ~0); | ||
437 | rtl818x_iowrite32(priv, &priv->map->MAR[1], ~0); | ||
438 | |||
436 | rtl8187_init_urbs(dev); | 439 | rtl8187_init_urbs(dev); |
437 | 440 | ||
438 | reg = RTL818X_RX_CONF_ONLYERLPKT | | 441 | reg = RTL818X_RX_CONF_ONLYERLPKT | |
@@ -582,32 +585,31 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev, int if_id, | |||
582 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, | 585 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, |
583 | unsigned int changed_flags, | 586 | unsigned int changed_flags, |
584 | unsigned int *total_flags, | 587 | unsigned int *total_flags, |
585 | int mc_count, struct dev_addr_list *mc_list) | 588 | int mc_count, struct dev_addr_list *mclist) |
586 | { | 589 | { |
587 | struct rtl8187_priv *priv = dev->priv; | 590 | struct rtl8187_priv *priv = dev->priv; |
588 | 591 | ||
589 | *total_flags = 0; | ||
590 | |||
591 | if (changed_flags & FIF_ALLMULTI) | ||
592 | priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST; | ||
593 | if (changed_flags & FIF_FCSFAIL) | 592 | if (changed_flags & FIF_FCSFAIL) |
594 | priv->rx_conf ^= RTL818X_RX_CONF_FCS; | 593 | priv->rx_conf ^= RTL818X_RX_CONF_FCS; |
595 | if (changed_flags & FIF_CONTROL) | 594 | if (changed_flags & FIF_CONTROL) |
596 | priv->rx_conf ^= RTL818X_RX_CONF_CTRL; | 595 | priv->rx_conf ^= RTL818X_RX_CONF_CTRL; |
597 | if (changed_flags & FIF_OTHER_BSS) | 596 | if (changed_flags & FIF_OTHER_BSS) |
598 | priv->rx_conf ^= RTL818X_RX_CONF_MONITOR; | 597 | priv->rx_conf ^= RTL818X_RX_CONF_MONITOR; |
599 | 598 | if (*total_flags & FIF_ALLMULTI || mc_count > 0) | |
600 | if (mc_count > 0) | ||
601 | priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; | 599 | priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; |
600 | else | ||
601 | priv->rx_conf &= ~RTL818X_RX_CONF_MULTICAST; | ||
602 | |||
603 | *total_flags = 0; | ||
602 | 604 | ||
603 | if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST) | ||
604 | *total_flags |= FIF_ALLMULTI; | ||
605 | if (priv->rx_conf & RTL818X_RX_CONF_FCS) | 605 | if (priv->rx_conf & RTL818X_RX_CONF_FCS) |
606 | *total_flags |= FIF_FCSFAIL; | 606 | *total_flags |= FIF_FCSFAIL; |
607 | if (priv->rx_conf & RTL818X_RX_CONF_CTRL) | 607 | if (priv->rx_conf & RTL818X_RX_CONF_CTRL) |
608 | *total_flags |= FIF_CONTROL; | 608 | *total_flags |= FIF_CONTROL; |
609 | if (priv->rx_conf & RTL818X_RX_CONF_MONITOR) | 609 | if (priv->rx_conf & RTL818X_RX_CONF_MONITOR) |
610 | *total_flags |= FIF_OTHER_BSS; | 610 | *total_flags |= FIF_OTHER_BSS; |
611 | if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST) | ||
612 | *total_flags |= FIF_ALLMULTI; | ||
611 | 613 | ||
612 | rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf); | 614 | rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf); |
613 | } | 615 | } |