dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

215 Commits

Author SHA1 Message Date
Pavel Roskin 4fc5401c14 ath5k: read sc->imask with sc->irqlock held
Signed-off-by: Pavel Roskin <proski@gnu.org>

sc->imask may change if ath5k_set_current_imask() races against itself.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:47:14 -04:00
Pavel Roskin e4bbf2f541 ath5k: fix formatting errors found by checkpatch.pl
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:32 -04:00
Pavel Roskin d2c7f7730e ath5k: fix misplaced or extraneous braces found by checkpatch.pl
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:31 -04:00
Pavel Roskin 633d006ee6 ath5k: use parentheses around macro definitions
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:31 -04:00
Pavel Roskin 25380d8068 ath5k: use DEFINE_PCI_DEVICE_TABLE in led.c, mark users with __devinit
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:30 -04:00
John W. Linville 0e8d1602b2 ath5k: free sc->ah in ath5k_deinit_softc
Nothing else is freeing it, and this mirrors the error handling path
already in ath5k_init_softc.

https://bugzilla.kernel.org/show_bug.cgi?id=37592

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Tsyvarev Andrey <tsyvarev@ispras.ru>
2011-06-20 15:34:19 -04:00
Pavel Roskin f5cbc8bac9 ath5k: minor cleanup
Move an extern variable declaration to a header file.  Prefix all
functions with "ath5k_".  Make ath5k_intr() static.  Remove unneeded
forward declarations.  Remove pointless "extern" in a function
declaration.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-17 14:22:26 -04:00
Nick Kossifidis a99168eece ath5k: Disable fast channel switching by default
Disable fast channel change by default on AR2413/AR5413 due to
some bug reports (it still works for me but it's better to be safe).
Add a module parameter "fastchanswitch" in case anyone wants to enable
it and play with it.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 14:19:49 -04:00
John W. Linville e00cf3b9eb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-tx.c
	net/mac80211/sta_info.h
2011-05-16 19:32:19 -04:00
Ben Greear d381f22119 ath5k: Fix lockup due to un-init spinlock.
This was introduced in 2.6.39-rc1 it seems.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-11 14:50:38 -04:00
John W. Linville cfef6047c4 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.c
	drivers/net/wireless/rt2x00/rt2x00queue.c
	drivers/net/wireless/rt2x00/rt2x00queue.h
2011-04-25 14:34:25 -04:00
Felix Fietkau fa9bfd61e0 ath5k: add a new bus op for reading the mac address
On AHB, the calibration data usually does not contain a valid MAC address,
the correct MAC address is stored in the board config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:09 -04:00
Felix Fietkau c266c71a9c ath5k: reduce interrupt load caused by rx/tx interrupts
While the rx/tx tasklet is pending, new unnecessary interrupts may arrive.
Decrease the load by temporarily disabling the interrupts until the tasklet
has completed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:27 -04:00
Felix Fietkau 5b7916ad8c ath5k: clean up debugfs code
The pointers to the debugfs entries do not need to be saved, because they
will be recursively removed when the wiphy is unregistered.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:24 -04:00
Felix Fietkau ed8950857f ath5k: remove ts_retry from ath5k_tx_status
Reusing the configured retry counts from the skb cb is more efficient than
reloading the data from uncached memory.
Replace ts_longretry (unused) with ts_final_retry which contains the retry
count for the final rate only

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:22 -04:00
Felix Fietkau 6d7b97b23e ath5k: fix tx status reporting issues
During normal operation, minstrel was showing suspicious EWMA probabilities
exceeding 100%. It looks like the tx status reporting in ath5k was not
properly clearing the rate index for rates which were never attempted.

This is caused by uninitialized stale data in the on-stack tx status
information, which is reused when more frames are received.

To fix this, rely on ts->ts_final_idx to select the last attempted rate,
instead of checking whether ts->ts_rate is set.

Additionally, the conversion from the driver rate index back to the
mac80211 rate index can be dropped, as the mac80211 tx status will still
have the original rate index which was used to set up the descriptor.

Additionally, one more inaccuracy was fixed - the final rate attempt
count only needs to be increased by one if the transmission attempt was
successful.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:59 -04:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
John W. Linville 81266baf04 ath5k: implement ieee80211_ops->{get,set}_ringparam
set_ringparam only allows changes to tx ring at this time.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-11 15:34:18 -05:00
Ben Greear e4b0b32aa1 ath5k: Put hardware in PROMISC mode if there is more than 1 stations.
It seems ath5k has issues receiving broadcast packets (ARPs) when
using multiple STA interfaces associated with multiple APs.
This patch ensures the NIC is always in PROMISC mode if there
are more than 1 stations associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-07 13:48:30 -05:00
Johannes Berg 7bb4568372 mac80211: make tx() operation return void
The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).

Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.

Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25 15:32:34 -05:00
Johannes Berg 6ebacbb79d mac80211: rename RX_FLAG_TSFT
The flag isn't very descriptive -- the intention
is that the driver provides a TSF timestamp at
the beginning of the MPDU -- make that clearer
by renaming the flag to RX_FLAG_MACTIME_MPDU.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:25:29 -05:00
John W. Linville 3e11210d46 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/ath/ath9k/init.c
2011-01-28 16:23:14 -05:00
Bruno Randolf 76a9f6fd9a ath5k: Fix short and long retry configuration
The register definition for retry configuration on AR5212 was wrong, and simply
copied over from AR5210. Update the register definitions from the documentation.

Let the short and long retries be configured from mac80211 and use the standard
values of 7 and 4 by default. Also we need to make sure we don't export more
retries than we are configured for to mac80211 (and the rate module) in
hw->max_rate_tries.

Also clean up the code by removing unused defines and variables and drop the
different values for "station retries" - if these need to be different it can
be handled tru ah_retry_long/short.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-28 15:46:23 -05:00
Bob Copeland 0e4722524d ath5k: use tracing for packet tx/rx dump
This adds a few tracepoints to ath5k driver transmit and
receive callbacks in order to record packet traffic.
We record the entire packet in the trace buffer so that
the data can be extracted with trace-cmd and external
plugins.

Compared to the previous debugging calls, this approach
removes an out-of-line function call from the tx and rx
paths in the compiled-in-but-disabled case, while
improving the ability to process the logged data.

A new option, CONFIG_ATH5K_TRACER, is added so that one
may disable the tracepoints completely.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-28 15:44:27 -05:00
Bruno Randolf 97d9c3a354 ath5k: ath5k_setup_channels cleanup and whitespace
Remove useless test_bit - it's not going to happen because of the way this
function is called only when that bit is set.

And fix some whitespace.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-25 16:39:06 -05:00
Bruno Randolf 2b1351a307 ath5k: Simplify loop when setting up channels
Simplify confusing code and get rid of an unnecessary variable.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 16:21:42 -05:00
Bruno Randolf 930a7622d6 ath5k: Remove redundant sc->curband
Remove sc->curband because the band is already stored in the current channel.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:35:46 -05:00
Bruno Randolf 4b3721ceb3 ath5k: Remove unused sc->curmode
sc->curmode is set but never used. Remove it and the helper function. Also the
ath5k_rate_update which is refered to in the comment does not exist (any more?)
so we don't need to setup the band in that place.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:35:46 -05:00
Bruno Randolf 410e6120a5 ath5k: Add 802.11j 4.9GHz channels to allowed channels
Add the 802.11j (20MHz channel width) channels to the allowed channels. This
still does not enable 802.11j in ath5k since these frequencies are out of the
configured range. A later patch will deal with that.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:35:46 -05:00
Bruno Randolf 0810569076 ath5k: Rename ath5k_copy_channels
Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
here.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:34:18 -05:00
Bruno Randolf 90c02d72ff ath5k: Use mac80211 channel mapping function
Use mac80211 channel mapping function instead of own homegrown version.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:34:18 -05:00
Bob Copeland 599b13adc2 ath5k: fix locking in tx_complete_poll_work
ath5k_reset must be called with sc->lock.  Since the tx queue
watchdog runs in a workqueue and accesses sc, it's appropriate
to just take the lock over the whole function.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-18 15:10:31 -05:00
John W. Linville 18cb6e32e7 ath5k: qualify global modparam_nohwcrypt variable
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-05 14:36:27 -05:00
Bob Copeland bb007554fe ath5k: fix cycle counter inconsistent locking
ath5k_reset is called from process context and takes the cc_lock
with plain spin_lock(), but cc_lock can also be taken from tasklets
in softirq context.  Thus we need to at least use spin_lock_bh.

This fixes the following lockdep warning:

[   19.967874] sky2 0000:01:00.0: eth0: enabling interface
[   19.982761] ieee80211 phy0: device now idle
[   20.904809] NET: Registered protocol family 17
[   21.243857] ieee80211 phy0: device no longer idle - scanning
[   21.404343]
[   21.404346] =================================
[   21.404450] [ INFO: inconsistent lock state ]
[   21.404518] 2.6.37-rc7-wl+ #242
[   21.404582] ---------------------------------
[   21.404650] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[   21.404721] kworker/u:4/982 [HC0[0]:SC1[3]:HE1:SE0] takes:
[   21.404792]  (&(&common->cc_lock)->rlock){+.?...}, at: [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011] {SOFTIRQ-ON-W} state was registered at:
[   21.405011]   [<c105cadd>] __lock_acquire+0x62f/0x13c1
[   21.405011]   [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]   [<c12c978d>] _raw_spin_lock+0x45/0x72
[   21.405011]   [<f8111533>] ath5k_reset+0x2c0/0x349 [ath5k]
[   21.405011]   [<f8111a7a>] ath5k_start+0xb8/0x139 [ath5k]
[   21.405011]   [<f849c714>] ieee80211_do_open+0x13f/0x819 [mac80211]
[   21.405011]   [<f849ce51>] ieee80211_open+0x63/0x66 [mac80211]
[   21.405011]   [<c1258b2e>] __dev_open+0x8d/0xb6
[   21.405011]   [<c1255c64>] __dev_change_flags+0x9d/0x114
[   21.405011]   [<c1258a75>] dev_change_flags+0x18/0x44
[   21.405011]   [<c1262990>] do_setlink+0x23f/0x521
[   21.405011]   [<c1262d58>] rtnl_setlink+0xe6/0xea
[   21.405011]   [<c126347c>] rtnetlink_rcv_msg+0x18a/0x1a0
[   21.405011]   [<c126d5f0>] netlink_rcv_skb+0x35/0x7b
[   21.405011]   [<c12632eb>] rtnetlink_rcv+0x20/0x27
[   21.405011]   [<c126d370>] netlink_unicast+0x1bb/0x21e
[   21.405011]   [<c126db21>] netlink_sendmsg+0x23b/0x288
[   21.405011]   [<c124823c>] sock_sendmsg+0xac/0xc4
[   21.405011]   [<c1248680>] sys_sendmsg+0x152/0x1a2
[   21.405011]   [<c1249b0d>] sys_socketcall+0x214/0x275
[   21.405011]   [<c10029d0>] sysenter_do_call+0x12/0x36
[   21.405011] irq event stamp: 138032
[   21.405011] hardirqs last  enabled at (138032): [<c12ca252>] _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011] hardirqs last disabled at (138031): [<c12c98cc>] _raw_spin_lock_irqsave+0x18/0x7e
[   21.405011] softirqs last  enabled at (138024): [<f84a570e>] ieee80211_tx_skb+0x47/0x49 [mac80211]
[   21.405011] softirqs last disabled at (138027): [<c100452b>] do_softirq+0x63/0xb4
[   21.405011]
[   21.405011] other info that might help us debug this:
[   21.405011] 3 locks held by kworker/u:4/982:
[   21.405011]  #0:  (name){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #1:  ((&(&local->scan_work)->work)){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #2:  (&local->mtx){+.+.+.}, at: [<f84920fb>] ieee80211_scan_work+0x32/0x4a4 [mac80211]
[   21.405011]
[   21.405011] stack backtrace:
[   21.405011] Pid: 982, comm: kworker/u:4 Not tainted 2.6.37-rc7-wl+ #242
[   21.405011] Call Trace:
[   21.405011]  [<c12c6e68>] ? printk+0x1d/0x25
[   21.405011]  [<c105a742>] print_usage_bug+0x181/0x18b
[   21.405011]  [<c105b196>] ? check_usage_forwards+0x0/0xb6
[   21.405011]  [<c105a9ec>] mark_lock+0x2a0/0x4aa
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c105ca68>] __lock_acquire+0x5ba/0x13c1
[   21.405011]  [<c1059eed>] ? trace_hardirqs_off_caller+0x18/0x8d
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c1050411>] ? local_clock+0x2c/0x4f
[   21.405011]  [<c1059e00>] ? save_trace+0x2/0xa0
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<c12ca252>] ? _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c12c9b1a>] _raw_spin_lock_bh+0x4a/0x77
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<f8113496>] ath5k_tasklet_ani+0x1d/0x27 [ath5k]
[   21.405011]  [<c1037304>] tasklet_action+0x96/0x137
[   21.405011]  [<c10379b5>] __do_softirq+0xde/0x1c3
[   21.405011]  [<c10b0cef>] ? arch_get_unmapped_area_topdown+0x3b/0x127
[   21.405011]  [<c10378d7>] ? __do_softirq+0x0/0x1c3
[   21.405011]  <IRQ>  [<c1036dee>] ? irq_exit+0x3d/0x49
[   21.405011]  [<c1003b4f>] ? do_IRQ+0x98/0xac
[   21.405011]  [<c1002eee>] ? common_interrupt+0x2e/0x34
[   21.405011]  [<c103007b>] ? sys_unshare+0x57/0x226
[   21.405011]  [<c1047fee>] ? queue_delayed_work+0x1/0x27
[   21.405011]  [<f84a83a0>] ? ieee80211_queue_delayed_work+0x2e/0x33 [mac80211]
[   21.405011]  [<f8492528>] ? ieee80211_scan_work+0x45f/0x4a4 [mac80211]
[   21.405011]  [<c104620e>] ? process_one_work+0x26e/0x41b
[   21.405011]  [<c1046158>] ? process_one_work+0x1b8/0x41b
[   21.405011]  [<f84920c9>] ? ieee80211_scan_work+0x0/0x4a4 [mac80211]
[   21.405011]  [<c10466b6>] ? worker_thread+0x18a/0x2a5
[   21.405011]  [<c12ca25e>] ? _raw_spin_unlock_irqrestore+0x47/0x5e
[   21.405011]  [<c104652c>] ? worker_thread+0x0/0x2a5
[   21.405011]  [<c104abe7>] ? kthread+0x67/0x6c
[   21.405011]  [<c104ab80>] ? kthread+0x0/0x6c
[   21.405011]  [<c1002efa>] ? kernel_thread_helper+0x6/0x10

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:12 -05:00
Bruno Randolf cd2c548652 ath5k: Move mac80211 functions into new file
Move mac80211 functions into new file mac80211-ops.c to have a better
separation and to make base.c smaller.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:11 -05:00
Bruno Randolf 3de135dba9 ath5k: Set available antenna information for cfg80211
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:47 -05:00
Bruno Randolf f15a4bb263 ath5k: Fix survey
The old survey implementation was broken and returned nonsense data.

Clear cycle counters and survey data on reset. Since the cycle counters easily
overflow it's better to keep a local version of collected survey data (in ms
resolution, instead of clockrate) and update this every time survey is
retrieved. If survey is retrieved often enough to avoid cycle counter overflows
this works fine, otherwise we could update survey more often, like ath9k does.
Still only the survey for the current channel is kept.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
John W. Linville 393934c6b5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/ath/ath9k/ath9k.h
	drivers/net/wireless/ath/ath9k/main.c
	drivers/net/wireless/ath/ath9k/xmit.c
2010-12-08 16:23:31 -05:00
Javier Cardona b93996cf67 ath5k: Put the right tsf value in mesh beacons
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08 15:23:46 -05:00
Javier Cardona c26d533942 ath5k: Prevent mesh interfaces from being counted as ad-hoc
This results in an erroneus num_adhoc_vifs count, as the this counter
was incremented but not decremented for mesh interfaces.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08 15:23:45 -05:00
Javier Cardona d82b577b8c ath5k: Fix beaconing in mesh mode
This patch fixes the oops below when attempting to bring up a mesh
interface on ath5k hardware.

[  128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
[  128.933099] invalid opcode: 0000 [#1]
(...)
[  128.933099] Call Trace:
[  128.933099]  [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
[  128.933099]  [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
[  128.933099]  [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
[ath5k]
[  128.933099]  [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
[mac80211]
[  128.933099]  [<c82f073e>] ?
ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
[  128.933099]  [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
[  128.933099]  [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
[mac80211]
[  128.933099]  [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
[  128.933099]  [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
[  128.933099]  [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08 15:23:44 -05:00
Bruno Randolf 22d8d9f81b ath5k: Use capabilities information for the number of TX queues
One thing I missed in my WME series: Older hardware does not have enough
hardware queues to support WME. In this case we just set up one data queue. Use
the capability information to decide how many queues to set up.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07 17:07:54 -05:00
John W. Linville b7555ec7c6 ath5k: remove MODULE_VERSION
Since this is updated manually and sporadically, it is fairly useless
anyway.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07 16:34:49 -05:00
Joe Perches 226afe68fd ath: Convert ath_print to ath_dbg
Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07 16:34:48 -05:00
Nick Kossifidis b9e61f11f4 ath5k: Include tx ack reporting on hw flags
* Since we report tx acks to the protocol stack, add the needed
 flag to hw_flags. This way we'll also use the new AP probing mechanism.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-06 16:01:28 -05:00
Nick Kossifidis 344b54b971 ath5k: Disable ANI during reset
* Stop ANI durring reset to prevent false PHY error reports

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-06 16:01:27 -05:00
Nick Kossifidis 19252ecb67 ath5k: Always free tx buffers before reset
* Always free tx buffers before reset, since we also empty hw queues.
 If we don't and a queue gets stuck, we'll never decrease txq_len and sw
 will keep thinking the queue is still stuck even after reset.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-06 16:00:23 -05:00
Bruno Randolf 5dcc03fe29 ath5k: Use EWMA factor of 1024 instead of 1000
This prepares the only place which uses the EWMA library so far for the
performance improved implementation coming up, which requires factor and
weight to be a power of two.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-06 15:58:43 -05:00
Felix Fietkau 4cebb34caa ath5k: Fix reset and interrupts for AHB type of devices.
On WiSoc we cannot access mac register before it is resetted.
It will crash hardware otherwise.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-02 15:17:51 -05:00
Felix Fietkau a0b907ee2a ath5k: Add AHB bus support.
AHB specific functions are now in ahb.c file. AHB bus is
compiled in when CONFIG_ATHEROS_AR231X is set in kernel.
All other platforms will use PCI bus.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-02 15:17:51 -05:00