]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cfg80211: fix antenna gain handling
authorFelix Fietkau <nbd@openwrt.org>
Wed, 17 Oct 2012 11:56:19 +0000 (13:56 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:53 +0000 (16:46 +0000)
commitc54acd7da1a73f24ceb15c0edc92a5f8d3b09b23
tree8a23ef2e1117d200441de29b94c95cda726cc07c
parent5a7b9047f5512e10e6ef89cd36e5b572bf13f60e
cfg80211: fix antenna gain handling

commit c4a9fafc77a5318f5ed26c509bbcddf03e18c201 upstream.

No driver initializes chan->max_antenna_gain to something sensible, and
the only place where it is being used right now is inside ath9k. This
leads to ath9k potentially using less tx power than it can use, which can
decrease performance/range in some rare cases.

Rather than going through every single driver, this patch initializes
chan->orig_mag in wiphy_register(), ignoring whatever value the driver
left in there. If a driver for some reason wishes to limit it independent
from regulatory rulesets, it can do so internally.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/wireless/core.c