hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/ath/ath9k/hw.c
....@@ -457,7 +457,7 @@
457457 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
458458
459459 regulatory->country_code = CTRY_DEFAULT;
460
- regulatory->power_limit = MAX_RATE_POWER;
460
+ regulatory->power_limit = MAX_COMBINED_POWER;
461461
462462 ah->hw_version.magic = AR5416_MAGIC;
463463 ah->hw_version.subvendorid = 0;
....@@ -1277,12 +1277,12 @@
12771277 REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
12781278 break;
12791279 }
1280
- /* fall through */
1280
+ fallthrough;
12811281 case NL80211_IFTYPE_OCB:
12821282 case NL80211_IFTYPE_MESH_POINT:
12831283 case NL80211_IFTYPE_AP:
12841284 set |= AR_STA_ID1_STA_AP;
1285
- /* fall through */
1285
+ fallthrough;
12861286 case NL80211_IFTYPE_STATION:
12871287 REG_CLR_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
12881288 break;
....@@ -2292,6 +2292,7 @@
22922292 case NL80211_IFTYPE_ADHOC:
22932293 REG_SET_BIT(ah, AR_TXCFG,
22942294 AR_TXCFG_ADHOC_BEACON_ATIM_TX_POLICY);
2295
+ fallthrough;
22952296 case NL80211_IFTYPE_MESH_POINT:
22962297 case NL80211_IFTYPE_AP:
22972298 REG_WRITE(ah, AR_NEXT_TBTT_TIMER, next_beacon);
....@@ -2408,7 +2409,7 @@
24082409 * of tests. The testing requirements are going to be documented. Desired
24092410 * test requirements are documented at:
24102411 *
2411
- * http://wireless.kernel.org/en/users/Drivers/ath9k/dfs
2412
+ * https://wireless.wiki.kernel.org/en/users/Drivers/ath9k/dfs
24122413 *
24132414 * Once a new chipset gets properly tested an individual commit can be used
24142415 * to document the testing for DFS for that chipset.
....@@ -2967,7 +2968,7 @@
29672968 ctl = ath9k_regd_get_ctl(reg, chan);
29682969
29692970 channel = chan->chan;
2970
- chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
2971
+ chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER);
29712972 new_pwr = min_t(int, chan_pwr, reg->power_limit);
29722973
29732974 ah->eep_ops->set_txpower(ah, chan, ctl,
....@@ -2980,9 +2981,9 @@
29802981 struct ath9k_channel *chan = ah->curchan;
29812982 struct ieee80211_channel *channel = chan->chan;
29822983
2983
- reg->power_limit = min_t(u32, limit, MAX_RATE_POWER);
2984
+ reg->power_limit = min_t(u32, limit, MAX_COMBINED_POWER);
29842985 if (test)
2985
- channel->max_power = MAX_RATE_POWER / 2;
2986
+ channel->max_power = MAX_COMBINED_POWER / 2;
29862987
29872988 ath9k_hw_apply_txpower(ah, chan, test);
29882989