diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 8 |
8 files changed, 44 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ee7759575050..87db1ee1c298 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1037,13 +1037,16 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1037 | 1037 | ||
1038 | /* | 1038 | /* |
1039 | * Workaround for early ACK timeouts, add an offset to match the | 1039 | * Workaround for early ACK timeouts, add an offset to match the |
1040 | * initval's 64us ack timeout value. | 1040 | * initval's 64us ack timeout value. Use 48us for the CTS timeout. |
1041 | * This was initially only meant to work around an issue with delayed | 1041 | * This was initially only meant to work around an issue with delayed |
1042 | * BA frames in some implementations, but it has been found to fix ACK | 1042 | * BA frames in some implementations, but it has been found to fix ACK |
1043 | * timeout issues in other cases as well. | 1043 | * timeout issues in other cases as well. |
1044 | */ | 1044 | */ |
1045 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) | 1045 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) { |
1046 | acktimeout += 64 - sifstime - ah->slottime; | 1046 | acktimeout += 64 - sifstime - ah->slottime; |
1047 | ctstimeout += 48 - sifstime - ah->slottime; | ||
1048 | } | ||
1049 | |||
1047 | 1050 | ||
1048 | ath9k_hw_set_sifs_time(ah, sifstime); | 1051 | ath9k_hw_set_sifs_time(ah, sifstime); |
1049 | ath9k_hw_setslottime(ah, slottime); | 1052 | ath9k_hw_setslottime(ah, slottime); |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index abf943557dee..53a005d288aa 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -822,6 +822,11 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
822 | ARRAY_SIZE(ath9k_tpt_blink)); | 822 | ARRAY_SIZE(ath9k_tpt_blink)); |
823 | #endif | 823 | #endif |
824 | 824 | ||
825 | INIT_WORK(&sc->hw_reset_work, ath_reset_work); | ||
826 | INIT_WORK(&sc->hw_check_work, ath_hw_check); | ||
827 | INIT_WORK(&sc->paprd_work, ath_paprd_calibrate); | ||
828 | INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work); | ||
829 | |||
825 | /* Register with mac80211 */ | 830 | /* Register with mac80211 */ |
826 | error = ieee80211_register_hw(hw); | 831 | error = ieee80211_register_hw(hw); |
827 | if (error) | 832 | if (error) |
@@ -840,10 +845,6 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
840 | goto error_world; | 845 | goto error_world; |
841 | } | 846 | } |
842 | 847 | ||
843 | INIT_WORK(&sc->hw_reset_work, ath_reset_work); | ||
844 | INIT_WORK(&sc->hw_check_work, ath_hw_check); | ||
845 | INIT_WORK(&sc->paprd_work, ath_paprd_calibrate); | ||
846 | INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work); | ||
847 | sc->last_rssi = ATH_RSSI_DUMMY_MARKER; | 848 | sc->last_rssi = ATH_RSSI_DUMMY_MARKER; |
848 | 849 | ||
849 | ath_init_leds(sc); | 850 | ath_init_leds(sc); |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index b3c3798fe513..635b592ad961 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -694,7 +694,7 @@ static u8 ath_rc_get_highest_rix(struct ath_softc *sc, | |||
694 | return rate; | 694 | return rate; |
695 | 695 | ||
696 | /* This should not happen */ | 696 | /* This should not happen */ |
697 | WARN_ON(1); | 697 | WARN_ON_ONCE(1); |
698 | 698 | ||
699 | rate = ath_rc_priv->valid_rate_index[0]; | 699 | rate = ath_rc_priv->valid_rate_index[0]; |
700 | 700 | ||
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 0e666fbe0842..7e1a91af1497 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -822,6 +822,14 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
822 | (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC | | 822 | (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC | |
823 | ATH9K_RXERR_KEYMISS)); | 823 | ATH9K_RXERR_KEYMISS)); |
824 | 824 | ||
825 | /* | ||
826 | * Key miss events are only relevant for pairwise keys where the | ||
827 | * descriptor does contain a valid key index. This has been observed | ||
828 | * mostly with CCMP encryption. | ||
829 | */ | ||
830 | if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID) | ||
831 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; | ||
832 | |||
825 | if (!rx_stats->rs_datalen) | 833 | if (!rx_stats->rs_datalen) |
826 | return false; | 834 | return false; |
827 | /* | 835 | /* |
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index e05b417a3fae..1d0ec57a0143 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c | |||
@@ -382,7 +382,8 @@ mwifiex_free_adapter(struct mwifiex_adapter *adapter) | |||
382 | 382 | ||
383 | adapter->if_ops.cleanup_if(adapter); | 383 | adapter->if_ops.cleanup_if(adapter); |
384 | 384 | ||
385 | dev_kfree_skb_any(adapter->sleep_cfm); | 385 | if (adapter->sleep_cfm) |
386 | dev_kfree_skb_any(adapter->sleep_cfm); | ||
386 | } | 387 | } |
387 | 388 | ||
388 | /* | 389 | /* |
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 84be196188cc..b728f54451e4 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -822,7 +822,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) | |||
822 | continue; | 822 | continue; |
823 | 823 | ||
824 | rtnl_lock(); | 824 | rtnl_lock(); |
825 | mwifiex_del_virtual_intf(priv->wdev->wiphy, priv->netdev); | 825 | if (priv->wdev && priv->netdev) |
826 | mwifiex_del_virtual_intf(priv->wdev->wiphy, | ||
827 | priv->netdev); | ||
826 | rtnl_unlock(); | 828 | rtnl_unlock(); |
827 | } | 829 | } |
828 | 830 | ||
@@ -830,9 +832,11 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) | |||
830 | if (!priv) | 832 | if (!priv) |
831 | goto exit_remove; | 833 | goto exit_remove; |
832 | 834 | ||
833 | wiphy_unregister(priv->wdev->wiphy); | 835 | if (priv->wdev) { |
834 | wiphy_free(priv->wdev->wiphy); | 836 | wiphy_unregister(priv->wdev->wiphy); |
835 | kfree(priv->wdev); | 837 | wiphy_free(priv->wdev->wiphy); |
838 | kfree(priv->wdev); | ||
839 | } | ||
836 | 840 | ||
837 | mwifiex_terminate_workqueue(adapter); | 841 | mwifiex_terminate_workqueue(adapter); |
838 | 842 | ||
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 470ca75ec250..b0fbf5d4fea0 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -54,7 +54,7 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist, | |||
54 | int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) | 54 | int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) |
55 | { | 55 | { |
56 | bool cancel_flag = false; | 56 | bool cancel_flag = false; |
57 | int status = adapter->cmd_wait_q.status; | 57 | int status; |
58 | struct cmd_ctrl_node *cmd_queued; | 58 | struct cmd_ctrl_node *cmd_queued; |
59 | 59 | ||
60 | if (!adapter->cmd_queued) | 60 | if (!adapter->cmd_queued) |
@@ -79,6 +79,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) | |||
79 | mwifiex_cancel_pending_ioctl(adapter); | 79 | mwifiex_cancel_pending_ioctl(adapter); |
80 | dev_dbg(adapter->dev, "cmd cancel\n"); | 80 | dev_dbg(adapter->dev, "cmd cancel\n"); |
81 | } | 81 | } |
82 | |||
83 | status = adapter->cmd_wait_q.status; | ||
82 | adapter->cmd_wait_q.status = 0; | 84 | adapter->cmd_wait_q.status = 0; |
83 | 85 | ||
84 | return status; | 86 | return status; |
@@ -240,6 +242,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
240 | 242 | ||
241 | if (!netif_queue_stopped(priv->netdev)) | 243 | if (!netif_queue_stopped(priv->netdev)) |
242 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); | 244 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); |
245 | if (netif_carrier_ok(priv->netdev)) | ||
246 | netif_carrier_off(priv->netdev); | ||
243 | 247 | ||
244 | /* Clear any past association response stored for | 248 | /* Clear any past association response stored for |
245 | * application retrieval */ | 249 | * application retrieval */ |
@@ -271,6 +275,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
271 | 275 | ||
272 | if (!netif_queue_stopped(priv->netdev)) | 276 | if (!netif_queue_stopped(priv->netdev)) |
273 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); | 277 | mwifiex_stop_net_dev_queue(priv->netdev, adapter); |
278 | if (netif_carrier_ok(priv->netdev)) | ||
279 | netif_carrier_off(priv->netdev); | ||
274 | 280 | ||
275 | if (!ret) { | 281 | if (!ret) { |
276 | dev_dbg(adapter->dev, "info: network found in scan" | 282 | dev_dbg(adapter->dev, "info: network found in scan" |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 0a70149df3fc..98a574a4a465 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -866,6 +866,14 @@ static int fill_ctrlset(struct zd_mac *mac, | |||
866 | 866 | ||
867 | ZD_ASSERT(frag_len <= 0xffff); | 867 | ZD_ASSERT(frag_len <= 0xffff); |
868 | 868 | ||
869 | /* | ||
870 | * Firmware computes the duration itself (for all frames except PSPoll) | ||
871 | * and needs the field set to 0 at input, otherwise firmware messes up | ||
872 | * duration_id and sets bits 14 and 15 on. | ||
873 | */ | ||
874 | if (!ieee80211_is_pspoll(hdr->frame_control)) | ||
875 | hdr->duration_id = 0; | ||
876 | |||
869 | txrate = ieee80211_get_tx_rate(mac->hw, info); | 877 | txrate = ieee80211_get_tx_rate(mac->hw, info); |
870 | 878 | ||
871 | cs->modulation = txrate->hw_value; | 879 | cs->modulation = txrate->hw_value; |