* Re: Alfa AWUS036NHR with RTL8188RU chipset
From: v4mp @ 2011-10-15 14:22 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <4E91B400.1020305@lwfinger.net>
i've tried also kernel 3.1-rc9 with latest compat wireless 14-10-2011 and still
don't work...it was recognized but no APs can be detected..the led of the alfa
is off..seems that it is power off..
i don't know about firmware, i see that there are .bin on lib/firmware/rtlwifi..
how can i update them?
thx
^ permalink raw reply
* Re: [PATCH] ssb: Convert to use crc8 code in kernel library
From: Larry Finger @ 2011-10-15 14:18 UTC (permalink / raw)
To: Michael Büsch
Cc: Arend van Spriel, Pavel Roskin, John W Linville, Michael Buesch,
zajec5@gmail.com, b43-dev@lists.infradead.org,
linux-wireless@vger.kernel.org
In-Reply-To: <20111015155306.6bd1e695@milhouse>
On 10/15/2011 08:53 AM, Michael Büsch wrote:
> On Sat, 15 Oct 2011 08:29:05 -0500
> Larry Finger<Larry.Finger@lwfinger.net> wrote:
>
>>> I plan to fill the buffer using 8-bit reads from SPROM,
>
>> That sounds like a good plan. When that is posted, I'll study if that kind of
>> change makes sense for ssb.
>
> If this change is made, it has to be tested on all supported devices, IMO.
> I would not be surprised if there are older devices that don't like that.
Two of my devices are a BCM4303 (14e4:4301), and an early BCM4306. There are not
likely to be any older than that.
Larry
^ permalink raw reply
* Re: [PATCH] ssb: Convert to use crc8 code in kernel library
From: Michael Büsch @ 2011-10-15 13:53 UTC (permalink / raw)
To: Larry Finger
Cc: Arend van Spriel, Pavel Roskin, John W Linville, Michael Buesch,
zajec5@gmail.com, b43-dev@lists.infradead.org,
linux-wireless@vger.kernel.org
In-Reply-To: <4E998AA1.4080907@lwfinger.net>
On Sat, 15 Oct 2011 08:29:05 -0500
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> > I plan to fill the buffer using 8-bit reads from SPROM,
> That sounds like a good plan. When that is posted, I'll study if that kind of
> change makes sense for ssb.
If this change is made, it has to be tested on all supported devices, IMO.
I would not be surprised if there are older devices that don't like that.
--
Greetings, Michael.
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 13:41 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+8b9cqc6BgvaF8vdq-CywJ7mNTVpeXz92ZvwJwefJOkA@mail.gmail.com>
And the last question...
Can you confirm that after setting antenna configuration to 1x1 I can
safely detach 2nd physical connector from the adapter? I mean is there
a guarantees that device will only use the 1st antenna.
2011/10/15 Stanislav Demakov <s.demakov@gmail.com>:
> I've found it. Hostapd was the reason. After killing it set antenna works.
> Thanks. :)
>
> 2011/10/15 Felix Fietkau <nbd@openwrt.org>:
>> On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
>>>
>>> I'm running Ubuntu Server 11.10 - (kernel: Linux server
>>> 3.0.0-12-generic x86_64)
>>>
>>> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
>>> with libnl1.
>>>
>>> The wireless chip is AR9280. (2x2 MIMO)
>>>
>>> Also
>>> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
>>> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
>>> is written at boot.
>>>
>>> Is something wrong above?
>>
>> Do not mess with the rx_chainmask/tx_chainmask parameters, that may be the
>> reason why it's not working for you.
>>
>> - Felix
>>
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 13:34 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <4E997F13.7060602@openwrt.org>
I've found it. Hostapd was the reason. After killing it set antenna works.
Thanks. :)
2011/10/15 Felix Fietkau <nbd@openwrt.org>:
> On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
>>
>> I'm running Ubuntu Server 11.10 - (kernel: Linux server
>> 3.0.0-12-generic x86_64)
>>
>> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
>> with libnl1.
>>
>> The wireless chip is AR9280. (2x2 MIMO)
>>
>> Also
>> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
>> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
>> is written at boot.
>>
>> Is something wrong above?
>
> Do not mess with the rx_chainmask/tx_chainmask parameters, that may be the
> reason why it's not working for you.
>
> - Felix
>
^ permalink raw reply
* Re: [PATCH] ssb: Convert to use crc8 code in kernel library
From: Larry Finger @ 2011-10-15 13:29 UTC (permalink / raw)
To: Arend van Spriel
Cc: Pavel Roskin, John W Linville, Michael Buesch, zajec5@gmail.com,
b43-dev@lists.infradead.org, linux-wireless@vger.kernel.org
In-Reply-To: <4E9943D5.1060607@broadcom.com>
On 10/15/2011 03:27 AM, Arend van Spriel wrote:
>
> Feedback on the renaming is indeed valid. Passing the word count is
> better here. For brcmsmac I plan to fill the buffer using 8-bit reads
> from SPROM, verify the crc8, and perform the endianess conversion from
> le16 to cpu when crc is ok (actually under review internally).
That sounds like a good plan. When that is posted, I'll study if that kind of
change makes sense for ssb.
Larry
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Felix Fietkau @ 2011-10-15 12:39 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzdLBxCB7U1+ig+ctPJKZMgC3D2V0KHOXXZH8ZVBgi67BQg@mail.gmail.com>
On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
> I'm running Ubuntu Server 11.10 - (kernel: Linux server
> 3.0.0-12-generic x86_64)
>
> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
> with libnl1.
>
> The wireless chip is AR9280. (2x2 MIMO)
>
> Also
> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
> is written at boot.
>
> Is something wrong above?
Do not mess with the rx_chainmask/tx_chainmask parameters, that may be
the reason why it's not working for you.
- Felix
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 12:24 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <4E997A54.2080004@openwrt.org>
I'm running Ubuntu Server 11.10 - (kernel: Linux server
3.0.0-12-generic x86_64)
ath9k from compat-wireless-2011-10-12 and current iw from git compiled
with libnl1.
The wireless chip is AR9280. (2x2 MIMO)
Also
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
is written at boot.
Is something wrong above?
2011/10/15 Felix Fietkau <nbd@openwrt.org>:
> On 2011-10-15 2:13 PM, Stanislav Demakov wrote:
>>
>> Ok, I've compiled and installed iw from git. Now I have this (wlan0 is
>> down):
>>
>> sudo iw phy phy0 set antenna 1 1
>>
>> command failed: Operation not supported (-95)
>
> No idea then. It works on all of my systems.
>
> - Felix
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Felix Fietkau @ 2011-10-15 12:19 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+R42SArWR+gEgqvJ7h1_6ZnB61xyKzOo8FqNxkRhxqrQ@mail.gmail.com>
On 2011-10-15 2:13 PM, Stanislav Demakov wrote:
> Ok, I've compiled and installed iw from git. Now I have this (wlan0 is down):
>
> sudo iw phy phy0 set antenna 1 1
>
> command failed: Operation not supported (-95)
No idea then. It works on all of my systems.
- Felix
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 12:13 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <4E997413.8010008@openwrt.org>
Ok, I've compiled and installed iw from git. Now I have this (wlan0 is down):
sudo iw phy phy0 set antenna 1 1
command failed: Operation not supported (-95)
2011/10/15 Felix Fietkau <nbd@openwrt.org>:
> On 2011-10-15 1:45 PM, Stanislav Demakov wrote:
>>
>> Ok, just have tried:
>>
>> ifconfig wlan0 down
>>
>> and then tested it:
>>
>> iw phy phy0 set antenna all all
>>
>> but it's only showing iw help as before.
>> I'm using the latest compiled compat-wireless.
>
> Try using "1 1" instead of "all all".
> Are you using the latest iw version?
>
> - Felix
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Felix Fietkau @ 2011-10-15 11:52 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+ou1DXL_d_W0dvTcYrNMfH9NjSoFUa=07fE4BYJ+N7bQ@mail.gmail.com>
On 2011-10-15 1:45 PM, Stanislav Demakov wrote:
> Ok, just have tried:
>
> ifconfig wlan0 down
>
> and then tested it:
>
> iw phy phy0 set antenna all all
>
> but it's only showing iw help as before.
> I'm using the latest compiled compat-wireless.
Try using "1 1" instead of "all all".
Are you using the latest iw version?
- Felix
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Adrian Chadd @ 2011-10-15 11:49 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+Lzj5CD7iUShDBg1HxRYiGyxCpWHeC-T6MM7NRLFT=qg@mail.gmail.com>
On 15 October 2011 19:33, Stanislav Demakov <s.demakov@gmail.com> wrote:
> If you tell me how exactly you did it on the AR9220 in your case, this
> will be a good example at least.
I haven't yet written to code for FreeBSD/ath9k. Sorry.
Adrian
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 11:45 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <4E9970A6.10305@openwrt.org>
Ok, just have tried:
ifconfig wlan0 down
and then tested it:
iw phy phy0 set antenna all all
but it's only showing iw help as before.
I'm using the latest compiled compat-wireless.
2011/10/15 Felix Fietkau <nbd@openwrt.org>:
> On 2011-10-14 5:46 PM, Stanislav Demakov wrote:
>>
>> I've noticed that set_antenna and get_antenna functionality was added
>> to the ath9k driver. But iw phy set antenna command still isn't
>> working.
>
> Did you try bringing down all active wlanX interfaces belonging to that phy
> before running that command?
>
> - Felix
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Felix Fietkau @ 2011-10-15 11:38 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+TcY+n90RBMU+Cpp0Bt9d_eAGgY4yffO+PSStWSzbf-Q@mail.gmail.com>
On 2011-10-14 5:46 PM, Stanislav Demakov wrote:
> I've noticed that set_antenna and get_antenna functionality was added
> to the ath9k driver. But iw phy set antenna command still isn't
> working.
Did you try bringing down all active wlanX interfaces belonging to that
phy before running that command?
- Felix
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 11:33 UTC (permalink / raw)
To: Adrian Chadd; +Cc: linux-wireless
In-Reply-To: <CAJ-Vmo=PFEzagWG9ddR5dYoDej7yJyHCXCVTX_67W4QNYaqihg@mail.gmail.com>
If you tell me how exactly you did it on the AR9220 in your case, this
will be a good example at least.
2011/10/15 Adrian Chadd <adrian@freebsd.org>:
> On 15 October 2011 18:02, Stanislav Demakov <s.demakov@gmail.com> wrote:
>> Thanks. I'll ask him.
>>
>>>>both the second and third are connected to chain 1 via
>> an antenna switch.
>>
>> That's interesting. Could you give me a clue how to implement this?
>> Also after doing that, will it be enough to use only one physical
>> antenna connector?
>
> It depends on how it's all wired up. And yes, once you know how it's
> wired up and which antenna configuration words to program in, you can
> run just one of three antennas.
>
>
>
> adrian
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Adrian Chadd @ 2011-10-15 11:29 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzdJiBp742nrgb4eGwRDQO_nBgKNU1v405D_4SwBYPJ3S=A@mail.gmail.com>
On 15 October 2011 18:02, Stanislav Demakov <s.demakov@gmail.com> wrote:
> Thanks. I'll ask him.
>
>>>both the second and third are connected to chain 1 via
> an antenna switch.
>
> That's interesting. Could you give me a clue how to implement this?
> Also after doing that, will it be enough to use only one physical
> antenna connector?
It depends on how it's all wired up. And yes, once you know how it's
wired up and which antenna configuration words to program in, you can
run just one of three antennas.
adrian
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 10:02 UTC (permalink / raw)
To: Adrian Chadd; +Cc: linux-wireless
In-Reply-To: <CAJ-VmonaBUTEKLghg8DJsqUpp6iR-R=pPuejUWwq=ukxt+utzg@mail.gmail.com>
Thanks. I'll ask him.
>>both the second and third are connected to chain 1 via
an antenna switch.
That's interesting. Could you give me a clue how to implement this?
Also after doing that, will it be enough to use only one physical
antenna connector?
2011/10/15 Adrian Chadd <adrian@freebsd.org>:
> You'll have to ask Felix and others, but I think they're more generic
> APIs to support things like AR9285 (and the relevant AR9300/AR9400
> series NICs) which implement 1x1 but have "classic" style antenna
> diversity.
>
> Also, as I've discovered, you _can_ glue an antenna switch onto the
> side of a MIMO NIC. Eg, I have an AR9220 based NIC (2x2:2) which has
> three antennas, both the second and third are connected to chain 1 via
> an antenna switch.
>
>
>
> Adrian
>
^ permalink raw reply
* Re: ath9k: irq storm after suspend/resume
From: Adrian Chadd @ 2011-10-15 10:01 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: Mohammed Shafi, linux-wireless
In-Reply-To: <20111015093902.GA23520@ecki>
I've found some perhaps relevant bits of code here which force the
chip into and out of reset/sleep states.
It's possible that your BIOS doesn't fully reset the NIC upon startup.
It's also possible there are issues with the ath9k power save/resume
code. It's also possible they're all compounding to make things worse.
Are you able to completely and utterly disable any/all power saving on
ath9k, including APSM if you have it enabled?
Unfortunately the information I have is a bit sketchy. I'll do some
further digging (and hope I don't bug Atheros people too much :) to
see if I can extract out some more information about what's going on.
Thanks,
Adrian
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Adrian Chadd @ 2011-10-15 9:48 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+8wq4Mw3Ww8jTOYNk-Q2EYOvtdgHPi=RMQqbJvJRZtdw@mail.gmail.com>
You'll have to ask Felix and others, but I think they're more generic
APIs to support things like AR9285 (and the relevant AR9300/AR9400
series NICs) which implement 1x1 but have "classic" style antenna
diversity.
Also, as I've discovered, you _can_ glue an antenna switch onto the
side of a MIMO NIC. Eg, I have an AR9220 based NIC (2x2:2) which has
three antennas, both the second and third are connected to chain 1 via
an antenna switch.
Adrian
^ permalink raw reply
* Re: ath9k: irq storm after suspend/resume
From: Clemens Buchacher @ 2011-10-15 9:39 UTC (permalink / raw)
To: Mohammed Shafi; +Cc: Adrian Chadd, linux-wireless
In-Reply-To: <CAD2nsn1S7r2o0bqnNgzuHBd9XWYdA7uZgtmtFDTePk0SwybuCQ@mail.gmail.com>
Hi Mohammed,
On Wed, Oct 12, 2011 at 06:40:06PM +0530, Mohammed Shafi wrote:
>
> please try this in case it helps anything
> to debug the issue.
With this, the previous instaces of 0xdeadbeaf are replaced with
zeroes, and I do not get any non-zero traces for SYNC_CAUSE or
ASYNC_CAUSE any more.
> this should avoid dead beef and the interrupt when we access MAC
> registers when the MAC is asleep. also i did not see MAC irq being not
> triggerred in your case(AR_INTR_ASYNC_CAUSE should be 0x2) or may be
> its not an interrupt triggered by the chip itself. thanks
If it's not triggered by ath9k, I do wonder why it works if I
suspend in connected mode, and why reloading the driver usually
fixes the issue. Maybe there is something in the driver unloading
code that we could look at?
Clemens
^ permalink raw reply
* Re: [PATCH] mac80211: handle HT PHY BSS membership selector value correctly
From: Jouni Malinen @ 2011-10-15 8:50 UTC (permalink / raw)
To: Christian Lamparter; +Cc: linux-wireless, johannes, linville
In-Reply-To: <201110141012.21010.chunkeey@googlemail.com>
On Fri, Oct 14, 2011 at 10:12:20AM +0200, Christian Lamparter wrote:
> > On Friday, October 14, 2011 12:45:32 AM Jouni Malinen wrote:
> > > Well, it can be used to try to make legacy stations not attempt
> > > connection, but no guarantees on them actually checking whether they
> > > support all the "basic rates".. For example, where is mac80211 (or
> > > wpa_supplicant) doing that check? ;-)
> >
> Actually, you have already implemented the check in hostapd :)
That's for AP mode which does not really use the BSS membership selector
in any way. The point of this mechanism is that it is supposed to allow
legacy stations to not even try to associate with the AP that requires
some new functionality that the station is not even aware of. For this
to have any real benefit, the station would need verify whether they
support all "basic rates" (i.e., these would look like basic rates for
them, but BSS membership selectors for any station that is aware of the
new functionality). This would allow mandating this type of new
requirement on BSS by BSS basis in an ESS without causing problems to
the legacy stations.
> So, what's the exact difference between then BasicRate and a MembershipRate
> in this context then? Is a rate called "basic rate" when it's one of the
> legacy e.g.: 6, 12, 24 Mbit rates [And likewise: is a rate called a MembershipRate
> when only in the magic 127 HT PHY case?]
More or less (though, I would not call the membership selector a
"rate"). This is not really that clearly described, but I would indeed
split the values in Supported Rates element (and Extended Supported
Rates elements) in that way. This obviously depends on knowing
the full list of rates or full list of membership selectors (which may
be the easier thing to know in full).
The exact definition of what the value is does not really matter for a
legacy station since the rule for them is that they would need to
support any rate (& 0x7f) that has the 0x80 bit set.
> Also, there's 22mbit 8-PSK PBCC [I think mwl8k supports it and some TI
> stuff could support it as well]. The check is questionable, but fixing
> it may no be trivial either. [Anyway, it's a bit outside the scope and
> requires another patch]
Agreed.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
* Re: [PATCH] ssb: Convert to use crc8 code in kernel library
From: Arend van Spriel @ 2011-10-15 8:27 UTC (permalink / raw)
To: Larry Finger
Cc: Pavel Roskin, John W Linville, Michael Buesch, zajec5@gmail.com,
b43-dev@lists.infradead.org, linux-wireless@vger.kernel.org
In-Reply-To: <4E986392.7020008@lwfinger.net>
On 10/14/2011 06:30 PM, Larry Finger wrote:
> On 10/14/2011 10:11 AM, Pavel Roskin wrote:
>> On Sat, 08 Oct 2011 17:28:42 -0500
>> Larry Finger<Larry.Finger@lwfinger.net> wrote:
>>
>>> +static inline void htol16_buf(u16 *buf, unsigned int size)
>>> +{
>>> + size /= 2;
>>> + while (size--)
>>> + *(__le16 *)(buf + size) = cpu_to_le16(*(buf + size));
>>> }
>>
>> I'm not not sure compilers would optimize it out on little-endian
>> systems. Perhaps you want a define that uses this code on
>> big-endian systems and does nothing on little endian systems.
>>
>> Also, it would be nice to have a compile-time check that size is even.
>> Or maybe size should be the number of 16-bit words, but then it would be
>> better to call the argument "count" or something like that.
>
> The patch was dropped. Even so, as this routine is found in brcmsmac, your
> comments warrant further discussion.
Following the thread over here ;-)
> I am pretty sure that the compiler would optimize out the entire htol16_buf
> routine. After substitution for cpu_to_le16() on a little-endian system, the
> statement in the while loop becomes '*(buf + size) = *(buf + size)', which is
> certainly optimized away, as will the now empty while loop. The entire routine
> is reduced to 'size /= 2'. As this will have no effect on the external world, it
> will also be dropped leaving an empty htol16_buf(). I don't think any "#ifdef
> __BIG_ENDIAN ... #endif" statements are needed.
Agree.
> Your suggestion that the argument be renamed is good, but there is no need to
> check for an even number as the data in question come from 16-bit reads of the
> SPROM on the b43 device. That number of 16-bit quantities was multiplied by 2 to
> get the byte count before calling this routine. Of course, the routine should
> have been passed the number of 16-bit words, not the byte count. My second
> version would have done this.
>
> Larry
Feedback on the renaming is indeed valid. Passing the word count is
better here. For brcmsmac I plan to fill the buffer using 8-bit reads
from SPROM, verify the crc8, and perform the endianess conversion from
le16 to cpu when crc is ok (actually under review internally).
Gr. AvS
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Stanislav Demakov @ 2011-10-15 7:39 UTC (permalink / raw)
To: Adrian Chadd; +Cc: linux-wireless
In-Reply-To: <CAJ-Vmomy-LGg=mh5=GqmqWuj7T8b1+oV3oaBSZpf6orJSGPTQg@mail.gmail.com>
Well, before, I did this:
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
So what exactly changed now after they added set\get_antenna functions
to the driver?
2011/10/15 Adrian Chadd <adrian@freebsd.org>:
> .. well, that's basically how you convince the MIMO radios to work in 1x1 mode.
>
>
>
> Adrian
>
^ permalink raw reply
* Re: Ath9k, single antenna on ar9280
From: Adrian Chadd @ 2011-10-15 1:45 UTC (permalink / raw)
To: Stanislav Demakov; +Cc: linux-wireless
In-Reply-To: <CAN=pzd+TcY+n90RBMU+Cpp0Bt9d_eAGgY4yffO+PSStWSzbf-Q@mail.gmail.com>
.. well, that's basically how you convince the MIMO radios to work in 1x1 mode.
Adrian
^ permalink raw reply
* RE: [PATCH] ath6kl: Implement support for QOS-enable and QOS-disable from userspace
From: Panjwani, Rishi @ 2011-10-15 0:52 UTC (permalink / raw)
To: Valo, Kalle; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1318639687-28457-2-git-send-email-rpanjwan@qca.qualcomm.com>
All,
Kindly ignore the previous patch I had sent out. This is the patch I am looking forward to get publically reviewed and committed :
-----Original Message-----
From: Panjwani, Rishi
Sent: Friday, October 14, 2011 5:48 PM
To: Valo, Kalle
Cc: linux-wireless@vger.kernel.org; Panjwani, Rishi
Subject: [PATCH] ath6kl: Implement support for QOS-enable and QOS-disable from userspace
In order to allow user space based QOS control we use the available debugfs infrastructure. With this feature, user can make changes to qos parameters, thereby allowing creation and deletion of user defined priority streams and features like uapsd. This feature has been added for testing purposes.
All 21 parameters for the create_qos command are mandatory in the correct order. They have to be written to the create_qos file in the ath6kl debug directory. These parameters(in order) are:
1)user priority
2)direction
3)traffic class
4)traffic type
5)voice PS capability
6)min service intvl
7)max service intvl
8)inactivity intvl
9)suspension intvl
10)serv start time
11)tsid
12)nominal msdu
13)max msdu
14)min data rate
15)mean data rate
16)peak data rate
17)max burst size
18)delay bound
19)min phy rate
20)surplus bw allowance
21)medium time
For eg :
echo "6 2 3 1 1 9999999 9999999 9999999 7777777 0 6 45000 200 56789000
56789000 5678900 0 0 9999999 20000 0" > create_qos
delete_qos requires 2 parameters:
1)traffic class
2)tsid
For eg :
echo "3 1" > delete_qos
Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.c | 250 +++++++++++++++++++++++++++++--
1 files changed, 236 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index dd37785..383a3c7 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1240,6 +1240,222 @@ static const struct file_operations fops_disconnect_timeout = {
.llseek = default_llseek,
};
+static ssize_t ath6kl_create_qos_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+
+ struct ath6kl *ar = file->private_data;
+ char buf[100];
+ ssize_t len;
+ char *sptr, *token;
+ struct wmi_create_pstream_cmd pstream;
+ u32 val32;
+ u16 val16;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EFAULT;
+ buf[len] = '\0';
+ sptr = buf;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.user_pri))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.traffic_direc))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.traffic_class))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.traffic_type))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.voice_psc_cap))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.min_service_int = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.max_service_int = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.inactivity_int = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.suspension_int = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.service_start_time = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &pstream.tsid))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou16(token, 0, &val16))
+ return -EINVAL;
+ pstream.nominal_msdu = cpu_to_le16(val16);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou16(token, 0, &val16))
+ return -EINVAL;
+ pstream.max_msdu = cpu_to_le16(val16);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.min_data_rate = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.mean_data_rate = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.peak_data_rate = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.max_burst_size = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.delay_bound = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.min_phy_rate = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.sba = cpu_to_le32(val32);
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou32(token, 0, &val32))
+ return -EINVAL;
+ pstream.medium_time = cpu_to_le32(val32);
+
+ ath6kl_wmi_create_pstream_cmd(ar->wmi, &pstream);
+
+ return count;
+}
+
+
+static const struct file_operations fops_create_qos = {
+ .write = ath6kl_create_qos_write,
+ .open = ath6kl_debugfs_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
+static ssize_t ath6kl_delete_qos_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+
+ struct ath6kl *ar = file->private_data;
+ char buf[100];
+ ssize_t len;
+ char *sptr, *token;
+ u8 traffic_class;
+ u8 tsid;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EFAULT;
+ buf[len] = '\0';
+ sptr = buf;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &traffic_class))
+ return -EINVAL;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou8(token, 0, &tsid))
+ return -EINVAL;
+
+ ath6kl_wmi_delete_pstream_cmd(ar->wmi, traffic_class, tsid);
+
+ return count;
+}
+
+
+static const struct file_operations fops_delete_qos = {
+ .write = ath6kl_delete_qos_write,
+ .open = ath6kl_debugfs_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
int ath6kl_debug_init(struct ath6kl *ar) {
ar->debug.fwlog_buf.buf = vmalloc(ATH6KL_FWLOG_SIZE); @@ -1313,6 +1529,12 @@ int ath6kl_debug_init(struct ath6kl *ar)
debugfs_create_file("disconnect_timeout", S_IRUSR | S_IWUSR,
ar->debugfs_phy, ar, &fops_disconnect_timeout);
+ debugfs_create_file("create_qos", S_IWUSR, ar->debugfs_phy, ar,
+ &fops_create_qos);
+
+ debugfs_create_file("delete_qos", S_IWUSR, ar->debugfs_phy, ar,
+ &fops_delete_qos);
+
return 0;
}
--
1.7.0.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox