]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix antenna gain handling
authorFelix Fietkau <nbd@openwrt.org>
Wed, 17 Oct 2012 11:56:19 +0000 (13:56 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 18 Oct 2012 15:18:48 +0000 (17:18 +0200)
commitc73599c438a813ed9c4ea227f5b139f19dd8e595
tree832d356c9d574e5fb678368b13ad521547184881
parent19471fa079d1505b6aa2d370f41ace6e4e8d5a30
cfg80211: fix antenna gain handling

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>
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c