···22802280 int i;22812281 bool needreset = false;2282228222832283+ mutex_lock(&sc->lock);22842284+22832285 for (i = 0; i < ARRAY_SIZE(sc->txqs); i++) {22842286 if (sc->txqs[i].setup) {22852287 txq = &sc->txqs[i];···23082306 "TX queues stuck, resetting\n");23092307 ath5k_reset(sc, NULL, true);23102308 }23092309+23102310+ mutex_unlock(&sc->lock);2311231123122312 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,23132313 msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT));
+2-2
drivers/net/wireless/ath/ath5k/dma.c
···838838 for (i = 0; i < qmax; i++) {839839 err = ath5k_hw_stop_tx_dma(ah, i);840840 /* -EINVAL -> queue inactive */841841- if (err != -EINVAL)841841+ if (err && err != -EINVAL)842842 return err;843843 }844844845845- return err;845845+ return 0;846846}
+1-3
drivers/net/wireless/ath/ath5k/pcu.c
···8686 if (!ah->ah_bwmode) {8787 dur = ieee80211_generic_frame_duration(sc->hw,8888 NULL, len, rate);8989- return dur;8989+ return le16_to_cpu(dur);9090 }91919292 bitrate = rate->bitrate;···264264 * ieee80211_duration() for a brief description of265265 * what rate we should choose to TX ACKs. */266266 tx_time = ath5k_hw_get_frame_duration(ah, 10, rate);267267-268268- tx_time = le16_to_cpu(tx_time);269267270268 ath5k_hw_reg_write(ah, tx_time, reg);271269
+5-5
drivers/net/wireless/ath/ath9k/ar9002_calib.c
···679679680680 /* Do NF cal only at longer intervals */681681 if (longcal || nfcal_pending) {682682- /* Do periodic PAOffset Cal */683683- ar9002_hw_pa_cal(ah, false);684684- ar9002_hw_olc_temp_compensation(ah);685685-686682 /*687683 * Get the value from the previous NF cal and update688684 * history buffer.···693697 ath9k_hw_loadnf(ah, ah->curchan);694698 }695699696696- if (longcal)700700+ if (longcal) {697701 ath9k_hw_start_nfcal(ah, false);702702+ /* Do periodic PAOffset Cal */703703+ ar9002_hw_pa_cal(ah, false);704704+ ar9002_hw_olc_temp_compensation(ah);705705+ }698706 }699707700708 return iscaldone;
+1-2
drivers/net/wireless/ath/ath9k/ar9002_hw.c
···426426 }427427428428 /* WAR for ASPM system hang */429429- if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) {429429+ if (AR_SREV_9285(ah) || AR_SREV_9287(ah))430430 val |= (AR_WA_BIT6 | AR_WA_BIT7);431431- }432431433432 if (AR_SREV_9285E_20(ah))434433 val |= AR_WA_BIT23;
···611611 u32 status = sc->intrstatus;612612 u32 rxmask;613613614614- ath9k_ps_wakeup(sc);615615-616614 if (status & ATH9K_INT_FATAL) {617615 ath_reset(sc, true);618618- ath9k_ps_restore(sc);619616 return;620617 }621618619619+ ath9k_ps_wakeup(sc);622620 spin_lock(&sc->sc_pcu_lock);623621624622 /*···937939938940 spin_unlock_bh(&sc->sc_pcu_lock);939941 ath9k_ps_restore(sc);940940-941941- ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);942942}943943944944int ath_reset(struct ath_softc *sc, bool retry_tx)···949953 /* Stop ANI */950954 del_timer_sync(&common->ani.timer);951955956956+ ath9k_ps_wakeup(sc);952957 spin_lock_bh(&sc->sc_pcu_lock);953958954959 ieee80211_stop_queues(hw);···9969999971000 /* Start ANI */9981001 ath_start_ani(common);10021002+ ath9k_ps_restore(sc);999100310001004 return r;10011005}···1218122012191221 spin_lock_bh(&sc->sc_pcu_lock);1220122212231223+ /* prevent tasklets to enable interrupts once we disable them */12241224+ ah->imask &= ~ATH9K_INT_GLOBAL;12251225+12211226 /* make sure h/w will not generate any interrupt12221227 * before setting the invalid flag. */12231228 ath9k_hw_disable_interrupts(ah);···12421241 ath9k_hw_configpcipowersave(ah, 1, 1);1243124212441243 spin_unlock_bh(&sc->sc_pcu_lock);12441244+12451245+ /* we can now sync irq and kill any running tasklets, since we already12461246+ * disabled interrupts and not holding a spin lock */12471247+ synchronize_irq(sc->irq);12481248+ tasklet_kill(&sc->intr_tq);12491249+ tasklet_kill(&sc->bcon_tasklet);1245125012461251 ath9k_ps_restore(sc);12471252···1713170617141707 if (changed & IEEE80211_CONF_CHANGE_POWER) {17151708 sc->config.txpowlimit = 2 * conf->power_level;17091709+ ath9k_ps_wakeup(sc);17161710 ath_update_txpow(sc);17111711+ ath9k_ps_restore(sc);17171712 }1718171317191714 if (disable_radio) {
-2
drivers/net/wireless/ath/ath9k/xmit.c
···21732173 if (needreset) {21742174 ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,21752175 "tx hung, resetting the chip\n");21762176- ath9k_ps_wakeup(sc);21772176 ath_reset(sc, true);21782178- ath9k_ps_restore(sc);21792177 }2180217821812179 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
···11641164 * initiator rfcomm_process_rx already calls11651165 * rfcomm_session_put() */11661166 if (s->sock->sk->sk_state != BT_CLOSED)11671167- rfcomm_session_put(s);11671167+ if (list_empty(&s->dlcs))11681168+ rfcomm_session_put(s);11681169 break;11691170 }11701171 }
+2-9
net/mac80211/agg-rx.c
···185185 struct ieee80211_mgmt *mgmt,186186 size_t len)187187{188188- struct ieee80211_hw *hw = &local->hw;189189- struct ieee80211_conf *conf = &hw->conf;190188 struct tid_ampdu_rx *tid_agg_rx;191189 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status;192190 u8 dialog_token;···229231 goto end_no_lock;230232 }231233 /* determine default buffer size */232232- if (buf_size == 0) {233233- struct ieee80211_supported_band *sband;234234-235235- sband = local->hw.wiphy->bands[conf->channel->band];236236- buf_size = IEEE80211_MIN_AMPDU_BUF;237237- buf_size = buf_size << sband->ht_cap.ampdu_factor;238238- }234234+ if (buf_size == 0)235235+ buf_size = IEEE80211_MAX_AMPDU_BUF;239236240237 /* make sure the size doesn't exceed the maximum supported by the hw */241238 if (buf_size > local->hw.max_rx_aggregation_subframes)
+11-1
net/mac80211/main.c
···3939MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz,4040 "Disable 40MHz support in the 2.4GHz band");41414242+static struct lock_class_key ieee80211_rx_skb_queue_class;4343+4244void ieee80211_configure_filter(struct ieee80211_local *local)4345{4446 u64 mc;···572570 spin_lock_init(&local->filter_lock);573571 spin_lock_init(&local->queue_stop_reason_lock);574572575575- skb_queue_head_init(&local->rx_skb_queue);573573+ /*574574+ * The rx_skb_queue is only accessed from tasklets,575575+ * but other SKB queues are used from within IRQ576576+ * context. Therefore, this one needs a different577577+ * locking class so our direct, non-irq-safe use of578578+ * the queue's lock doesn't throw lockdep warnings.579579+ */580580+ skb_queue_head_init_class(&local->rx_skb_queue,581581+ &ieee80211_rx_skb_queue_class);576582577583 INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work);578584