diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-11 19:13:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-11 19:13:08 -0400 |
commit | 78d41b35a9570b7a9a45686789df5dfaeb2b7f4c (patch) | |
tree | a28432584132a7c810b6b243795aec43544205ab | |
parent | 9bbc052d5e63512b0ce4e201ea97e12fba9fda82 (diff) | |
parent | 2ae1b8b35faba31a59b153cbad07f9c15de99740 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-dev.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 4 |
5 files changed, 29 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 17d04ff8d678..1482fa650833 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2141,6 +2141,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | 2141 | static void ath9k_flush(struct ieee80211_hw *hw, bool drop) |
2142 | { | 2142 | { |
2143 | struct ath_softc *sc = hw->priv; | 2143 | struct ath_softc *sc = hw->priv; |
2144 | struct ath_hw *ah = sc->sc_ah; | ||
2145 | struct ath_common *common = ath9k_hw_common(ah); | ||
2144 | int timeout = 200; /* ms */ | 2146 | int timeout = 200; /* ms */ |
2145 | int i, j; | 2147 | int i, j; |
2146 | 2148 | ||
@@ -2149,6 +2151,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) | |||
2149 | 2151 | ||
2150 | cancel_delayed_work_sync(&sc->tx_complete_work); | 2152 | cancel_delayed_work_sync(&sc->tx_complete_work); |
2151 | 2153 | ||
2154 | if (sc->sc_flags & SC_OP_INVALID) { | ||
2155 | ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); | ||
2156 | mutex_unlock(&sc->mutex); | ||
2157 | return; | ||
2158 | } | ||
2159 | |||
2152 | if (drop) | 2160 | if (drop) |
2153 | timeout = 1; | 2161 | timeout = 1; |
2154 | 2162 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index c1511b14b239..42db0fc8b921 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -2155,6 +2155,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2155 | goto set_ch_out; | 2155 | goto set_ch_out; |
2156 | } | 2156 | } |
2157 | 2157 | ||
2158 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | ||
2159 | !iwl_legacy_is_channel_ibss(ch_info)) { | ||
2160 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n"); | ||
2161 | ret = -EINVAL; | ||
2162 | goto set_ch_out; | ||
2163 | } | ||
2164 | |||
2158 | spin_lock_irqsave(&priv->lock, flags); | 2165 | spin_lock_irqsave(&priv->lock, flags); |
2159 | 2166 | ||
2160 | for_each_context(priv, ctx) { | 2167 | for_each_context(priv, ctx) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h index 9ee849d669f3..f43ac1eb9014 100644 --- a/drivers/net/wireless/iwlegacy/iwl-dev.h +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h | |||
@@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct iwl_channel_info *ch) | |||
1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; | 1411 | return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static inline int | ||
1415 | iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch) | ||
1416 | { | ||
1417 | return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0; | ||
1418 | } | ||
1419 | |||
1414 | static inline void | 1420 | static inline void |
1415 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) | 1421 | __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page) |
1416 | { | 1422 | { |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 7e8a658b7670..f3ac62431a30 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1339,8 +1339,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1339 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { | 1339 | cpu_to_le16(PS_MODE_ACTION_EXIT_PS)) { |
1340 | lbs_deb_host( | 1340 | lbs_deb_host( |
1341 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); | 1341 | "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); |
1342 | list_del(&cmdnode->list); | ||
1343 | spin_lock_irqsave(&priv->driver_lock, flags); | 1342 | spin_lock_irqsave(&priv->driver_lock, flags); |
1343 | list_del(&cmdnode->list); | ||
1344 | lbs_complete_command(priv, cmdnode, 0); | 1344 | lbs_complete_command(priv, cmdnode, 0); |
1345 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1345 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1346 | 1346 | ||
@@ -1352,8 +1352,8 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1352 | (priv->psstate == PS_STATE_PRE_SLEEP)) { | 1352 | (priv->psstate == PS_STATE_PRE_SLEEP)) { |
1353 | lbs_deb_host( | 1353 | lbs_deb_host( |
1354 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); | 1354 | "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); |
1355 | list_del(&cmdnode->list); | ||
1356 | spin_lock_irqsave(&priv->driver_lock, flags); | 1355 | spin_lock_irqsave(&priv->driver_lock, flags); |
1356 | list_del(&cmdnode->list); | ||
1357 | lbs_complete_command(priv, cmdnode, 0); | 1357 | lbs_complete_command(priv, cmdnode, 0); |
1358 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1358 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
1359 | priv->needtowakeup = 1; | 1359 | priv->needtowakeup = 1; |
@@ -1366,7 +1366,9 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1366 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); | 1366 | "EXEC_NEXT_CMD: sending EXIT_PS\n"); |
1367 | } | 1367 | } |
1368 | } | 1368 | } |
1369 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
1369 | list_del(&cmdnode->list); | 1370 | list_del(&cmdnode->list); |
1371 | spin_unlock_irqrestore(&priv->driver_lock, flags); | ||
1370 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", | 1372 | lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n", |
1371 | le16_to_cpu(cmd->command)); | 1373 | le16_to_cpu(cmd->command)); |
1372 | lbs_submit_command(priv, cmdnode); | 1374 | lbs_submit_command(priv, cmdnode); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index ce4596ed1268..bd1224fd216a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -237,6 +237,10 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx) | |||
237 | &local->dynamic_ps_disable_work); | 237 | &local->dynamic_ps_disable_work); |
238 | } | 238 | } |
239 | 239 | ||
240 | /* Don't restart the timer if we're not disassociated */ | ||
241 | if (!ifmgd->associated) | ||
242 | return TX_CONTINUE; | ||
243 | |||
240 | mod_timer(&local->dynamic_ps_timer, jiffies + | 244 | mod_timer(&local->dynamic_ps_timer, jiffies + |
241 | msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); | 245 | msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); |
242 | 246 | ||