On Thu, May 28, 2009 at 1:17 PM, Bob Copeland <m...@bobcopeland.com> wrote:
> On Thu, May 28, 2009 at 02:48:23AM -0300, omniprese...@wired?? wrote:
>> The output of 'iw reg get' is:
>>
>> country 98:
>>       (2402 - 2472 @ 40), (N/A, 20)
> [...]
>
>> And I change it with iw reg set US so I can get 27 dBm.
>>
>> iw reg get
>> country US:
>>       (2402 - 2472 @ 40), (3, 27)
> [...]
>
>> This part is the output: of iw list
>> Wiphy phy1
>>       Band 1:
>>               Frequencies:
>>                       * 2412 MHz [1] (20.0 dBm)
>>                       * 2417 MHz [2] (20.0 dBm)
>
> Hmm, good point.  Looks like "iw reg set" retains the original power
> setting.  I would suspect reg.c:handle_channel() using
> min(chan->orig_pwr, xxx), but I don't know the reasoning behind that.
> Luis?

That is correct, orig_pwr is always respected. In ath5k/ath9k/ar9170's
case we originally set this based on the custom world regulatory
domain. Then the only way this orig_pwr changes is if the driver
actually has a regulatory hint for a country.

That is (taking code from ath.ko to show this in pseudo code)

wiphy->strict_regulatory = true;

if (ath_is_world_regd(reg))
  wiphy->strict_regulatory = false;

Then handle_channel() has this piece:

        if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
            request_wiphy && request_wiphy == wiphy &&
            request_wiphy->strict_regulatory) {
                /*
                 * This gaurantees the driver's requested regulatory domain
                 * will always be used as a base for further regulatory
                 * settings
                 */
                chan->flags = chan->orig_flags =
                        map_regdom_flags(reg_rule->flags) | bw_flags;
                chan->max_antenna_gain = chan->orig_mag =
                        (int) MBI_TO_DBI(power_rule->max_antenna_gain);
                chan->max_bandwidth = KHZ_TO_MHZ(desired_bw_khz);
                chan->max_power = chan->orig_mpwr =
                        (int) MBM_TO_DBM(power_rule->max_eirp);
                return;
        }

So in short, if you have a card configured to world roam, then setting
your regulatory domain to US will only help you comply further, it
will not amp your TX power settings. The EEPROM settings are
respected.

  Luis
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to