Skip to content
Commit 04b7b2ff authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: handle power constraint/country IE better



Currently, mac80211 uses the power constraint IE, and reduces
the regulatory max TX power by it. This can cause issues if
the AP is advertising a large power constraint value matching
a high TX power in its country IE, for example in this case:

...
Country: US  Environment: Indoor/Outdoor
    ...
    Channels [157 - 157] @ 30 dBm
    ...
Power constraint: 13 dB
...

What happened here is that our local regulatory TX power is
15 dBm, and gets reduced by 13 dB so we end up with only
2 dBm effective TX power, which is way too low.

Instead, handle the country IE/power constraint IE combined
and restrict our TX power to the max of the regulatory power
and the maximum power advertised by the AP, in this case
17 dBm (= 30 dBm - 13 dB).

Also print a message when this happens to let the user know
and help us debug issues with it.

Reported-by: default avatarCarl A. Cook <CACook@quantum-equities.com>
Tested-by: default avatarCarl A. Cook <CACook@quantum-equities.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3a6a0d8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment