12

I am connecting to eduroam over a distance of about 150m using an external 23dBm Antenna and an Ubiquiti SR71-E with an Atheros AR9285 chip. My system is Debian Jessie server - so the connection is managed by wpa_supplicant. Authentication timeouts caused stability issues with the connection. Migrating to the backports Kernel 4.7.0 solved these.

But now the kernel is reducing tx-power as advertised by the (Cisco) AP. This function can be found under "has_80211h_pwr" and "has_cisco_pwr" in

http://lxr.free-electrons.com/source/net/mac80211/mlme.c

The problem is that iwconfig wlan0 txpower XX iw dev wlan0 set txpower fixed XXXX only allow setting the txpower between 0 and the new limit. As the AP advertises a limit of 8dbm the connection is forced to go to 1 Mb/s and still has high counts on "Tx excessive retries" and "Invalid misc".

Felix
  • 121

1 Answers1

3

Here's a patch that should ignore annoying 802.11h frames from AP's when setting txpower to "fixed".

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index d6a1a46..f3ee9ab 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -61,7 +61,8 @@  bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
    if (sdata->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
        power = min(power, sdata->user_power_level);

-   if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
+   if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL &&
+       sdata->vif.bss_conf.txpower_type != NL80211_TX_POWER_FIXED)
        power = min(power, sdata->ap_power_level);

    if (power != sdata->vif.bss_conf.txpower) {