]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 years agowl12xx: increase dynamic PS timeout to 200ms
Arik Nemtsov [Mon, 27 Feb 2012 22:41:34 +0000 (00:41 +0200)]
wl12xx: increase dynamic PS timeout to 200ms

This ensures the user won't encounter lag associated with getting in and
out of PSM when the card is in use.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: flush Tx during suspend and 802.11h chan switch
Arik Nemtsov [Mon, 27 Feb 2012 22:41:33 +0000 (00:41 +0200)]
wl12xx: flush Tx during suspend and 802.11h chan switch

Flush our Tx queues before suspending or changing the channel due to a
channel_switch element in the AP beacon.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: flush all Tx queues on tx_flush timeout
Arik Nemtsov [Mon, 27 Feb 2012 22:41:32 +0000 (00:41 +0200)]
wl12xx: flush all Tx queues on tx_flush timeout

Ensure our queues are empty at the end of a tx_flush(), in case we
timeout on passively waiting for them. This makes sure no left-overs are
transmitted when we are on the wrong channel.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: avoid starving the system hlid
Arik Nemtsov [Mon, 27 Feb 2012 22:41:31 +0000 (00:41 +0200)]
wl12xx: avoid starving the system hlid

Re-factor the Tx scheduler so that the system_hlid is taken into account
before restarting an iteration over the wlvifs. Previously this
hlid had a lower priority and would starve if some wlvif had many
packets.
In addition avoid iterating over wlvifs past last_wlvif when performing
the a second pass. If we had packets in those wlvifs they would have
been found earlier.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: reset link Tx queues when freeing it
Arik Nemtsov [Mon, 27 Feb 2012 22:41:30 +0000 (00:41 +0200)]
wl12xx: reset link Tx queues when freeing it

Before, the link was first freed (invalidating it in the map), and later
on vif removal, all valid wlvif-related links were reset. Since these
links were already invalid, we failed to reset them.
The bug was made worse by op_stop, which set the tx_queue_count to 0
arbitrarily. This resulted in a negative tx_queue_count in some scenarios.

Fix this by resetting the Tx-queues of a link when freeing it. Add a
WARN_ON and reset all link Tx-queues in op_stop, to avoid a negative
tx_queue_count.

[changed WARN_ON to WARN_ON_ONCE -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: change bits in the link_map under spin lock
Arik Nemtsov [Mon, 27 Feb 2012 22:41:29 +0000 (00:41 +0200)]
wl12xx: change bits in the link_map under spin lock

These bits are used in op_tx to determine if a packet should be dropped.
As such we should use the spin lock to sync the state.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: set the ELP entry delay to the FW dyn-ps timeout
Arik Nemtsov [Mon, 27 Feb 2012 22:41:28 +0000 (00:41 +0200)]
wl12xx: set the ELP entry delay to the FW dyn-ps timeout

With PSM handled in FW, the checks in wl1271_elp_work() are always true.
Thus during active traffic we constantly enter and exit ELP (many times
per second). As each ELP exit takes ~10ms, this can have an adverse
effect on throughput and interactivity.
Set the ELP timeout to the dyn-ps timeout. This period is longer and
avoids the above problem. It also makes sense to stay out of ELP while
we are awake on the network, to minimize delays in Tx/Rx. The same thing
was done by the mac80211 dynamic-ps mechanism before the FW DPS changes.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agort2800pci: Fix 'Error - MCU request failed' during initialization
Jakub Kicinski [Wed, 22 Feb 2012 20:58:58 +0000 (21:58 +0100)]
rt2800pci: Fix 'Error - MCU request failed' during initialization

Bring MCU operations during device initialization to sync
with legacy driver.

This should fix following error:
phy0 -> rt2800pci_mcu_status: Error - MCU request failed,
no response from hardware

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: Add documentation on MCU requests
Jakub Kicinski [Wed, 22 Feb 2012 20:58:57 +0000 (21:58 +0100)]
rt2800: Add documentation on MCU requests

Add documentation on MCU communication, some of known commands and
their arguments. Supplement command ids.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: iwl-agn.h included twice
Danny Kukawka [Wed, 15 Feb 2012 17:55:16 +0000 (18:55 +0100)]
iwlwifi: iwl-agn.h included twice

drivers/net/wireless/iwlwifi/iwl-core.c included 'iwl-agn.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: correctly line up a multiline printk
Antonio Quartulli [Sun, 26 Feb 2012 17:40:04 +0000 (18:40 +0100)]
mac80211_hwsim: correctly line up a multiline printk

The second line of a printk statement must line up to the opening bracket.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove local_to_hw
Johannes Berg [Sun, 26 Feb 2012 10:24:35 +0000 (11:24 +0100)]
mac80211: remove local_to_hw

That's a lot longer than open-coding it and
doesn't really add value, so just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix sta_info_flush() return value
Johannes Berg [Sat, 25 Feb 2012 20:40:46 +0000 (21:40 +0100)]
mac80211: fix sta_info_flush() return value

The comment for sta_info_flush() states
"Returns the number of removed STA entries"
but that isn't actually true. Consequently,
the warning when a station is still around
on interface removal can never trigger and
this delayed finding the timer issue the
previous patch fixed. Fix the return value
here to make that warning useful again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix auth/assoc data & timer leak
Johannes Berg [Sat, 25 Feb 2012 20:48:08 +0000 (21:48 +0100)]
mac80211: fix auth/assoc data & timer leak

When removing an interface while it is in the
process of authenticating or associating, we
leak the auth_data or assoc_data, and leave
the timer pending. The timer then crashes the
system when it fires as its data is gone.

Fix this by explicitly deleting all the data
when the interface is removed. This uncovered
another bug -- this problem should have been
detected by the sta_info_flush() warning but
that function doesn't ever return non-zero,
I'll fix that in a separate patch.

Reported-by: Hieu Nguyen <hieux.c.nguyen@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: use correct firmware filename
Rafał Miłecki [Fri, 24 Feb 2012 06:22:51 +0000 (07:22 +0100)]
brcm80211: fmac: use correct firmware filename

Also don't use so generic BRCMF_USB_FW_NAME as we may need different
firmwares in the future.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: fix a couple checking after dereference bugs
Dan Carpenter [Fri, 24 Feb 2012 06:22:27 +0000 (09:22 +0300)]
brcm80211: fmac: fix a couple checking after dereference bugs

There were two dereferencing before checking for NULL static checker
complaints in this new file.  The list cursor is never NULL so that
check can be removed.  I moved the other dereference after the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/wireless: ipw2x00: Use IW_HANDLER macro from linux/wireless.h
Stanislav Yakovlev [Thu, 23 Feb 2012 22:31:24 +0000 (17:31 -0500)]
net/wireless: ipw2x00: Use IW_HANDLER macro from linux/wireless.h

Use IW_HANDLER macro in ipw2100.c to declare wireless handlers.

Note: ipw2200.c already uses it.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use proper sub_if_data on suspend path
Jakub Kicinski [Thu, 23 Feb 2012 01:17:48 +0000 (02:17 +0100)]
mac80211: use proper sub_if_data on suspend path

Use interface data from sta instead of invalid pointer
to list head in calls to drv_sta_state.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Cleanup mci.c
Sujith Manoharan [Wed, 22 Feb 2012 09:13:52 +0000 (14:43 +0530)]
ath9k: Cleanup mci.c

Cleanup whitespace, fix indentation and coding style.
Also remove debug messages that were flooding the log.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: MCI whitespace/debug cleanup
Sujith Manoharan [Wed, 22 Feb 2012 07:12:21 +0000 (12:42 +0530)]
ath9k_hw: MCI whitespace/debug cleanup

This patch fixes indentation and the general coding style
in ar9003_mci.c. Also, minimize the amount of debug log
output generated by MCI.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Remove HW revision checks
Sujith Manoharan [Wed, 22 Feb 2012 07:12:15 +0000 (12:42 +0530)]
ath9k_hw: Remove HW revision checks

They are not needed since MCI will be enabled only for
AR9462 v2.0

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI reset routine
Sujith Manoharan [Wed, 22 Feb 2012 07:12:10 +0000 (12:42 +0530)]
ath9k_hw: Cleanup MCI reset routine

* Use a separate function to enable/disable
  OneStepLookAhead.

* Remove unnecessary hardware SREV checks.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Modify ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 07:12:04 +0000 (12:42 +0530)]
ath9k: Modify ATH9K_BTCOEX_SUPPORT

ATH9K_BTCOEX_SUPPORT is now used by both ath9k and ath9k_htc
to enable BT coexistence. Fix Kbuild to allow this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove ATH9K_HW_CAP_MCI checks
Sujith Manoharan [Wed, 22 Feb 2012 07:11:59 +0000 (12:41 +0530)]
ath9k: Remove ATH9K_HW_CAP_MCI checks

With the ability to remove BTCOEX support at compile time,
these checks are no longer needed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove ATH_BTCOEX_CFG_NONE checks
Sujith Manoharan [Wed, 22 Feb 2012 07:11:52 +0000 (12:41 +0530)]
ath9k: Remove ATH_BTCOEX_CFG_NONE checks

Since BTCOEX code can be compiled out cleanly now,
remove these checks.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Use CONFIG_ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 07:11:47 +0000 (12:41 +0530)]
ath9k_htc: Use CONFIG_ATH9K_BTCOEX_SUPPORT

ath9k_htc can also make use of CONFIG_ATH9K_BTCOEX_SUPPORT
to be compiled without BTCOEX support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Init BTCOEX inside htc_drv_gpio.c
Sujith Manoharan [Wed, 22 Feb 2012 07:11:41 +0000 (12:41 +0530)]
ath9k_htc: Init BTCOEX inside htc_drv_gpio.c

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Start/stop btcoex using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:11:36 +0000 (12:41 +0530)]
ath9k_htc: Start/stop btcoex using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Use CONFIG_ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 12:25:47 +0000 (17:55 +0530)]
ath9k_hw: Use CONFIG_ATH9K_BTCOEX_SUPPORT

Make use of CONFIG_ATH9K_BTCOEX_SUPPORT in ath9k_hw
to provide a clean way of compilation without BTCOEX
support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI function declarations
Sujith Manoharan [Wed, 22 Feb 2012 07:11:24 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI function declarations

This patch converts a few functions to static variants
and removes extraneous declarations.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI bits from hw.h
Sujith Manoharan [Wed, 22 Feb 2012 07:11:18 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI bits from hw.h

This patch moves all the MCI-specific declarations that have been
dumped unceremoniously in hw.h to ar9003_mci.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI bits from ath9k_hw_reset()
Sujith Manoharan [Wed, 22 Feb 2012 07:11:12 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI bits from ath9k_hw_reset()

This patch moves all the MCI-specific code in the main reset
function to helper functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Setup MCI calibration using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:11:06 +0000 (12:41 +0530)]
ath9k_hw: Setup MCI calibration using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Handle MCI power state using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:11:01 +0000 (12:41 +0530)]
ath9k_hw: Handle MCI power state using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Use a helper function to get MCI ISR
Sujith Manoharan [Wed, 22 Feb 2012 07:10:55 +0000 (12:40 +0530)]
ath9k_hw: Use a helper function to get MCI ISR

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Initialize BTCOEX scheme using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:10:49 +0000 (12:40 +0530)]
ath9k: Initialize BTCOEX scheme using a helper

Setting up the required scheme can be done as part of the
BTCOEX initialization path and it doesn't belong in
ath9k_hw_fill_cap_info() anyway.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Use CONFIG_ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 07:10:44 +0000 (12:40 +0530)]
ath9k: Use CONFIG_ATH9K_BTCOEX_SUPPORT

This patch uses CONFIG_ATH9K_BTCOEX_SUPPORT to conditionally
compile btcoex-related code in the driver core.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Calculate ampdu limit using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:10:38 +0000 (12:40 +0530)]
ath9k: Calculate ampdu limit using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Process BTCOEX interrupts using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:10:32 +0000 (12:40 +0530)]
ath9k: Process BTCOEX interrupts using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Use proper start/stop routines for BTCOEX
Sujith Manoharan [Wed, 22 Feb 2012 07:10:27 +0000 (12:40 +0530)]
ath9k: Use proper start/stop routines for BTCOEX

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Move BTCOEX init/deinit functions to gpio.c
Sujith Manoharan [Wed, 22 Feb 2012 07:10:21 +0000 (12:40 +0530)]
ath9k: Move BTCOEX init/deinit functions to gpio.c

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Initialize MCI params using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:10:15 +0000 (12:40 +0530)]
ath9k: Initialize MCI params using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Cleanup MCI init/deinit routines
Sujith Manoharan [Wed, 22 Feb 2012 07:10:09 +0000 (12:40 +0530)]
ath9k: Cleanup MCI init/deinit routines

This patch simplifies the buffer allocation functions
for MCI and removes unneeded memset calls. Also, a couple
of unused variables are removed and a memory leak in DMA
allocation is fixed.

[ 1263.788267] WARNING: at /home/sujith/dev/wireless-testing/lib/dma-debug.c:875 check_unmap+0x173/0x7e0()
[ 1263.788273] ath9k 0000:06:00.0: DMA-API: device driver frees DMA memory with different size
               [device address=0x0000000071908000] [map size=512 bytes] [unmap size=256 bytes]
[ 1263.788345] Pid: 774, comm: rmmod Tainted: G        W  O 3.3.0-rc3-wl #18
[ 1263.788348] Call Trace:
[ 1263.788355]  [<ffffffff8105110f>] warn_slowpath_common+0x7f/0xc0
[ 1263.788359]  [<ffffffff81051206>] warn_slowpath_fmt+0x46/0x50
[ 1263.788363]  [<ffffffff8125a713>] check_unmap+0x173/0x7e0
[ 1263.788368]  [<ffffffff8123fc22>] ? prio_tree_left+0x32/0xc0
[ 1263.788373]  [<ffffffff8125aded>] debug_dma_free_coherent+0x6d/0x80
[ 1263.788381]  [<ffffffffa0701c3c>] ath_mci_cleanup+0x7c/0x110 [ath9k]
[ 1263.788387]  [<ffffffffa06f4033>] ath9k_deinit_softc+0x113/0x120 [ath9k]
[ 1263.788392]  [<ffffffffa06f55cc>] ath9k_deinit_device+0x5c/0x70 [ath9k]
[ 1263.788397]  [<ffffffffa0704934>] ath_pci_remove+0x54/0xa0 [ath9k]
[ 1263.788401]  [<ffffffff81267d06>] pci_device_remove+0x46/0x110
[ 1263.788406]  [<ffffffff813102bc>] __device_release_driver+0x7c/0xe0
[ 1263.788410]  [<ffffffff81310a00>] driver_detach+0xd0/0xe0
[ 1263.788414]  [<ffffffff81310118>] bus_remove_driver+0x88/0xe0
[ 1263.788418]  [<ffffffff813111c2>] driver_unregister+0x62/0xa0
[ 1263.788421]  [<ffffffff812680c4>] pci_unregister_driver+0x44/0xc0
[ 1263.788427]  [<ffffffffa0705015>] ath_pci_exit+0x15/0x20 [ath9k]
[ 1263.788432]  [<ffffffffa070a92d>] ath9k_exit+0x15/0x31 [ath9k]
[ 1263.788436]  [<ffffffff810b971c>] sys_delete_module+0x18c/0x270
[ 1263.788441]  [<ffffffff81436edd>] ? retint_swapgs+0x13/0x1b
[ 1263.788446]  [<ffffffff812483be>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1263.788450]  [<ffffffff814378e9>] system_call_fastpath+0x16/0x1b
[ 1263.788453] ---[ end trace 3ab4d030ffde40d4 ]---

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove AR9462 v1.0 support
Sujith Manoharan [Wed, 22 Feb 2012 07:10:03 +0000 (12:40 +0530)]
ath9k: Remove AR9462 v1.0 support

v1.0 chips are not available in the market.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix associated vs. idle race
Johannes Berg [Mon, 20 Feb 2012 13:19:58 +0000 (14:19 +0100)]
mac80211: fix associated vs. idle race

Eliad reports that if a scan finishes in the
middle of processing associated (however it
happens), the interface can go idle. This is
because we set assoc_data to NULL before we
set associated. Change the order so any idle
check will find either one of them.

Doing this requires duplicating the TX sync
processing, but I already have a patch to
delete that completely and will submit that
as soon as my driver changes to no longer
require it are submitted.

Reported-by: Eliad Peller <eliad@wizery.com>
Tested-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: clean up asm/unaligned.h inclusion
Johannes Berg [Mon, 20 Feb 2012 10:38:41 +0000 (11:38 +0100)]
mac80211: clean up asm/unaligned.h inclusion

Some files implicitly get this via mesh.h
which itself doesn't need it, so move the
inclusion into the right files. Some other
files don't need it at all but include it,
so remove it from there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove redundant monitor_work enqueueing
Eliad Peller [Sun, 19 Feb 2012 13:26:10 +0000 (15:26 +0200)]
mac80211: remove redundant monitor_work enqueueing

ieee80211_restart_sta_timer() takes care for enqueueing
monitor_work if needed, so no need to do it again.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't queue monitor work for HW_CONNECTION_MONITOR
Eliad Peller [Sun, 19 Feb 2012 13:26:09 +0000 (15:26 +0200)]
mac80211: don't queue monitor work for HW_CONNECTION_MONITOR

Devices that monitor the connection in the hw don't need
the monitor work in the driver.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: Fix typo in mac80211_hwsim.c
Masanari Iida [Fri, 17 Feb 2012 14:04:10 +0000 (23:04 +0900)]
wireless: Fix typo in mac80211_hwsim.c

Correct spelling "occured" to "occurred" in
drivers/net/wireless/mac80211_hwsim.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add RT5372 chipset support
John Li [Fri, 17 Feb 2012 09:33:06 +0000 (17:33 +0800)]
rt2x00:Add RT5372 chipset support

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: avoid useless cast from (struct ath_rateset *) to (u8 *) and back
Pavel Roskin [Fri, 17 Feb 2012 03:14:45 +0000 (22:14 -0500)]
ath9k: avoid useless cast from (struct ath_rateset *) to (u8 *) and back

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Fix breakage in debug functions when built as a module
Larry Finger [Thu, 16 Feb 2012 18:14:36 +0000 (12:14 -0600)]
rtlwifi: Fix breakage in debug functions when built as a module

Since commit 481b9606, it has not been possible to invoke debugging
with any rtlwifi driver built as a module.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add VCO recalibration
John Li [Thu, 16 Feb 2012 13:40:57 +0000 (21:40 +0800)]
rt2x00:Add VCO recalibration

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix descriptor length for AR9462
Sujith Manoharan [Thu, 16 Feb 2012 06:23:00 +0000 (11:53 +0530)]
ath9k: Fix descriptor length for AR9462

Change the descriptor length to 24 and explicitly
set the control field 23 to zero. Not doing so would
result in dropping of frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix programming SYNTH4 for AR9462
Sujith Manoharan [Thu, 16 Feb 2012 06:22:50 +0000 (11:52 +0530)]
ath9k: Fix programming SYNTH4 for AR9462

The LONG_SHIFT_SELECT offset is different for AR9462 from
the other chip families. Fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Initialize NF values properly
Sujith Manoharan [Thu, 16 Feb 2012 06:22:44 +0000 (11:52 +0530)]
ath9k: Initialize NF values properly

Using AR_SREV_* macros for setting up the chip-specific NF
values will make adding support for new chips hard. Use separate
macros for each chip. Currently, AR9462 has the same value for
all NF limits.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove unused initvals
Sujith Manoharan [Thu, 16 Feb 2012 06:22:35 +0000 (11:52 +0530)]
ath9k: Remove unused initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix phyerr debug statistics
Sujith Manoharan [Thu, 16 Feb 2012 06:22:25 +0000 (11:52 +0530)]
ath9k: Fix phyerr debug statistics

Validate the phyerr value against the max. size of the
statistics array properly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Prettify recv debugfs file output
Sujith Manoharan [Thu, 16 Feb 2012 06:21:23 +0000 (11:51 +0530)]
ath9k: Prettify recv debugfs file output

Dumping the RSSI information in the middle of error
statistics is a bit misleading. Move them to the end.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add a debugfs file to display reset statistics
Sujith Manoharan [Thu, 16 Feb 2012 06:21:11 +0000 (11:51 +0530)]
ath9k: Add a debugfs file to display reset statistics

Location: <debugfs_path>/ieee80211/phy#/ath9k/reset

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Merge wiphy and misc debugfs files
Sujith Manoharan [Thu, 16 Feb 2012 06:21:02 +0000 (11:51 +0530)]
ath9k: Merge wiphy and misc debugfs files

This patch merges the 'wiphy' and 'misc' debugfs files
and consolidates the information.

Information about the current channel and other HT parameters
can be obtained from both mac80211 and iw. Remove such
redundant data.

The reset statistics have been removed, they will be re-added in
a subsequent patch (in a new debugfs file).

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove unnecessary variable initialization
Sujith Manoharan [Thu, 16 Feb 2012 06:20:55 +0000 (11:50 +0530)]
ath9k: Remove unnecessary variable initialization

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove duplicate initvals
Felix Fietkau [Wed, 15 Feb 2012 20:53:16 +0000 (21:53 +0100)]
ath9k_hw: remove duplicate initvals

Comparing SHA1 checksums of the initval tables has shown that there are many
tables that are 100% identical.

iniBank{0,1,2,3,7} and iniBB_RfGain are shared by AR5416, AR913x, AR9160
iniBank6 is shared between AR5416 and AR9160
iniBank6TPC is shared between AR913x and AR9160

iniPcieSerdes is the same for all AR9002 based devices

The CCK FIR coefficients are shared between AR9271 and AR9287

Getting rid of those duplicates saves about 7.5k uncompressed (on MIPS).

For AR9003 and later there are some duplicates as well, but I've decided to
leave them in for now, as the initvals for those chips are still actively
maintained by QCA.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add support for D-Link DWA-127 to rt2800usb.
Gertjan van Wingerde [Sat, 11 Feb 2012 20:58:09 +0000 (21:58 +0100)]
rt2x00: Add support for D-Link DWA-127 to rt2800usb.

This is an RT3070 based device.

Cc: <stable@vger.kernel.org>
Reported-by: Mikhail Kryshen <mikhail@kryshen.net>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 27 Feb 2012 18:30:45 +0000 (13:30 -0500)]
Merge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi

12 years agoath9k: remove unnecessary PS wrappers
Mohammed Shafi Shajakhan [Tue, 14 Feb 2012 13:09:19 +0000 (18:39 +0530)]
ath9k: remove unnecessary PS wrappers

ath_set_channel is called from ath9k_config which already has proper
PS wrappers

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove obsolete comments
Mohammed Shafi Shajakhan [Tue, 14 Feb 2012 13:09:18 +0000 (18:39 +0530)]
ath9k: remove obsolete comments

the corresponding code/logic was removed in
"ath9k: rework power state handling"

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k:Remove __raw_read and __raw_write
Jonathan Bither [Tue, 14 Feb 2012 02:47:45 +0000 (21:47 -0500)]
ath5k:Remove __raw_read and __raw_write

By swithing from our __raw_read and __raw_write functions to ioread32 and iowrite32,
benchmarks on my desk with iperf went from 11MBps to 18.1MBps using the AHB bus
on an EnGenius ECB3500 running OpenWRT.

Signed-off-by: Jonathan Bither <jonbither@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: restructure AP/GO mode API
Johannes Berg [Mon, 13 Feb 2012 14:17:18 +0000 (15:17 +0100)]
cfg80211: restructure AP/GO mode API

The AP/GO mode API isn't very clearly defined, it
has "set beacon" and "new beacon" etc.

Modify the API to the following:
 * start AP -- all settings
 * change beacon -- new beacon data
 * stop AP -- stop AP mode operation

This also reflects in the nl80211 API, rename
the commands there correspondingly (but keep
the old names for compatibility.)

Overall, this makes it much clearer what's going
on in the API.

Kalle developed the ath6kl changes, I created
the rest of the patch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove il_is_rfkill_hw
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:31 +0000 (11:23 +0100)]
iwlegacy: remove il_is_rfkill_hw

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: s/il_txq_mem/il_free_txq_mem/g
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:30 +0000 (11:23 +0100)]
iwlegacy: s/il_txq_mem/il_free_txq_mem/g

Previous name was confusing.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: s/S_RF_KILL_HW/S_RFKILL/g
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:29 +0000 (11:23 +0100)]
iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: small queue initializations cleanup
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:28 +0000 (11:23 +0100)]
iwlegacy: small queue initializations cleanup

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP
Stanislaw Gruszka [Tue, 14 Feb 2012 07:50:42 +0000 (08:50 +0100)]
iwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: small il4965_set_hw_ready cleanup
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:26 +0000 (11:23 +0100)]
iwlegacy: small il4965_set_hw_ready cleanup

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: check correct il_poll_bit error value
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:25 +0000 (11:23 +0100)]
iwlegacy: check correct il_poll_bit error value

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: do not grab nic access if rfkill
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:24 +0000 (11:23 +0100)]
iwlegacy: do not grab nic access if rfkill

If rfkill is on il_grab_nic_access() fail and we can not write to the
various registers during stop procedure. Write to those registers
unconditionally instead.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwleagcy: fix ident code damage
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:23 +0000 (11:23 +0100)]
iwleagcy: fix ident code damage

Using ident is not always good.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwleagcy: remove old comments
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:22 +0000 (11:23 +0100)]
iwleagcy: remove old comments

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: improve mac operation debuggability a bit
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:21 +0000 (11:23 +0100)]
iwlegacy: improve mac operation debuggability a bit

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: get rid of tx/rx traffic log
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:20 +0000 (11:23 +0100)]
iwlegacy: get rid of tx/rx traffic log

The same data can be gathered using monitor mode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge all ops structures into one
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:19 +0000 (11:23 +0100)]
iwlegacy: merge all ops structures into one

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge il_lib_ops into il_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:18 +0000 (11:23 +0100)]
iwlegacy: merge il_lib_ops into il_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove il_apm_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:17 +0000 (11:23 +0100)]
iwlegacy: remove il_apm_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge eeprom_ops into lib_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:16 +0000 (11:23 +0100)]
iwlegacy: merge eeprom_ops into lib_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove temp_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:15 +0000 (11:23 +0100)]
iwlegacy: remove temp_ops

Remove unneeded structure and cleanup temperature calibration routines
a bit.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: move debugfs_ops to il_priv
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:14 +0000 (11:23 +0100)]
iwlegacy: move debugfs_ops to il_priv

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: gather all 4965 handlers in one place
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:13 +0000 (11:23 +0100)]
iwlegacy: gather all 4965 handlers in one place

Handers belongs logically into 4965-mac.c file.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: regulatory_bands is not an ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:12 +0000 (11:23 +0100)]
iwlegacy: regulatory_bands is not an ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: use writeb,writel,readl directly
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:11 +0000 (11:23 +0100)]
iwlegacy: use writeb,writel,readl directly

That change will save us some CPU cycles at run time. Having
port-based I/O seems to be not possible for PCIe devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: cleanup/fix memory barriers
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:10 +0000 (11:23 +0100)]
iwlegacy: cleanup/fix memory barriers

wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().

What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiowb() is just
defined as compiler barrier. As iwlegacy devices are most likely
not used on anything other than x86, this is not so important
fix.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: always check if got h/w access before write
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:09 +0000 (11:23 +0100)]
iwlegacy: always check if got h/w access before write

Before we write to the device register always check if
_il_grap_nic_access() was successful.

Change type return type _il_grap_nic_access() to bool, and
add likely()/unlikely() statements.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: dump stack when fail to gain access to the device
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:08 +0000 (11:23 +0100)]
iwlegacy: dump stack when fail to gain access to the device

Print dump stack when the device is not responding. This should give
some more clue about the reason of failure. Also change the message we
print, since "MAC in deep sleep" is kinda confusing.

On the way add unlikely(), as fail to gain NIC access is hmm ...
unlikely.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192se firmware load can overflow target buffer
Tim Gardner [Fri, 10 Feb 2012 00:19:52 +0000 (18:19 -0600)]
rtlwifi: rtl8192se firmware load can overflow target buffer

Define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE which represents the
maximimum possible firmware file size. Use it in the definition
of the buffer which receives the firmware file data.

Set RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE closer to the actual size of
the firmware file, e.g., 90000 (down from hard coded 164000). The current
size of rtlwifi/rtl8192sefw.bin is 88856.

Set max_fw_size to RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE for the size limit
check. Fix the error case where max_fw_size is not cleared if the size
limit check fails.

Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: make sdio firmware filename specific
Arend van Spriel [Thu, 9 Feb 2012 20:09:09 +0000 (21:09 +0100)]
brcm80211: fmac: make sdio firmware filename specific

The sdio driver part uses firmware name brcmfmac.bin. With addition
of usb this name is too generic. This patch renames the filename
to brcmfmac-sdio.bin.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: add USB support for bcm43235/6/8 chipsets
Arend van Spriel [Thu, 9 Feb 2012 20:09:08 +0000 (21:09 +0100)]
brcm80211: fmac: add USB support for bcm43235/6/8 chipsets

This patch extends the use of the brcmfmac driver with support for
chipsets with a USB host interface. The first chipsets supported are
the bcm43235, bcm43236, and bcm43238 for which firmware has been
submitted.

This driver change has been successfully built for x86, x86_64,
ppc64, arm_le, and mips_be.

It has been tested successfully on x86 and x86_64.

Cc: M. Lambert <lambertm@westman.wave.ca>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()
Arend van Spriel [Thu, 9 Feb 2012 20:09:07 +0000 (21:09 +0100)]
brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()

This function is executed within irq context. The call spin_unlock_irq
does enable interrupts which is not desired in the irq context. This patch
replaces them using the spin_loc_irqsave and spin_unlock_irqrestore
functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: change allocation flag in brcmf_enq_event() function
Arend van Spriel [Thu, 9 Feb 2012 20:09:06 +0000 (21:09 +0100)]
brcm80211: fmac: change allocation flag in brcmf_enq_event() function

As the function is called from atomic context it should not do the
kzalloc call with GFP_KERNEL.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: update bus state in common driver part
Arend van Spriel [Thu, 9 Feb 2012 20:09:05 +0000 (21:09 +0100)]
brcm80211: fmac: update bus state in common driver part

The bus state is updated in the sdio bus init function, but it is
better to do it when the brcmf_bus_start() function is completed
successfully. The brcmf_netdev_open() function will return -EAGAIN
until the state is updated instead of calling brcmf_bus_start() to
avoid reentering that function.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true
Arend van Spriel [Thu, 9 Feb 2012 20:09:04 +0000 (21:09 +0100)]
brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true

The function brcmf_sdbrcm_bus_init() always returned success except for
firmware download failure. However, also when enabling SDIO function 2
is failing the function should return failure. This patch fixes that.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>