提交 a87da0cb 编写于 作者: J Johannes Berg

mac80211: suppress unchanged "limiting TX power" messages

When the AP is advertising limited TX power, the message can be
printed over and over again. Suppress it when the power level
isn't changing.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=106011Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 1ea2c864
...@@ -1379,21 +1379,26 @@ static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata, ...@@ -1379,21 +1379,26 @@ static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
*/ */
if (has_80211h_pwr && if (has_80211h_pwr &&
(!has_cisco_pwr || pwr_level_80211h <= pwr_level_cisco)) { (!has_cisco_pwr || pwr_level_80211h <= pwr_level_cisco)) {
new_ap_level = pwr_level_80211h;
if (sdata->ap_power_level == new_ap_level)
return 0;
sdata_dbg(sdata, sdata_dbg(sdata,
"Limiting TX power to %d (%d - %d) dBm as advertised by %pM\n", "Limiting TX power to %d (%d - %d) dBm as advertised by %pM\n",
pwr_level_80211h, chan_pwr, pwr_reduction_80211h, pwr_level_80211h, chan_pwr, pwr_reduction_80211h,
sdata->u.mgd.bssid); sdata->u.mgd.bssid);
new_ap_level = pwr_level_80211h;
} else { /* has_cisco_pwr is always true here. */ } else { /* has_cisco_pwr is always true here. */
new_ap_level = pwr_level_cisco;
if (sdata->ap_power_level == new_ap_level)
return 0;
sdata_dbg(sdata, sdata_dbg(sdata,
"Limiting TX power to %d dBm as advertised by %pM\n", "Limiting TX power to %d dBm as advertised by %pM\n",
pwr_level_cisco, sdata->u.mgd.bssid); pwr_level_cisco, sdata->u.mgd.bssid);
new_ap_level = pwr_level_cisco;
} }
if (sdata->ap_power_level == new_ap_level)
return 0;
sdata->ap_power_level = new_ap_level; sdata->ap_power_level = new_ap_level;
if (__ieee80211_recalc_txpower(sdata)) if (__ieee80211_recalc_txpower(sdata))
return BSS_CHANGED_TXPOWER; return BSS_CHANGED_TXPOWER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册