source: branches/backfire/package/mac80211/patches/554-ath9k_test_txpower.patch @ 27865

Last change on this file since 27865 was 27865, checked in by nbd, 5 years ago

mac80211: backport latest changes from trunk

File size: 841 bytes
  • drivers/net/wireless/ath/ath9k/hw.c

    a b void ath9k_hw_set_txpowerlimit(struct at 
    24422442        struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 
    24432443        struct ath9k_channel *chan = ah->curchan; 
    24442444        struct ieee80211_channel *channel = chan->chan; 
     2445        int reg_pwr = min_t(int, MAX_RATE_POWER, regulatory->power_limit); 
     2446        int chan_pwr = channel->max_power * 2; 
     2447 
     2448        if (test) 
     2449                reg_pwr = chan_pwr = MAX_RATE_POWER; 
    24452450 
    24462451        regulatory->power_limit = min(limit, (u32) MAX_RATE_POWER); 
    24472452 
    24482453        ah->eep_ops->set_txpower(ah, chan, 
    24492454                                 ath9k_regd_get_ctl(regulatory, chan), 
    24502455                                 channel->max_antenna_gain * 2, 
    2451                                  channel->max_power * 2, 
    2452                                  min((u32) MAX_RATE_POWER, 
    2453                                  (u32) regulatory->power_limit), test); 
     2456                                 chan_pwr, reg_pwr, test); 
    24542457} 
    24552458EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit); 
    24562459 
Note: See TracBrowser for help on using the repository browser.