aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-01-25ath5k: ath5k_setup_channels cleanup and whitespaceBruno Randolf1-8/+3
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-21ath5k: Simplify loop when setting up channelsBruno Randolf1-4/+3
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-21ath5k: Remove redundant sc->curbandBruno Randolf2-9/+4
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-21ath5k: Remove unused sc->curmodeBruno Randolf2-19/+0
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-21ath5: Remove unused CTL definitionsBruno Randolf1-23/+0
They are unused in ath5k and a more detailled definition is in ath/regd_common.h. 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-21ath5k: Add 802.11j 4.9GHz channels to allowed channelsBruno Randolf1-6/+13
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-21ath5k: Rename ath5k_copy_channelsBruno Randolf1-4/+4
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-21ath5k: Use mac80211 channel mapping functionBruno Randolf1-15/+8
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-19ath5k: Fix return codes for eeprom read functions.Wojciech Dubowik4-26/+19
Eeprom read functions are of bool type and not int. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-13Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-3/+3
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-05ath5k: qualify global modparam_nohwcrypt variableJohn W. Linville2-4/+4
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04ath5k: ath5k_eeprom_mode_from_channel() returns signedDan Carpenter1-2/+4
ath5k_eeprom_mode_from_channel() returns -1 on error but we're storing the result in "ee_mode" which is an unsigned char. This breaks the error handling. This patch makes "ee_mode" an int. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04ath5k: fix cycle counter inconsistent lockingBob Copeland1-2/+2
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-04ath5k: Move mac80211 functions into new fileBruno Randolf3-713/+825
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>
2010-12-22ath5k: Use helper function to get eeprom mode from channelBruno Randolf5-65/+42
Introduce a helper function to get the EEPROM mode from channel and remove multiple similar switch statements. Also since it's now easy to get the EEPROM mode from the channel, use them inside the functions which need it, instead of passing a redundant ee_mode parameter. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath5k: Remove ATH5K_INI_RFGAIN defines, use band insteadBruno Randolf3-25/+10
Remove redundant defines. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath5k: Track current TX power separately from max TX powerBruno Randolf2-4/+4
Add a new variable to keep track of the currently configured tx power. Before max_pwr was re-used for keeping the maximum allowed power as well as the current configuration. Doing a min() on it allows you to lower the txpower, but how would you be able to make it higher again? This patch fixes that by adding a new variable ah_cur_pwr which is used instead of txp_max_pwr to keep the current configuration. txp_max_pwr is used to check if we are within the limits. Another problem fixed by this patch is that it avoids setting a zero txpower when things are initialized first and the current power is not yet set. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath5k: Separate powertable setup and writingBruno Randolf1-18/+16
And rename functions which write the powertable to make it clearer. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath5k: Simplify powertable recalculationBruno Randolf2-22/+14
Let ath5k_hw_txpower() decide if it can re-use the powertable or if it has to be recalculated instead of passing a 'fast' flag from the outside. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath5k: Use pci_is_pcie()Hauke Mehrtens2-3/+3
Use function pci_is_pcie() instead of accessing struct member directly. CC: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22Merge branch 'master' into for-nextJiri Kosina1-5/+8
Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
2010-12-20ath5k: Set available antenna information for cfg80211Bruno Randolf1-0/+4
Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16ath5k: Fix surveyBruno Randolf2-12/+25
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-09ath5k: Fix modinfo does not list alias -> pci-id linesSedat Dilek1-0/+1
The AHB bus support patchset moved the table "Known PCI ids" from base.c to pci.c - unfortunately, MODULE_DEVICE_TABLE() was not transferred. With this fix 'modinfo ath5k' lists the alias -> pci-id lines, again. The issue was introduced by: commit e5b046d86fac609f636d127a38de94a175c7e83b "ath5k: Move PCI bus functions to separate file." Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville1-5/+8
Conflicts: drivers/net/wireless/ath/ath9k/ath9k.h drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/ath/ath9k/xmit.c
2010-12-08ath5k: Put the right tsf value in mesh beaconsJavier Cardona1-1/+2
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08ath5k: Prevent mesh interfaces from being counted as ad-hocJavier Cardona1-1/+1
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-08ath5k: Fix beaconing in mesh modeJavier Cardona1-3/+5
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-07ath5k: Use capabilities information for the number of TX queuesBruno Randolf2-28/+41
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-07ath5k: remove MODULE_VERSIONJohn W. Linville1-1/+0
Since this is updated manually and sporadically, it is fairly useless anyway. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath: Convert ath_print to ath_dbgJoe Perches2-2/+0
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-06ath5k: Include tx ack reporting on hw flagsNick Kossifidis1-2/+3
* 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-06ath5k: Fix reporting of RX dma stop failureNick Kossifidis1-1/+1
* Correctly report failure to stop RX DMA 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-06ath5k: Disable ANI during resetNick Kossifidis1-2/+8
* 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-06ath5k: Always free tx buffers before resetNick Kossifidis1-2/+4
* 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-06ath5k: Always write tx powertable on hwNick Kossifidis1-12/+21
* By skipping tx power table calibration we also skip setting tx power table on hw. Make sure we always write tx power table on hw since it gets cleared on 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-06ath5k: Use EWMA factor of 1024 instead of 1000Bruno Randolf1-1/+1
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-02ath5k: Fix reset and interrupts for AHB type of devices.Felix Fietkau2-13/+97
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-02ath5k: Add AHB bus support.Felix Fietkau7-4/+322
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-02ath5k: Add initial registers values for radio RF2317 chip.Felix Fietkau1-0/+23
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-02ath5k: Add a function to read chipset's MAC revisionFelix Fietkau3-5/+16
Add bus dependent revision read function which is used to determine chipset's MAC before hardware is initialized. 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-02ath5k: Check if pci pdev struct is initialized in common functions.Felix Fietkau4-8/+10
To be able to support other busses than PCI check if pci device structure is initialized. 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-02ath5k: Use generic eeprom read from common ath_bus_opts struct.Felix Fietkau4-37/+45
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-02ath5k: Move PCI bus functions to separate file.Felix Fietkau4-266/+289
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-02ath5k: Introduce ath5k_init_softc function as in ath9kFelix Fietkau5-153/+217
Split pci initialization into hardware specific functions and softc structure initialization. Make function naming similar to ones ath9k. Introduce ath_bus_opts in ath5k for later AHB bus integration. 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-02ath5k: Use Generic DMA for later support of AHB bus.Felix Fietkau2-31/+39
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-11-30ath5k: Set turbo bit on rf bank 2Nick Kossifidis2-3/+29
* A diff between rfbuffer settings of turbo and non-turbo modes indicates there is a bit on bank 2 related to turbo operation (it's set on turbo modes). This bit is present on all radios except RF5413 that seems to have a completely different bank 2. Also since 2317 has the same rf-registers locations with 2425 and since the bit exists on 2317 I assume it also exists on 2425/2417). So in case we use turbo mode (40MHz) enable it on bank modification. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-30ath5k: Clean up turbo mode initvals/rfregsNick Kossifidis5-976/+577
* Clean up what's left of turbo mode, since we handle all register modifications (rfbuffer comes next) on code there is no need to have duplicated arrays. * Rename change_channel to skip_pcu on initvals.c as we did on reset.c Signed-off-by: Nick Kossifidis <micklfemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-30ath5k: Cleanup turbo channel flagsNick Kossifidis4-43/+10
* Clean up CHANNEL_T(URBO), use AR5K_BWMODE_40MHZ instead Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-30ath5k: Use correct clock when setting ofdm timingsNick Kossifidis1-2/+14
* Use correct clock value when setting OFDM timings on non-default bwmodes. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>