hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/wireless/ath/ath9k/init.c
....@@ -230,7 +230,7 @@
230230 struct ath_hw *ah = hw_priv;
231231 struct ath_common *common = ath9k_hw_common(ah);
232232 struct ath_softc *sc = (struct ath_softc *) common->priv;
233
- unsigned long uninitialized_var(flags);
233
+ unsigned long flags;
234234 u32 val;
235235
236236 if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) {
....@@ -642,7 +642,7 @@
642642 }
643643
644644 mac = of_get_mac_address(np);
645
- if (mac)
645
+ if (!IS_ERR(mac))
646646 ether_addr_copy(common->macaddr, mac);
647647
648648 return 0;
....@@ -676,8 +676,6 @@
676676
677677 /* Will be cleared in ath9k_start() */
678678 set_bit(ATH_OP_INVALID, &common->op_flags);
679
- sc->airtime_flags = (AIRTIME_USE_TX | AIRTIME_USE_RX |
680
- AIRTIME_USE_NEW_QUEUES);
681679
682680 sc->sc_ah = ah;
683681 sc->dfs_detector = dfs_pattern_detector_init(common, NL80211_DFS_UNSET);
....@@ -730,9 +728,8 @@
730728 spin_lock_init(&sc->sc_pm_lock);
731729 spin_lock_init(&sc->chan_lock);
732730 mutex_init(&sc->mutex);
733
- tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);
734
- tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet,
735
- (unsigned long)sc);
731
+ tasklet_setup(&sc->intr_tq, ath9k_tasklet);
732
+ tasklet_setup(&sc->bcon_tasklet, ath9k_beacon_tasklet);
736733
737734 timer_setup(&sc->sleep_timer, ath_ps_full_sleep, 0);
738735 INIT_WORK(&sc->hw_reset_work, ath_reset_work);
....@@ -807,7 +804,7 @@
807804 ah->curchan = &ah->channels[chan->hw_value];
808805 cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20);
809806 ath9k_cmn_get_channel(sc->hw, ah, &chandef);
810
- ath9k_hw_set_txpowerlimit(ah, MAX_RATE_POWER, true);
807
+ ath9k_hw_set_txpowerlimit(ah, MAX_COMBINED_POWER, true);
811808 }
812809 }
813810
....@@ -1013,6 +1010,10 @@
10131010 SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
10141011
10151012 wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
1013
+ wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
1014
+ wiphy_ext_feature_set(hw->wiphy,
1015
+ NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
1016
+ wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
10161017 }
10171018
10181019 int ath9k_init_device(u16 devid, struct ath_softc *sc,