Skip to content
  • Felix Fietkau's avatar
    cfg80211: fix antenna gain handling · c4a9fafc
    Felix Fietkau authored
    
    
    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: default avatarFelix Fietkau <nbd@openwrt.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    c4a9fafc