All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tomislav Požega" <pozega.tomislav@gmail.com>
To: sgruszka@redhat.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/5] rt2x00: set registers based on current band
Date: Tue, 18 Sep 2018 16:14:33 +0200	[thread overview]
Message-ID: <1537280073-9873-1-git-send-email-pozega.tomislav@gmail.com> (raw)
In-Reply-To: <20180918122015.GB15481@redhat.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1509 bytes --]

On Tue, 18 Sep 2018 14:20:16 +0200, Stanislaw Gruszka wrote:

>On Mon, Sep 17, 2018 at 06:32:51PM +0200, Tomislav Požega wrote:
>> Use curr_band instead of rf->channel among various subroutines -
>> mostly for 2.4GHz band but in some circumstances for 5GHz band too.
>
>What is the reason for that change ?

Operating band should be fetched from device capabilities, not from userspace
variables. More changes will needed to be made to accomplish that.

>
>> @@ -9265,8 +9278,9 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
>>  	if (WARN_ON_ONCE(!spec->channels))
>>  		return -ENODEV;
>>  
>> -	spec->supported_bands = SUPPORT_BAND_2GHZ;
>> -	if (spec->num_channels > 14)
>> +	if (rt2x00dev->curr_band == NL80211_BAND_2GHZ)
>> +		spec->supported_bands = SUPPORT_BAND_2GHZ;
>> +	if (rt2x00dev->curr_band == NL80211_BAND_5GHZ)
>>  		spec->supported_bands |= SUPPORT_BAND_5GHZ;
>>  
>>  	/*
>> @@ -9336,7 +9350,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
>>  			info[i].default_power3 = default_power3[i];
>>  	}
>>  
>> -	if (spec->num_channels > 14) {
>> +	if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
>>  		default_power1 = rt2800_eeprom_addr(rt2x00dev,
>>  						    EEPROM_TXPOWER_A1);
>>  		default_power2 = rt2800_eeprom_addr(rt2x00dev,
>
>Above looks wrong.
>
>Thanks
>Stanislaw

Worked fine when I tried run two USB cards (RT3070-RF0005, RT5390-RF5370).
Why do you think it's wrong? Is there a dual-band card that operates on
both bands at the same time?

  reply	other threads:[~2018-09-18 19:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 16:32 [PATCH 1/5] rt2x00: set registers based on current band Tomislav Požega
2018-09-17 16:32 ` [PATCH 2/5] rt2x00: rework channel config function Tomislav Požega
2018-09-18 12:22   ` Stanislaw Gruszka
2018-10-09 10:57   ` Stanislaw Gruszka
2018-09-17 16:32 ` [PATCH 3/5] rt2x00: remove unneeded check Tomislav Požega
2018-09-17 16:32 ` [PATCH 4/5] rt2x00: remove confusing AGC register Tomislav Požega
2018-09-17 16:32 ` [PATCH 5/5] rt2x00: update TX_SW_CFG2 value Tomislav Požega
2018-09-18 12:20 ` [PATCH 1/5] rt2x00: set registers based on current band Stanislaw Gruszka
2018-09-18 14:14   ` Tomislav Požega [this message]
2018-09-19 11:05     ` Stanislaw Gruszka
2018-09-19 12:17       ` Tomislav Požega
2018-09-19 12:47         ` Stanislaw Gruszka
2018-09-19 13:04           ` Stanislaw Gruszka
2018-09-29  9:26             ` Tom Psyborg
2018-10-09 11:00 ` Stanislaw Gruszka
2018-10-09 22:14   ` Tom Psyborg
2018-10-10  8:49     ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537280073-9873-1-git-send-email-pozega.tomislav@gmail.com \
    --to=pozega.tomislav@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.