* Re: [PATCH 1/3] ath9k: Decrease skb size to fit into one page.
From: Eric Dumazet @ 2011-01-07 2:07 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Christian Lamparter, greearb, linux-wireless, ath9k-devel
In-Reply-To: <AANLkTinQ42y9Tu=Ugb92-R+56BP4U+cDBzd4tQQCES1W@mail.gmail.com>
Le jeudi 06 janvier 2011 à 17:57 -0800, Luis R. Rodriguez a écrit :
> On Thu, Jan 6, 2011 at 5:23 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Le vendredi 07 janvier 2011 à 02:04 +0100, Christian Lamparter a écrit :
> >> On Friday 07 January 2011 01:46:03 greearb@candelatech.com wrote:
> >> > From: Ben Greear <greearb@candelatech.com>
> >> >
> >> > Patch is from Eric Dumazet, as described here:
> >> > https://patchwork.kernel.org/patch/104271/
> >> >
> >> > Reported-by: Michael Guntsche <mike@it-loops.com>
> >> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> >> > Signed-off-by: Ben Greear <greearb@candelatech.com>
> >> > ---
> >> >
> >> > NOTE: This needs review by ath9k and/or other informed
> >> > people.
> >>
> >> Does the hardware support vector-i/o for rx (like for instance iwlagn)?
> >> Else, this change would break A-MSDU rx - which is a mandatory feature
> >> (although, not very popular) of 802.11n -
> >>
> >> See for example 802.11n-2009 9.7c:
> >>
> >> "Support for the reception of an A-MSDU, where [...], is mandatory for
> >> an HT STA"
> >>
> >> And 7.1.2 "The maximum frame body size is determined by the maximum
> >> MSDU size (2304 octets) OR the maximum A-MSDU (3839 or 7935 octets,
> >> depending upon the STA's capability), plus any overhead from security
> >> encapsulation.
> >
> > Then, only solution is to mark this broken, and perform a copy of each
> > received frame, to keep a order-1 buffer(s) allocated for hardware.
>
> -ENOTPOSSIBLE -- its an WFA requirement to RX AMSDU.
>
> > Its too easy to have memory allocation failures for high order pages and
> > freeze the card.
>
> Can't we us paged RX skbs, which mac80211 supports now?
>
> See 2f301227a1ede57504694e1f64839839f5737cac and friends.
>
Maybe you dont understand the point. A fix is needed for stable kernels.
paged RX skbs is probably a bit complex, even if copy/pasted from other
drivers.
If the hardware needs 8192 bytes (or 16384) buffers to perform its
operation, it should not give them back to linux, because there is no
guarantee it can allocate fresh ones for the next frames.
^ permalink raw reply
* [ANN] compat-wireless for 2.6.37
From: Luis R. Rodriguez @ 2011-01-07 2:08 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-wireless, linux-bluetooth
Its time for a 2.6.37 based release for upgrading your 802.11 /
Bluetooth / Ethernet drivers on older kernels now that 2.6.37 has been
released.
The good stuff:
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.37/compat-wireless-2.6.37-2.tar.bz2
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.37/compat-wireless-2.6.37-2-sn.tar.bz2
compat-wireless provides a backport of a few Linux kernel subsystems down to
older kernels:
* 802.11
* Bluetooth
* Ethernet
For more details refer to the home page:
http://wireless.kernel.org/en/users/Download/stable/
The compat-wireless project consists of code from three projects:
* The Linux kernel: linux-2.6-allstable.git
* Compat-wirelesS: compat-wireless.git
* Compat: compat.git
The compat-wireless stable releases incorporates code from from
each of these git trees for the respective upstream Linux kernel
stable release. A branch called linux-2.6.3x.y exists for each
stable release. Below we provide the ChangeLog of changes from
the previous branched release to the new branched release.
Release: linux-2.6.37
Updates from the compat.git project:
====================================
git shortlog linux-2.6.36.y..linux-2.6.37.y
Blaise Gassend (1):
compat: Fixes missing sem member in struct device for RT PREEMPT
prior to 2.6.34
Felix Fietkau (4):
compat: backport netlink changes used in the nl80211 cleanup
compat: fix a crash in the netlink backport
compat: backport pm_qos_*_request
compat: backport pm_qos_request
Hauke Mehrtens (22):
compat: backport init_dummy_netdev
compat: backport net_ns_type_operations
compat: fix warning in device_rename
compat: backport linux/pci-aspm.h
compat: backport skb_checksum_none_assert
compat: backport printk_once
compat: backport loff_t noop_llseek
compat: backport list_for_each_entry_continue_rcu
compat: backport PCMCIA API changes.
compat: backport some usb urb functions
compat: move pmcia backport code into compat-2.6.36.h
compat: pcmcia/cs.h is removed form new kernels
compat: fix build error in init_dummy_netdev
compat: backport some more kfifo stuff
compat: rename member in struct mmc_host.
compat: backport sock_recv_ts_and_drops
compat: fix device_lock functions on non rt kernel
compat: lock correct mutex in device_lock
compat: add empty implementation for usb_enable_autosuspend
compat: fix build with kernel 2.6.37rc1
compat: remove unnecessary ifdefs and empty file
compat: add missing pm_runtime.h
Luis R. Rodriguez (5):
compat: define PM_EVENT_SLEEP only if not defined
compat: add support for ndo_init backport
compat: backport upstream firmware_class bug through f45f3c1f
compat: annotate release for v2.6.37-rc1
compat: backport PCI_EXP_LNKCTL_ES added for on 2.6.29
Updates from the compat-wireless.git project:
=============================================
git shortlog linux-2.6.36.y..linux-2.6.37.y
Bala Shanmugam (2):
compat-wireless: Added ath3k sflash workaround to crap directory
Do not compile staging directory for bt target. Signed-off-by:
Bala Shanmugam <sbalashanmugam@atheros.com>
Hauke Mehrtens (39):
compat-wireless: make patches apply again.
compat-wireless: deactivate namespace
compat-wireless: make compat-2.6.37.c build
compat-wireless: fix hidp_output_raw_report
compat-wireless: do not use needed_headroom
compat-wireless: fix patch stile.
compat-wireless: remove linux/gpio.h include
compat-wireless: multiple changes to config file
compat-wireless: rename CONFIG_IWLWIFI config symbol
compat-wireless: add ifdefs into compat_autoconf.h
compat-wireless: add support for kernel 2.6.24
compat-wireless: convert ifndef for compat_autoconf.h
compat-wireless: replace name CONFIG_IWLWIFI
compat-wireless: fix generation of compat_autoconf.h
compat-wireless: fix patch style
compat-wireless: handle depending on something build as module
compat-wireless: make atk6kl build with older kernels
compat-wireless: fix for CONFIG_WIRELESS_EXT=n
compat-wireless: build if kernel does not have mac80211
compat-wireless: add conditions form config into compat_autoconf.h
compat-wireless: Add warning if wext is deactivated
compat-wireless: remove special handling for CONFIG_CFG80211_WEXT
compat-wireless: add brcm80211 driver
compat-wireless: make patch apply again.
compat-wireless: make patch apply again.
compat-wireless: make patches apply again
compat-wirelsss: add carl9170
compat-wireless: fix unresolved symbols with old kernels
compat-wireless: "backport" pcmcia api changes.
compat-wirelsss: refresh patches
compat-wireless: fix wl12xx driver
compat-wireless: remove already applied patches
compat-wireless: make patch apply again
compat-wireless: backport kfifo for rt2x00
compat-wireless: backport sock_recv_ts_and_drops in compat
compat-wireless: make patches apply again
compat-wireless: fix regression:
compat-wireless: revert workqueue patch
compat-wireless: make patch apply again
Helmut Schaa (1):
compat-wireless: Select minstrel_ht as default rc algo
Luis R. Rodriguez (87):
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: make gen-stable-release.sh use new release
number for dirs
compat-wireless: remove the v from the release name
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: enable compilation of ath9k on >= 2.6.24
compat-wireless: fix driver select for ath9k
compat-wireless: fix unintended merge of changes
compat-wireless: fix enabling of 2.6.24
compat-wireless: fix multiqueue patches
compat-wireless: fix patches/25-multicast-list_head.patch
compat-wireless: refresh patches
compat-wireless: fix compilation on iface.c
compat-wireless: enable ath6kl from being included
compat-wireless: enable ath6kl only for >= 2.6.32
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: update the atheros defconfigs/atheros-debug.mk
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: propagate config.mk changes to atheros defconfig
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: add CONFIG_ATH9K_RATE_CONTROL=y
compat-wireless: update defconfigs/atheros-debug.mk
compat-wireless: update broadcom staging Makefile
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: add support for generating pending-stable/ fixes
compat-wireless: add support for -s for gen-stable-release.sh
compat-wireless: fix -s usage on generation stable tarballs
compat-wireless: add support for printing stats for pending-stable
compat-wireless: update code-metrics to reflect extra patches applied
compat-wireless: fix to include net/mac80211.h for pending-stable
compat-wireless: fix uninstall for compat
compat-wireless: patch refresh
compat-wireless: Add the pending mac80211 reset work patch
compat-wireless: replace ar9170 with carl9170
compat-wireless: add key.o to driver-select for ath drivers
compat-wireless: disable staging for most driver-select options
compat-wireless: add driver-select for brcm80211
compat-wireless: fix driver-select for brcm80211
compat-wireless: add rx filter carl9170 patch to linux-next-pending/
compat-wireless: fix patches for new wl1251 changes
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: add driver-select for wl1251 and wl1271
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: refresh patches
compat-wireless: refresh crap patches
compat-wireless: allow skipping updating the local tree
compat-wireless: support ignoring some stable linux-next patches
Revert "compat-wireless: fix update-initramfs script"
compat-wireless: fix initramfs update
compat-wireless: refresh patches for 2.6.37-rc1 release
compat-wireless: refresh crap patches
compat-wireless: move fwload btusb ath3k patch to linux-next-pending
compat-wireless: refresh patches for 2.6.37-rc2
compat-wireless: refresh patches for 2.6.37-rc3
compat-wireless: refresh crap patches for 2.6.37-rc3
compat-wireless: simple file change to annotate change
compat-wireless: simple file change to annotate change for rc5
compat-wireless: simple file change to annotate change for rc5 release v2
compat-wireless: add a few linux-next cherry pick patches
compat-wireless: cherry pick ath3k's new PID patch
compat-wireless: remove
linux-next-pending/0001-btusb-Add-fw-load-support.patch
compat-wireless: fix admin-update.sh for stable cherry picks
compat-wireless: remove failed stable patches and backport one
compat-wireless: backport stable:
ath9k-content-DMA-start-stop-through-the-PCU-lock.patch
compat-wireless: backport stable patch:
ath9k-Fix-STA-disconnect-issue-due-to-received-MIC-f.patch
compat-wireless: backport stable patch:
orinoco-initialise-priv-hw-before-assigning-the-inte.patch
compat-wireless: suck in all pending-stable patches
compat-wireless: refresh linux-next-cherry-pick/ patches
compat-wireless: refresh crap patches after stable/cherry-pick
compat-wireless: remove no-aggregation on VO patches
compat-wireless: fix stable patch pull count
compat-wireless: refresh patches for 2.6.37-rc6
compat-wireless: refresh crap patches for 2.6.37-rc6
compat-wireless: pending-stable updates for 2.6.37-rc6
compat-wireless: refresh pending-stable patches
compat-wireless: refresh crap patches after applying
pending-stable patches
compat-wireless: Fix radio_enable patch for backports
compat-wireless: remove the ath3k/btusb cherry picked patch now upstream
compat-wireless: refresh patches for 2.6.37 first release
compat-wireless: synch pending-stable patches
Senthil Balasubramanian (1):
compat-wireless: fix scripts/driver-select for ath9k
Sven-Haegar Koch (1):
compat-wireless: fix activesync devices
Tim Gardner (1):
compat-wireless linux-2.6.37.y, fix compile error for pm_qos_add_request()
Walter Goldens (12):
compat-wireless: introduce driver-select group for atlxx
compat-wireless: update unload/wlunload scripts
compat-wireless: unload modules list updated
compat-wireless: update Makefile modules
compat-wireless: enable uninstall for staging & atlxx
compat-wireless: update bluetooth in Makefile
compat-wireless: enable bluetooth via driver-select
compat-wireless: update unloading scripts for bt
compat-wireless: remove obsolete load scripts
compat-wireless: update README file
compat-wireless: disable update-initramfs except for b4xx/ssb
compat-wireless: fix update-initramfs script
^ permalink raw reply
* Re: [PATCH 1/3] ath9k: Decrease skb size to fit into one page.
From: Luis R. Rodriguez @ 2011-01-07 2:13 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Christian Lamparter, greearb, linux-wireless, ath9k-devel
In-Reply-To: <1294366072.2704.32.camel@edumazet-laptop>
On Thu, Jan 6, 2011 at 6:07 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 06 janvier 2011 à 17:57 -0800, Luis R. Rodriguez a écrit :
>> On Thu, Jan 6, 2011 at 5:23 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > Le vendredi 07 janvier 2011 à 02:04 +0100, Christian Lamparter a écrit :
>> >> On Friday 07 January 2011 01:46:03 greearb@candelatech.com wrote:
>> >> > From: Ben Greear <greearb@candelatech.com>
>> >> >
>> >> > Patch is from Eric Dumazet, as described here:
>> >> > https://patchwork.kernel.org/patch/104271/
>> >> >
>> >> > Reported-by: Michael Guntsche <mike@it-loops.com>
>> >> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> >> > Signed-off-by: Ben Greear <greearb@candelatech.com>
>> >> > ---
>> >> >
>> >> > NOTE: This needs review by ath9k and/or other informed
>> >> > people.
>> >>
>> >> Does the hardware support vector-i/o for rx (like for instance iwlagn)?
>> >> Else, this change would break A-MSDU rx - which is a mandatory feature
>> >> (although, not very popular) of 802.11n -
>> >>
>> >> See for example 802.11n-2009 9.7c:
>> >>
>> >> "Support for the reception of an A-MSDU, where [...], is mandatory for
>> >> an HT STA"
>> >>
>> >> And 7.1.2 "The maximum frame body size is determined by the maximum
>> >> MSDU size (2304 octets) OR the maximum A-MSDU (3839 or 7935 octets,
>> >> depending upon the STA's capability), plus any overhead from security
>> >> encapsulation.
>> >
>> > Then, only solution is to mark this broken, and perform a copy of each
>> > received frame, to keep a order-1 buffer(s) allocated for hardware.
>>
>> -ENOTPOSSIBLE -- its an WFA requirement to RX AMSDU.
>>
>> > Its too easy to have memory allocation failures for high order pages and
>> > freeze the card.
>>
>> Can't we us paged RX skbs, which mac80211 supports now?
>>
>> See 2f301227a1ede57504694e1f64839839f5737cac and friends.
>>
>
> Maybe you dont understand the point. A fix is needed for stable kernels.
> paged RX skbs is probably a bit complex, even if copy/pasted from other
> drivers.
The only way to accept your patch is to use a debugfs option to
disable it, we need AMSDU support enabled by default.
> If the hardware needs 8192 bytes (or 16384) buffers to perform its
> operation, it should not give them back to linux, because there is no
> guarantee it can allocate fresh ones for the next frames.
Last I looked at this the issue was not the upper used by the driver
but an issue of a roundoff by the kernel that ended up on *some*
machines going a higher order. Not all machines use the higher order.
I wondered at one point if using ksize() might help here too but
again, this is a new API. Not sure how to fix it for older kernels.
Luis
^ permalink raw reply
* Re: [RFC v2] cfg80211: Add HT BSS attributes
From: Sujith @ 2011-01-07 2:15 UTC (permalink / raw)
To: Daniel Halperin; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <AANLkTi=ZcigYLqqmhHc638_AxSODWrVrTV5KELRws3XX@mail.gmail.com>
Daniel Halperin wrote:
> Yeah, me too. Isn't greenfield mode (whether there are legacy devices
> around) part of the operating capabilities and should be supported by
> hostapd?
Yes, hostapd does check if there are non-GF stations in the BSS and updates
the HT operation mode parameters. But the nl80211 interface hook is currently
not implemented.
Sujith
^ permalink raw reply
* Re: [PATCH 1/3] ath9k: Decrease skb size to fit into one page.
From: Eric Dumazet @ 2011-01-07 2:24 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Christian Lamparter, greearb, linux-wireless, ath9k-devel
In-Reply-To: <AANLkTi=+F_O1_2c07zLEGVDSAkuA2_MwghwRQK9pHMN7@mail.gmail.com>
Le jeudi 06 janvier 2011 à 18:13 -0800, Luis R. Rodriguez a écrit :
> On Thu, Jan 6, 2011 at 6:07 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> The only way to accept your patch is to use a debugfs option to
> disable it, we need AMSDU support enabled by default.
>
I dont care of my patch ;)
There is a reason I felt it was not appropriate.
> > If the hardware needs 8192 bytes (or 16384) buffers to perform its
> > operation, it should not give them back to linux, because there is no
> > guarantee it can allocate fresh ones for the next frames.
>
> Last I looked at this the issue was not the upper used by the driver
> but an issue of a roundoff by the kernel that ended up on *some*
> machines going a higher order. Not all machines use the higher order.
> I wondered at one point if using ksize() might help here too but
> again, this is a new API. Not sure how to fix it for older kernels.
common->rx_bufsize = roundup(IEEE80211_MAX_MPDU_LEN +
ah->caps.rx_status_len,
min(common->cachelsz, (u16)64));
Given IEEE80211_MAX_MPDU_LEN is more than 3840, and skb shinfo adds more
than 256 bytes, I can assert rx_bufsize is greater than 4096 : order-1
allocations at minimum.
ksize() wont help you.
Many net drivers perform a copy (r8169.c comes to mind, because of a
hardware flaw).
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Luis R. Rodriguez @ 2011-01-07 2:30 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <1294361165-15308-3-git-send-email-greearb@candelatech.com>
On Thu, Jan 6, 2011 at 4:46 PM, <greearb@candelatech.com> wrote:
> +#define ATH9K_MAX_STATIONS 1024
How about making this a Kconfig with a default to a value of the known
(by you) max workable number of STAs that one can use on ath9k, which
is modifiable to other values by power of two up to 1024. Advise in
the kconfig that if more STAs are used then some issue may arise but
should be reported (so the issue can be fixed). This way by default
normal users (you're not normal) won't enable > max known workable
stable number of STAs on ath9k.
Luis
^ permalink raw reply
* Re: [PATCH 1/3] ath9k: Decrease skb size to fit into one page.
From: Eric Dumazet @ 2011-01-07 2:33 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Christian Lamparter, greearb, linux-wireless, ath9k-devel
In-Reply-To: <1294367080.2704.46.camel@edumazet-laptop>
Le vendredi 07 janvier 2011 à 03:24 +0100, Eric Dumazet a écrit :
> Given IEEE80211_MAX_MPDU_LEN is more than 3840, and skb shinfo adds more
> than 256 bytes, I can assert rx_bufsize is greater than 4096 : order-1
On 64bit arches :
sizeof(struct skb_shared_info) = 0x198 = 408
^ permalink raw reply
* Re: [RFC v2] cfg80211: Add HT BSS attributes
From: Daniel Halperin @ 2011-01-07 2:33 UTC (permalink / raw)
To: Sujith; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <19750.30510.548719.848168@gargle.gargle.HOWL>
On Thu, Jan 6, 2011 at 6:15 PM, Sujith <m.sujith@gmail.com> wrote:
> Daniel Halperin wrote:
>> Yeah, me too. Isn't greenfield mode (whether there are legacy devices
>> around) part of the operating capabilities and should be supported by
>> hostapd?
>
> Yes, hostapd does check if there are non-GF stations in the BSS and updates
> the HT operation mode parameters. But the nl80211 interface hook is currently
> not implemented.
>
right.. so don't we want this patch? :) Sorry if I'm being obtuse
Dan
^ permalink raw reply
* Re: [RFC v2] cfg80211: Add HT BSS attributes
From: Sujith @ 2011-01-07 2:39 UTC (permalink / raw)
To: Daniel Halperin; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <AANLkTimgd-EbLBe6KHnj5_9Paeg++rp1v8J5s5hy_NOa@mail.gmail.com>
Daniel Halperin wrote:
> On Thu, Jan 6, 2011 at 6:15 PM, Sujith <m.sujith@gmail.com> wrote:
> > Daniel Halperin wrote:
> >> Yeah, me too. Isn't greenfield mode (whether there are legacy devices
> >> around) part of the operating capabilities and should be supported by
> >> hostapd?
> >
> > Yes, hostapd does check if there are non-GF stations in the BSS and updates
> > the HT operation mode parameters. But the nl80211 interface hook is currently
> > not implemented.
> >
>
> right.. so don't we want this patch? :) Sorry if I'm being obtuse
The Greenfield status is part of opmode (see operation_mode in struct ieee80211_ht_info).
This is already handled by mac80211 through NL80211_ATTR_BSS_HT_OPMODE for AP mode.
Sujith
^ permalink raw reply
* Re: [rt2x00-users] Linksys WUSB600N v1 disconnecting from AP
From: Luis R. Rodriguez @ 2011-01-07 2:44 UTC (permalink / raw)
To: Aleksandar Milivojevic
Cc: Wolfgang Kufner, Luis Correia, Luis Rodriguez,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com,
Helmut Schaa
In-Reply-To: <AANLkTin8JO4UHUYLufSmPhRw0ZndDdjTpueSOHNQbDiZ@mail.gmail.com>
On Thu, Jan 06, 2011 at 08:31:22AM -0800, Aleksandar Milivojevic wrote:
> Playing with it a bit more this morning. Looks like the connection
> from wireless adapter to my AP drops periodically. Sometimes it
> recovers (sometimes after several attempts), sometimes it does not.
> Seems to be very random:
>
> # egrep 'authent|associat' /var/log/debug
> Jan 6 08:00:54 toporko kernel: [ 47.570810] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:00:54 toporko kernel: [ 47.571321] wlan0: authenticated
> Jan 6 08:00:56 toporko kernel: [ 49.174175] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:00:56 toporko kernel: [ 49.175536] wlan0: associated
> Jan 6 08:06:01 toporko kernel: [ 354.230874] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:06:01 toporko kernel: [ 354.231364] wlan0: authenticated
> Jan 6 08:06:01 toporko kernel: [ 354.236066] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:06:01 toporko kernel: [ 354.236865] wlan0: associated
> Jan 6 08:09:36 toporko kernel: [ 569.868923] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:36 toporko kernel: [ 569.869416] wlan0: authenticated
> Jan 6 08:09:36 toporko kernel: [ 569.873736] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:36 toporko kernel: [ 569.874507] wlan0: associated
> Jan 6 08:09:46 toporko kernel: [ 579.233563] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:46 toporko kernel: [ 579.235574] wlan0: authenticated
> Jan 6 08:09:46 toporko kernel: [ 579.240737] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:46 toporko kernel: [ 579.241518] wlan0: associated
> Jan 6 08:09:57 toporko kernel: [ 590.830933] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:57 toporko kernel: [ 590.831435] wlan0: authenticated
> Jan 6 08:09:57 toporko kernel: [ 590.839102] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:09:57 toporko kernel: [ 590.839881] wlan0: associated
> Jan 6 08:21:29 toporko kernel: [ 1282.823289] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:21:29 toporko kernel: [ 1282.823783] wlan0: authenticated
> Jan 6 08:21:29 toporko kernel: [ 1282.828990] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:21:29 toporko kernel: [ 1282.830132] wlan0: associated
> Jan 6 08:25:30 toporko kernel: [ 1523.433931] wlan0: authenticate
> with 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:25:30 toporko kernel: [ 1523.434930] wlan0: authenticated
> Jan 6 08:25:30 toporko kernel: [ 1523.439868] wlan0: associate with
> 00:1e:52:79:e9:ff (try 1)
> Jan 6 08:25:30 toporko kernel: [ 1523.440652] wlan0: associated
>
> So far, it managed to re-connect every time. Though, I'm rather sure
> if I leave it long enough, the last night's case of connection dropped
> completely would repeat sooner or later (even last night, there were
> some connect/disconnect events before connection was dropped
> permanently).
>
> The AP reports signal from wireless card between -70 and -75dB, noise
> at -96dB, and speed at 120mbps (with occasional drop to 45mbps).
> These numbers sound about OK for the location (on the other side of my
> apartment, few walls in between). For comparison, if I position my
> MacBook at same location (right next to my Linux box), AP reports
> signal from its AirPort card at about -60dB and speed in about 100mbps
> range and no drops.
The Linux regulatory code only relies on the Country IE from the AP you
decide to associate to, that's it. Then, as for all the regulatory stuff
popping out once you are associated, its happening because as I see it
you are being disconnected from the AP. The Linux regulatory code will
reset the regulatory settings after you disconnect from an AP.
The disconnect issues should not be regularory related from what I see.
Seems like a general disconnect issue with your driver.
Luis
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Felix Fietkau @ 2011-01-07 2:45 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <1294361165-15308-3-git-send-email-greearb@candelatech.com>
On 2011-01-06 5:46 PM, greearb@candelatech.com wrote:
> From: Ben Greear<greearb@candelatech.com>
>
> The stations hold the ath_node, which holds the tid
> and other xmit logic structures. In order to debug
> stuck xmit logic, we need a way to print out the tid
> state for the stations.
>
> Signed-off-by: Ben Greear<greearb@candelatech.com>
I really don't like the array with the hardcoded size. How about just
adding a struct list_head to the ath_node struct and tracking that?
- Felix
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Ben Greear @ 2011-01-07 2:45 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <AANLkTikjjKe96Ok09Yz1R_nqsoO+n-9X-abeF8VUoOwQ@mail.gmail.com>
On 01/06/2011 06:30 PM, Luis R. Rodriguez wrote:
> On Thu, Jan 6, 2011 at 4:46 PM,<greearb@candelatech.com> wrote:
>> +#define ATH9K_MAX_STATIONS 1024
>
> How about making this a Kconfig with a default to a value of the known
> (by you) max workable number of STAs that one can use on ath9k, which
> is modifiable to other values by power of two up to 1024. Advise in
> the kconfig that if more STAs are used then some issue may arise but
> should be reported (so the issue can be fixed). This way by default
> normal users (you're not normal) won't enable> max known workable
> stable number of STAs on ath9k.
This is just for debugging at this point. It wastes a bit of memory
when debugfs is enabled, but otherwise doesn't affect anything. It's
not even really a problem if there are more stations than fit in
the array.
I can reproduce all my problems with < 128, so if you'd prefer
the number be smaller, that's fine with me. I don't think it's
worth a configurable value, however.
Thanks,
Ben
>
> Luis
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Ben Greear @ 2011-01-07 2:48 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <4D267E47.6050408@openwrt.org>
On 01/06/2011 06:45 PM, Felix Fietkau wrote:
> On 2011-01-06 5:46 PM, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> The stations hold the ath_node, which holds the tid
>> and other xmit logic structures. In order to debug
>> stuck xmit logic, we need a way to print out the tid
>> state for the stations.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
> I really don't like the array with the hardcoded size. How about just adding a struct list_head to the ath_node struct and tracking that?
I can do that..would probably want a pointer back from the ath_node to it's STA struct
as well.
I'll re-work the patch to use a list.
Thanks,
Ben
>
> - Felix
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Luis R. Rodriguez @ 2011-01-07 2:49 UTC (permalink / raw)
To: Ben Greear
Cc: Luis R. Rodriguez, ath9k-devel@venema.h4ckr.net,
linux-wireless@vger.kernel.org
In-Reply-To: <4D267E4D.7000608@candelatech.com>
On Thu, Jan 06, 2011 at 06:45:33PM -0800, Ben Greear wrote:
> On 01/06/2011 06:30 PM, Luis R. Rodriguez wrote:
> > On Thu, Jan 6, 2011 at 4:46 PM,<greearb@candelatech.com> wrote:
> >> +#define ATH9K_MAX_STATIONS 1024
> >
> > How about making this a Kconfig with a default to a value of the known
> > (by you) max workable number of STAs that one can use on ath9k, which
> > is modifiable to other values by power of two up to 1024. Advise in
> > the kconfig that if more STAs are used then some issue may arise but
> > should be reported (so the issue can be fixed). This way by default
> > normal users (you're not normal) won't enable> max known workable
> > stable number of STAs on ath9k.
>
> This is just for debugging at this point. It wastes a bit of memory
> when debugfs is enabled, but otherwise doesn't affect anything. It's
> not even really a problem if there are more stations than fit in
> the array.
I meant to use the value as a limit on the # of STAs you can create
with one ath9k device. The debugfs can still be used as you did,
only that the limit would come from the kconfig value.
> I can reproduce all my problems with < 128, so if you'd prefer
> the number be smaller, that's fine with me. I don't think it's
> worth a configurable value, however.
I thikn we should limit the # STAs to whatever it is that you can
use in a realiable way, this should be a driver limitation, but
I figured you'd want to configure this to a higher value yourself
for whatever tests you are doing. We should fix it though but at
least other clueless users would not go over stable limit you have
found.
Luis
^ permalink raw reply
* Re: [ath9k-devel] [PATCH 3/3] ath9k: Keep track of stations for debugfs.
From: Ben Greear @ 2011-01-07 3:17 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Luis R. Rodriguez, ath9k-devel@venema.h4ckr.net,
linux-wireless@vger.kernel.org
In-Reply-To: <20110107024909.GD20431@tux>
On 01/06/2011 06:49 PM, Luis R. Rodriguez wrote:
> On Thu, Jan 06, 2011 at 06:45:33PM -0800, Ben Greear wrote:
>> On 01/06/2011 06:30 PM, Luis R. Rodriguez wrote:
>>> On Thu, Jan 6, 2011 at 4:46 PM,<greearb@candelatech.com> wrote:
>>>> +#define ATH9K_MAX_STATIONS 1024
>>>
>>> How about making this a Kconfig with a default to a value of the known
>>> (by you) max workable number of STAs that one can use on ath9k, which
>>> is modifiable to other values by power of two up to 1024. Advise in
>>> the kconfig that if more STAs are used then some issue may arise but
>>> should be reported (so the issue can be fixed). This way by default
>>> normal users (you're not normal) won't enable> max known workable
>>> stable number of STAs on ath9k.
>>
>> This is just for debugging at this point. It wastes a bit of memory
>> when debugfs is enabled, but otherwise doesn't affect anything. It's
>> not even really a problem if there are more stations than fit in
>> the array.
>
> I meant to use the value as a limit on the # of STAs you can create
> with one ath9k device. The debugfs can still be used as you did,
> only that the limit would come from the kconfig value.
>
>> I can reproduce all my problems with< 128, so if you'd prefer
>> the number be smaller, that's fine with me. I don't think it's
>> worth a configurable value, however.
>
> I thikn we should limit the # STAs to whatever it is that you can
> use in a realiable way, this should be a driver limitation, but
> I figured you'd want to configure this to a higher value yourself
> for whatever tests you are doing. We should fix it though but at
> least other clueless users would not go over stable limit you have
> found.
I think it's very likely that the problems I find are general issues that
are just much easier to hit with lots of stations. There is probably no
'safe' number of stations...just takes longer to see bugs with
fewer stations.
For instance, you still see the failure-to-stop-DMA errors with a single station, right?
And the tx locking stuff was just easier to exercise with lots of stations,
but it would have been possible to hit it with 2 stations.
The current tx-hang stuff I'm chasing seems like logic bugs in the queueing,
probably nothing in particular about the chipset.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: Odd behavior of ssb, b43, b43legacy, and b44
From: Michael Büsch @ 2011-01-07 3:34 UTC (permalink / raw)
To: Larry Finger; +Cc: b43-dev, wireless
In-Reply-To: <4D262109.20504@lwfinger.net>
On Thu, 2011-01-06 at 14:07 -0600, Larry Finger wrote:
> Michael,
>
> On one of my boxes, I have installed two PCI-format BCM43xx cards for testing.
> One is a BCM4306 Rev. 3, which uses b43. The other is a BCM4303, which uses
> b43legacy. The output of lspci -nn for these devices is
>
> 01:09.0 Network controller [0280]: Broadcom Corporation BCM4306 802.11b/g
> Wireless LAN Controller [14e4:4320] (rev 03)
> 01:0a.0 Network controller [0280]: Broadcom Corporation BCM4303 802.11b Wireless
> LAN Controller [14e4:4301] (rev 02)
>
> Upon booting, I noticed the following messages in the log:
>
> b44: b44.c:v2.0
> b44: Invalid MAC address found in EEPROM
> b44 ssb1:1: Problem fetching invariants of chip, aborting
>
> b44: probe of ssb1:1 failed with error -22
>
> As this box does not have a b44 installed, I wondered why this was happening.
> When I unloaded all the drivers and used modprobe to load ssb, I found that b43,
> b43legacy and b44 were all loaded. The console output is
>
> finger@pam:~> lsmod | grep b4 <== none loaded
> finger@pam:~> sudo modprobe -v ssb <== load ssb
> insmod /lib/modules/2.6.37-wl+/kernel/drivers/ssb/ssb.ko
>
> The above looks normal, but look at what is now resident!
>
> finger@pam:~> lsmod | grep b4
> b43legacy 115302 0
> b44 28767 0
> b43 174321 0
> ssb 38157 3 b43legacy,b44,b43
> mac80211 266240 2 b43legacy,b43
> cfg80211 161930 3 b43legacy,b43,mac80211
>
> Any idea why loading ssb should silently load b43legacy AND b44? Any ideas on
> where to look?
>
> Thanks,
>
> Larry
>
Does one of these wireless cards have a dangling ethernet core? I would
not be surprised...
--
Greetings Michael.
^ permalink raw reply
* Re: Odd behavior of ssb, b43, b43legacy, and b44
From: Larry Finger @ 2011-01-07 4:31 UTC (permalink / raw)
To: Michael Büsch; +Cc: b43-dev, wireless
In-Reply-To: <1294371276.15564.0.camel@maggie>
On 01/06/2011 09:34 PM, Michael Büsch wrote:
>
> Does one of these wireless cards have a dangling ethernet core? I would
> not be surprised...
Yes. The core scan for the BCM4303 is as follows:
ssb: Core 0 found: IEEE 802.11 (cc 0x812, rev 0x02, vendor 0x4243)
ssb: Core 1 found: PCMCIA (cc 0x80D, rev 0x00, vendor 0x4243)
ssb: Core 2 found: Fast Ethernet (cc 0x806, rev 0x02, vendor 0x4243)
ssb: Core 3 found: V90 (cc 0x807, rev 0x01, vendor 0x4243)
ssb: Core 4 found: PCI (cc 0x804, rev 0x03, vendor 0x4243)
ssb: Sonics Silicon Backplane found on PCI device 0000:01:09.0
Larry
^ permalink raw reply
* [PATCH v2 3/3] ath9k: Keep track of stations for debugfs.
From: greearb @ 2011-01-07 4:49 UTC (permalink / raw)
To: linux-wireless; +Cc: ath9k-devel, Ben Greear
From: Ben Greear <greearb@candelatech.com>
The stations hold the ath_node, which holds the tid
and other xmit logic structures. In order to debug
stuck xmit logic, we need a way to print out the tid
state for the stations.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
v1 -> v2: Use linked list instead of array. Protect with spinlock.
:100644 100644 deda815... 3f5c513... M drivers/net/wireless/ath/ath9k/ath9k.h
:100644 100644 faf84e4... 650f00f... M drivers/net/wireless/ath/ath9k/debug.c
:100644 100644 23b2998... 59c01ca... M drivers/net/wireless/ath/ath9k/init.c
:100644 100644 b716ffb... 8684afa... M drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/ath9k.h | 7 ++-
drivers/net/wireless/ath/ath9k/debug.c | 94 +++++++++++++++++++++++++++++++-
drivers/net/wireless/ath/ath9k/init.c | 4 ++
drivers/net/wireless/ath/ath9k/main.c | 13 +++++
4 files changed, 115 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index deda815..3f5c513 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -254,7 +254,10 @@ struct ath_atx_tid {
};
struct ath_node {
- struct ath_common *common;
+#ifdef CONFIG_ATH9K_DEBUGFS
+ struct list_head list; /* for sc->nodes */
+ struct ieee80211_sta *sta; /* station struct we're part of */
+#endif
struct ath_atx_tid tid[WME_NUM_TID];
struct ath_atx_ac ac[WME_NUM_AC];
u16 maxampdu;
@@ -624,6 +627,8 @@ struct ath_softc {
#ifdef CONFIG_ATH9K_DEBUGFS
struct ath9k_debug debug;
+ spinlock_t nodes_lock;
+ struct list_head nodes; /* basically, stations */
#endif
struct ath_beacon_config cur_beacon_conf;
struct delayed_work tx_complete_work;
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index faf84e4..650f00f 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -587,6 +587,8 @@ static const struct file_operations fops_wiphy = {
sc->debug.stats.txstats[WME_AC_BK].elem, \
sc->debug.stats.txstats[WME_AC_VI].elem, \
sc->debug.stats.txstats[WME_AC_VO].elem); \
+ if (len >= size) \
+ goto done; \
} while(0)
#define PRX(str, elem) \
@@ -597,6 +599,8 @@ do { \
(unsigned int)(sc->tx.txq[WME_AC_BK].elem), \
(unsigned int)(sc->tx.txq[WME_AC_VI].elem), \
(unsigned int)(sc->tx.txq[WME_AC_VO].elem)); \
+ if (len >= size) \
+ goto done; \
} while(0)
#define PRQLE(str, elem) \
@@ -607,6 +611,8 @@ do { \
list_empty(&sc->tx.txq[WME_AC_BK].elem), \
list_empty(&sc->tx.txq[WME_AC_VI].elem), \
list_empty(&sc->tx.txq[WME_AC_VO].elem)); \
+ if (len >= size) \
+ goto done; \
} while (0)
static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
@@ -614,7 +620,7 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
{
struct ath_softc *sc = file->private_data;
char *buf;
- unsigned int len = 0, size = 4000;
+ unsigned int len = 0, size = 8000;
int i;
ssize_t retval = 0;
char tmp[32];
@@ -623,7 +629,10 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
if (buf == NULL)
return -ENOMEM;
- len += sprintf(buf, "%30s %10s%10s%10s\n\n", "BE", "BK", "VI", "VO");
+ len += sprintf(buf, "Num-Tx-Queues: %i tx-queues-setup: 0x%x\n"
+ "%30s %10s%10s%10s\n\n",
+ ATH9K_NUM_TX_QUEUES, sc->tx.txqsetup,
+ "BE", "BK", "VI", "VO");
PR("MPDUs Queued: ", queued);
PR("MPDUs Completed: ", completed);
@@ -644,6 +653,14 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
PR("hw-put-tx-buf: ", puttxbuf);
PR("hw-tx-start: ", txstart);
PR("hw-tx-proc-desc: ", txprocdesc);
+ len += snprintf(buf + len, size - len,
+ "%s%11p%11p%10p%10p\n", "txq-memory-address:",
+ &(sc->tx.txq[WME_AC_BE]),
+ &(sc->tx.txq[WME_AC_BK]),
+ &(sc->tx.txq[WME_AC_VI]),
+ &(sc->tx.txq[WME_AC_VO]));
+ if (len >= size)
+ goto done;
PRX("axq-qnum: ", axq_qnum);
PRX("axq-depth: ", axq_depth);
@@ -661,6 +678,68 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
snprintf(tmp, sizeof(tmp) - 1, "txq_fifo[%i] empty: ", i);
PRQLE(tmp, txq_fifo[i]);
}
+
+done:
+ if (len > size)
+ len = size;
+
+ retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+ kfree(buf);
+
+ return retval;
+}
+
+static ssize_t read_file_stations(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ char *buf;
+ unsigned int len = 0, size = 64000;
+ struct ath_node *an = NULL;
+ ssize_t retval = 0;
+ int q;
+
+ buf = kzalloc(size, GFP_KERNEL);
+ if (buf == NULL)
+ return -ENOMEM;
+
+ len += snprintf(buf + len, size - len,
+ "Stations:\n"
+ " tid: addr sched paused buf_q-empty an ac\n"
+ " ac: addr sched tid_q-empty txq\n");
+
+ spin_lock(&sc->nodes_lock);
+ list_for_each_entry(an, &sc->nodes, list) {
+ len += snprintf(buf + len, size - len,
+ "%pM\n", an->sta->addr);
+ if (len >= size)
+ goto done;
+
+ for (q = 0; q < WME_NUM_TID; q++) {
+ struct ath_atx_tid *tid = &(an->tid[q]);
+ len += snprintf(buf + len, size - len,
+ " tid: %p %s %s %i %p %p\n",
+ tid, tid->sched ? "sched" : "idle",
+ tid->paused ? "paused" : "running",
+ list_empty(&tid->buf_q),
+ tid->an, tid->ac);
+ if (len >= size)
+ goto done;
+ }
+
+ for (q = 0; q < WME_NUM_AC; q++) {
+ struct ath_atx_ac *ac = &(an->ac[q]);
+ len += snprintf(buf + len, size - len,
+ " ac: %p %s %i %p\n",
+ ac, ac->sched ? "sched" : "idle",
+ list_empty(&ac->tid_q), ac->txq);
+ if (len >= size)
+ goto done;
+ }
+ }
+
+done:
+ spin_unlock(&sc->nodes_lock);
if (len > size)
len = size;
@@ -708,6 +787,13 @@ static const struct file_operations fops_xmit = {
.llseek = default_llseek,
};
+static const struct file_operations fops_stations = {
+ .read = read_file_stations,
+ .open = ath9k_debugfs_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
static ssize_t read_file_recv(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
@@ -945,6 +1031,10 @@ int ath9k_init_debug(struct ath_hw *ah)
sc, &fops_xmit))
goto err;
+ if (!debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy,
+ sc, &fops_stations))
+ goto err;
+
if (!debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy,
sc, &fops_recv))
goto err;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 23b2998..59c01ca 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -559,6 +559,10 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
spin_lock_init(&sc->sc_serial_rw);
spin_lock_init(&sc->sc_pm_lock);
mutex_init(&sc->mutex);
+#ifdef CONFIG_ATH9K_DEBUGFS
+ spin_lock_init(&sc->nodes_lock);
+ INIT_LIST_HEAD(&sc->nodes);
+#endif
tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);
tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet,
(unsigned long)sc);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index b716ffb..8684afa 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -545,6 +545,12 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta)
struct ath_hw *ah = sc->sc_ah;
an = (struct ath_node *)sta->drv_priv;
+#ifdef CONFIG_ATH9K_DEBUGFS
+ spin_lock(&sc->nodes_lock);
+ list_add(&an->list, &sc->nodes);
+ spin_unlock(&sc->nodes_lock);
+ an->sta = sta;
+#endif
if ((ah->caps.hw_caps) & ATH9K_HW_CAP_APM)
sc->sc_flags |= SC_OP_ENABLE_APM;
@@ -560,6 +566,13 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
{
struct ath_node *an = (struct ath_node *)sta->drv_priv;
+#ifdef CONFIG_ATH9K_DEBUGFS
+ spin_lock(&sc->nodes_lock);
+ list_del(&an->list);
+ spin_unlock(&sc->nodes_lock);
+ an->sta = NULL;
+#endif
+
if (sc->sc_flags & SC_OP_TXAGGR)
ath_tx_node_cleanup(sc, an);
}
--
1.7.2.3
^ permalink raw reply related
* [PATCH] mwifiex: remove struct ieee_types_erp_info
From: Bing Zhao @ 2011-01-07 4:59 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Johannes Berg, Amitkumar Karwar, Kiran Divekar,
Frank Huang, Bing Zhao
This structure is not necessary.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
---
drivers/net/wireless/mwifiex/ieee.h | 6 ------
drivers/net/wireless/mwifiex/scan.c | 5 +----
2 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/ieee.h b/drivers/net/wireless/mwifiex/ieee.h
index 70af50c..2282c0c 100644
--- a/drivers/net/wireless/mwifiex/ieee.h
+++ b/drivers/net/wireless/mwifiex/ieee.h
@@ -93,12 +93,6 @@ union ieee_types_phy_param_set {
struct ieee_types_ds_param_set ds_param_set;
} __packed;
-struct ieee_types_erp_info {
- u8 element_id;
- u8 len;
- u8 erp_flags;
-} __packed;
-
struct ieee_types_assoc_rsp {
__le16 cap_info_bitmap;
__le16 status_code;
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 104589e..83e466e 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1348,8 +1348,6 @@ mwifiex_interpret_bss_desc_with_ie(struct mwifiex_adapter *adapter,
u16 beacon_size;
u8 found_data_rate_ie;
u32 bytes_left_for_current_beacon;
- struct ieee_types_erp_info *erp_info;
-
struct ieee_types_vendor_specific *vendor_ie;
const u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 };
const u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 };
@@ -1532,8 +1530,7 @@ mwifiex_interpret_bss_desc_with_ie(struct mwifiex_adapter *adapter,
break;
case WLAN_EID_ERP_INFO:
- erp_info = (struct ieee_types_erp_info *) current_ptr;
- bss_entry->erp_flags = erp_info->erp_flags;
+ bss_entry->erp_flags = *(current_ptr + 2);
break;
case WLAN_EID_EXT_SUPP_RATES:
--
1.7.0.2
^ permalink raw reply related
* [PATCH] cfg80211: Extend channel to frequency mapping for 802.11j
From: Bruno Randolf @ 2011-01-07 5:26 UTC (permalink / raw)
To: johannes, linville; +Cc: linux-wireless
Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.
This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
include/net/cfg80211.h | 3 ++-
net/mac80211/ibss.c | 3 ++-
net/mac80211/mesh.c | 2 +-
net/mac80211/mlme.c | 8 +++++---
net/mac80211/scan.c | 3 ++-
net/wireless/reg.c | 6 +++---
net/wireless/util.c | 36 ++++++++++++++++++++++--------------
net/wireless/wext-compat.c | 5 ++++-
8 files changed, 41 insertions(+), 25 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bcc9f44..cfaac36 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1788,8 +1788,9 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
/**
* ieee80211_channel_to_frequency - convert channel number to frequency
* @chan: channel number
+ * @band: band, necessary due to channel number overlap
*/
-extern int ieee80211_channel_to_frequency(int chan);
+extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
/**
* ieee80211_frequency_to_channel - convert frequency to channel number
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 53c7077..775fb63 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -270,7 +270,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
enum ieee80211_band band = rx_status->band;
if (elems->ds_params && elems->ds_params_len == 1)
- freq = ieee80211_channel_to_frequency(elems->ds_params[0]);
+ freq = ieee80211_channel_to_frequency(elems->ds_params[0],
+ band);
else
freq = rx_status->freq;
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index ca3af46..1430cdc 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -574,7 +574,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
&elems);
if (elems.ds_params && elems.ds_params_len == 1)
- freq = ieee80211_channel_to_frequency(elems.ds_params[0]);
+ freq = ieee80211_channel_to_frequency(elems.ds_params[0], band);
else
freq = rx_status->freq;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 45fbb9e..33bd6d4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -176,7 +176,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
/* check that channel matches the right operating channel */
if (local->hw.conf.channel->center_freq !=
- ieee80211_channel_to_frequency(hti->control_chan))
+ ieee80211_channel_to_frequency(hti->control_chan, sband->band))
enable_ht = false;
if (enable_ht) {
@@ -429,7 +429,8 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
container_of((void *)bss, struct cfg80211_bss, priv);
struct ieee80211_channel *new_ch;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num);
+ int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num,
+ cbss->channel->band);
ASSERT_MGD_MTX(ifmgd);
@@ -1519,7 +1520,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
}
if (elems->ds_params && elems->ds_params_len == 1)
- freq = ieee80211_channel_to_frequency(elems->ds_params[0]);
+ freq = ieee80211_channel_to_frequency(elems->ds_params[0],
+ rx_status->band);
else
freq = rx_status->freq;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index fb274db..1ef73be 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -196,7 +196,8 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
ieee802_11_parse_elems(elements, skb->len - baselen, &elems);
if (elems.ds_params && elems.ds_params_len == 1)
- freq = ieee80211_channel_to_frequency(elems.ds_params[0]);
+ freq = ieee80211_channel_to_frequency(elems.ds_params[0],
+ rx_status->band);
else
freq = rx_status->freq;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 37693b6..c565689 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1801,9 +1801,9 @@ void regulatory_hint_disconnect(void)
static bool freq_is_chan_12_13_14(u16 freq)
{
- if (freq == ieee80211_channel_to_frequency(12) ||
- freq == ieee80211_channel_to_frequency(13) ||
- freq == ieee80211_channel_to_frequency(14))
+ if (freq == ieee80211_channel_to_frequency(12, IEEE80211_BAND_2GHZ) ||
+ freq == ieee80211_channel_to_frequency(13, IEEE80211_BAND_2GHZ) ||
+ freq == ieee80211_channel_to_frequency(14, IEEE80211_BAND_2GHZ))
return true;
return false;
}
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 7620ae2..4ed065d 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -29,29 +29,37 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
}
EXPORT_SYMBOL(ieee80211_get_response_rate);
-int ieee80211_channel_to_frequency(int chan)
+int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band)
{
- if (chan < 14)
- return 2407 + chan * 5;
-
- if (chan == 14)
- return 2484;
-
- /* FIXME: 802.11j 17.3.8.3.2 */
- return (chan + 1000) * 5;
+ /* see 802.11 17.3.8.3.2 and Annex J
+ * there are overlapping channel numbers in 5GHz and 2GHz bands */
+ if (band == IEEE80211_BAND_5GHZ) {
+ if (chan >= 182 && chan <= 196)
+ return 4000 + chan * 5;
+ else
+ return 5000 + chan * 5;
+ } else { /* IEEE80211_BAND_2GHZ */
+ if (chan == 14)
+ return 2484;
+ else if (chan < 14)
+ return 2407 + chan * 5;
+ else
+ return 0; /* not supported */
+ }
}
EXPORT_SYMBOL(ieee80211_channel_to_frequency);
int ieee80211_frequency_to_channel(int freq)
{
+ /* see 802.11 17.3.8.3.2 and Annex J */
if (freq == 2484)
return 14;
-
- if (freq < 2484)
+ else if (freq < 2484)
return (freq - 2407) / 5;
-
- /* FIXME: 802.11j 17.3.8.3.2 */
- return freq/5 - 1000;
+ else if (freq >= 4910 && freq <= 4980)
+ return (freq - 4000) / 5;
+ else
+ return (freq - 5000) / 5;
}
EXPORT_SYMBOL(ieee80211_frequency_to_channel);
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 3e5dbd4..7f1f4ec 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -267,9 +267,12 @@ int cfg80211_wext_freq(struct wiphy *wiphy, struct iw_freq *freq)
* -EINVAL for impossible things.
*/
if (freq->e == 0) {
+ enum ieee80211_band band = IEEE80211_BAND_2GHZ;
if (freq->m < 0)
return 0;
- return ieee80211_channel_to_frequency(freq->m);
+ if (freq->m > 14)
+ band = IEEE80211_BAND_5GHZ;
+ return ieee80211_channel_to_frequency(freq->m, band);
} else {
int i, div = 1000000;
for (i = 0; i < freq->e; i++)
^ permalink raw reply related
* [PATCH 1/4] iw: survey: Mark frequency in use
From: Bruno Randolf @ 2011-01-07 6:00 UTC (permalink / raw)
To: johannes, linville; +Cc: nbd, linux-wireless
Survey: Mark frequency in use according to NL80211_SURVEY_INFO_IN_USE.
This patch comes from OpenWRT. Original author: Felix Fietkau
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
survey.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/survey.c b/survey.c
index f9f2508..83c54b3 100644
--- a/survey.c
+++ b/survey.c
@@ -44,8 +44,9 @@ static int print_survey_handler(struct nl_msg *msg, void *arg)
}
if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
- printf("\tfrequency:\t%u MHz\n",
- nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]));
+ printf("\tfrequency:\t%u MHz%s\n",
+ nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]),
+ sinfo[NL80211_SURVEY_INFO_IN_USE] ? " [in use]" : "");
if (sinfo[NL80211_SURVEY_INFO_NOISE])
printf("\tnoise:\t\t%d dBm\n",
(int8_t)nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]));
^ permalink raw reply related
* [PATCH 2/4] iw: Add channel busy time to survey
From: Bruno Randolf @ 2011-01-07 6:00 UTC (permalink / raw)
To: johannes, linville; +Cc: nbd, linux-wireless
In-Reply-To: <20110107060025.21507.11061.stgit@localhost6.localdomain6>
Print channel busy time in survey dump.
This patch comes from OpenWRT. Original author: Felix Fietkau.
Fixed up for unsigned values.
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
survey.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/survey.c b/survey.c
index 83c54b3..e71d21b 100644
--- a/survey.c
+++ b/survey.c
@@ -44,12 +44,27 @@ static int print_survey_handler(struct nl_msg *msg, void *arg)
}
if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
- printf("\tfrequency:\t%u MHz%s\n",
+ printf("\tfrequency:\t\t\t%u MHz%s\n",
nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]),
sinfo[NL80211_SURVEY_INFO_IN_USE] ? " [in use]" : "");
if (sinfo[NL80211_SURVEY_INFO_NOISE])
- printf("\tnoise:\t\t%d dBm\n",
+ printf("\tnoise:\t\t\t\t%d dBm\n",
(int8_t)nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]));
+ if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME])
+ printf("\tchannel active time:\t\t%llu ms\n",
+ (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME]));
+ if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY])
+ printf("\tchannel busy time:\t\t%llu ms\n",
+ (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY]));
+ if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY])
+ printf("\textension channel busy time:\t%llu ms\n",
+ (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY]));
+ if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX])
+ printf("\tchannel receive time:\t\t%llu ms\n",
+ (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX]));
+ if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX])
+ printf("\tchannel transmit time:\t\t%llu ms\n",
+ (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX]));
return NL_SKIP;
}
^ permalink raw reply related
* [PATCH 3/4] iw: add multicast rates to IBSS join
From: Bruno Randolf @ 2011-01-07 6:00 UTC (permalink / raw)
To: johannes, linville; +Cc: nbd, linux-wireless
In-Reply-To: <20110107060025.21507.11061.stgit@localhost6.localdomain6>
Add multicast rates to IBSS join command.
This patch comes from OpenWRT. Original author: Felix Fietkau.
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
ibss.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/ibss.c b/ibss.c
index 84ea7f2..ca8a4ec 100644
--- a/ibss.c
+++ b/ibss.c
@@ -95,6 +95,20 @@ static int join_ibss(struct nl80211_state *state,
argc--;
}
+ /* multicast rate */
+ if (argc > 1 && strcmp(argv[0], "mcast-rate") == 0) {
+ argv++;
+ argc--;
+
+ rate = strtod(argv[0], &end);
+ if (*end != '\0')
+ return 1;
+
+ NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, (int) rate * 10);
+ argv++;
+ argc--;
+ }
+
if (!argc)
return 0;
@@ -120,12 +134,13 @@ COMMAND(ibss, leave, NULL,
NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss,
"Leave the current IBSS cell.");
COMMAND(ibss, join,
- "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval "
- "<TU>] [basic-rates <rate in Mbps,rate2,...>] [key d:0:abcde]",
+ "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval <TU>]"
+ " [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] "
+ "[key d:0:abcde]",
NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss,
"Join the IBSS cell with the given SSID, if it doesn't exist create\n"
"it on the given frequency. When fixed frequency is requested, don't\n"
"join/create a cell on a different frequency. When a fixed BSSID is\n"
"requested use that BSSID and do not adopt another cell's BSSID even\n"
"if it has higher TSF and the same SSID. If an IBSS is created, create\n"
- "it with the specified basic-rates and beacon-interval (in TU).");
+ "it with the specified basic-rates, multicast-rate and beacon-interval.");
^ permalink raw reply related
* [PATCH 4/4] iw: Add signal average to station dump information
From: Bruno Randolf @ 2011-01-07 6:00 UTC (permalink / raw)
To: johannes, linville; +Cc: nbd, linux-wireless
In-Reply-To: <20110107060025.21507.11061.stgit@localhost6.localdomain6>
Print station signal average in station dump.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
station.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/station.c b/station.c
index be2301f..6581d50 100644
--- a/station.c
+++ b/station.c
@@ -107,6 +107,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
if (sinfo[NL80211_STA_INFO_SIGNAL])
printf("\n\tsignal: \t%d dBm",
(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
+ if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
+ printf("\n\tsignal avg:\t%d dBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
^ permalink raw reply related
* Re: [PATCH 2/3] ath9k: Re-start xmit logic in xmit watchdog timer.
From: Vasanthakumar Thiagarajan @ 2011-01-07 6:51 UTC (permalink / raw)
To: greearb@candelatech.com
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net
In-Reply-To: <1294361165-15308-2-git-send-email-greearb@candelatech.com>
On Fri, Jan 07, 2011 at 06:16:04AM +0530, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> We should not get to this state, but we do. What is
> worse, many times the xmit logic still will not start,
> probably due to tids being paused when they shouldn't be.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>
> NOTE: This needs review. It might be too much of a hack
> for upstream code, and at best it works around a small part
> of the problem.
>
> :100644 100644 3aae523... 547fb44... M drivers/net/wireless/ath/ath9k/xmit.c
> drivers/net/wireless/ath/ath9k/xmit.c | 21 +++++++++++++++++++++
> 1 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index 3aae523..547fb44 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -2110,6 +2110,27 @@ static void ath_tx_complete_poll_work(struct work_struct *work)
> } else {
> txq->axq_tx_inprogress = true;
> }
> + } else {
> + /* If the queue has pending buffers, then it
> + * should be doing tx work (and have axq_depth).
> + * Shouldn't get to this state I think..but
> + * perhaps we do.
> + */
> + if (!list_empty(&txq->axq_acq)) {
> + ath_err(ath9k_hw_common(sc->sc_ah),
> + "txq: %p axq_qnum: %i,"
> + " axq_link: %p"
> + " pending frames: %i"
> + " axq_acq is not empty, but"
> + " axq_depth is zero. Calling"
> + " ath_txq_schedule to restart"
> + " tx logic.\n",
> + txq, txq->axq_qnum,
> + txq->axq_link,
> + txq->pending_frames);
> + ATH_DBG_WARN_ON_ONCE(1);
> + ath_txq_schedule(sc, txq);
NAK. This complete work monitors the hw q periodically and does a reset if a
hang is detected. This work is no way meant to schedule aggr. This
change really does not make any sense. Scheduling a tid periodically
would introduce reordering issues especially when there are more
retries.
Vasanth
^ permalink raw reply
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