Commit graph

249193 commits

Author SHA1 Message Date
Sergei Shtylyov 304e21bbea ssb: PCI revision ID register is 8-bit wide
The SSB code reads PCI revision ID register as 16-bit entity while the register
is actually 8-bit only (the next 8 bits are the programming interface register).
Fix the read and make the 'rev' field of 'struct ssb_boardinfo' 8-bit as well,
to match the register size.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Larry Finger 45a771385c rtlwifi: rtl8192de: Fix error exit from hw_init
In routine rtl92de_hw_init(), there are two places where a failure is
not handled correctly.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Larry Finger eb8b27ada9 rtlwifi: rtl8192de: Replace loops calling udelay with single mdelay
There are a number of loops to implement delays. These are replaced with
single calls to mdelay().

The need for a fix was noted by Andrew Morton <akpm@linux-foundation.org>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Christian Lamparter c2a7965f52 carl9170: use carl9170 queue enums
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Larry Finger 9928c7d1b1 rtlwifi: rtl8192de: Remove comparison of boolean with true
Tests of a boolean against "true" are not needed as non-zero is sufficient..

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:54 -04:00
Mike McCormack f2e795ffae rtlwifi: rtl8192{ce,cu,se} Remove irq_enabled
This should be unnecessary if synchronize_irq is used.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:54 -04:00
Larry Finger 80b69593a8 rtlwifi: rtl8192de: Remove irq_enabled boolean
Prepare rtl8192de for the removal of irq_enaqbled.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Andrew Morton faeef8acb1 drivers/net/wireless/rtlwifi/rtl8192de/phy.c: fix udelay() usage
ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtl8192de/rtl8192de.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Christian Lamparter 5e34069cc4 mac80211: fix smatch complains
mlme.c
	l.757 ieee80211_dynamic_ps_enable_work(11)
	variable dereferenced before check 'sdata'

mesh_pathtbl.c
	l.650 mesh_path_del(20) double lock 'bottom_half'
	l.663 mesh_path_del(33) double unlock 'bottom_half'

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Christian Lamparter 1205f5438f carl9170: allow PSM if the 5 GHz band is selected
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Christian Lamparter f3716fd749 carl9170: enable IEEE80211_HW_NEED_DTIM_PERIOD
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:52 -04:00
Christian Lamparter 85ee5122ab carl9170: import 1.9.4 firmware headers
This patch imports all shared header changes
from carl9170fw.git.

 * update copyright boilerplate

 * add some more strategic __aligned(4).

 * WoWLAN

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:51 -04:00
Jesper Juhl 3b4670ffe7 net, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan()
If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'err' from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:51 -04:00
Yogesh Ashok Powar 3bff186518 mac80211: Skip tailroom reservation for full HW-crypto devices with race fix
Based on inputs from Johannes Berg <johannes@sipsolutions.net>
from http://article.gmane.org/gmane.linux.kernel.wireless.general/68193
and http://article.gmane.org/gmane.linux.kernel.wireless.general/71702

In xmit path, devices that do full hardware crypto (including
MMIC and ICV) need no tailroom. For such devices, tailroom
reservation can be skipped if all the keys are programmed into
the hardware (i.e software crypto is not used for any of the
keys) and none of the keys wants software to generate Michael
MIC and IV.

v2: Added check for IV along with MMIC.
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Cc: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>

v3: Fixing races to avoid WARNING: at net/mac80211/wpa.c:397
    ccmp_encrypt_skb+0xc4/0x1f0
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>

v4: Added links with message ID

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:50 -04:00
Emmanuel Grumbach 252e735d64 iwlagn: remove the indirection for the rx write pointer
Not needed since the driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 08:00:10 -07:00
Wey-Yi Guy e3f10cea03 iwlagn: remove hcmd ops
All "agn" devices use the same hcmd functions, no need to call indirectly.
remove hcmd_ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:59:26 -07:00
Wey-Yi Guy e55b517c4d iwlagn: call bt_coex directlly
Call the 2-wire and advanced bt-coex function directly to avoid mistake

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:58:15 -07:00
Wey-Yi Guy f86af7ba82 iwlagn: scd memory boundary
Assign memory boundary for SCD context, tx status and translation table

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:58:08 -07:00
Emmanuel Grumbach 02aca585f5 iwlagn: move the tx allocation funcs to the transport layer
These functions allocate all the Tx context. Only the simple tx_init is exported as API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:57:59 -07:00
Emmanuel Grumbach a0f6b0a211 iwlagn: add rx_free to transport layer
The transport layer ness to release all rx ressources. This function is an API for it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:57:45 -07:00
Emmanuel Grumbach c85eb61969 iwlagn: introduce transport layer and implement rx_init
The transport layer is responsible for all the queues, DMA rings etc...
This is the beginning of the separation of all the code that is tighly
related to HW design to the aforementioned transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:57:34 -07:00
Wey-Yi Guy 300d0834eb iwlagn: add module parameter to disable stuck queue watchdog timer
Add the parameter to disable stuck queue watchdog timer, different platforms
might have different timing. Provide the option to disable the timer to prevent
un-necessary firmware reload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:57:22 -07:00
Wey-Yi Guy 54e9c409a5 iwlagn: add correct firmware name for 135 series
135 series are WiFi/BT combo and require different uCode from 105 series.
[A
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:47:59 -07:00
Wey-Yi Guy 4466320f05 iwlagn: re-define the testmode cmd and attr enum
To make sure not having issues when adding new testmode commands or attributes
in the future, re-define the enum. no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:46:32 -07:00
Johannes Berg 98a648e10a iwlagn: verify mutex held for sync commands
Emmanuel noticed that there's no explicit checking
that prevents the driver from attempting to issue
multiple synchronous commands at the same time and
wrote a patch to check. However, his patch warns
only if a collision actually happened, an unlikely
thing since the driver mutex should be held for
synchronous command submissions.

So instead of checking that a collision happened
add a check that the mutex is held which ensures
that collisions can't happen.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-01 07:46:21 -07:00
Dan Carpenter 9a4ba833a2 rtlwifi: potential forever loop in rtl92de_hw_init()
"i" should be an int here because we are trying to use it to count
to 10000.  The original code looks like it could hang in a forever
loop.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:07 -04:00
Larry Finger ab049fbf5e rtlwifi: rtl8192de: Fix build errors when using allyes configuration
After adding rtl8192de to linux-next, making the rtlwifi drivers be built-in
results in the following warnings:

  LD      drivers/net/wireless/rtlwifi/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_on':
(.text+0x11fb6): multiple definition of `rtl92ce_sw_led_on'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa326): first defined here
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o:(.bss+0x0): multiple definition of `dm_digtable'
drivers/net/wireless/rtlwifi/rtl8192c/built-in.o:(.bss+0x0): first defined here
ld: Warning: size of symbol `dm_digtable' changed from 40 in drivers/net/wireless/rtlwifi/rtl8192c/built-in.o to 48 in drivers/net/wireless/rtlwifi/rtl8192de/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_off':
(.text+0x11cfe): multiple definition of `rtl92ce_sw_led_off'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa06e): first defined here

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:06 -04:00
Rafał Miłecki a5f377fb9c b43: HT-PHY: correct 0x2059 radio init
Sometimes additional steps are performed while initializing 2059 radio.
We did not find the condition yet, so make it always true for now.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:06 -04:00
Mohammed Shafi Shajakhan 5cf6fa784a ath9k_htc: Add device ID for Sony UWA-BR100
for more details please take a look at:
http://comments.gmane.org/gmane.linux.drivers.ath9k.devel/6541
http://www.wikidevi.com/wiki/Sony_UWA-BR100

Reported-by: Thomas Novin <thomas@xyz.pp.se>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:05 -04:00
Mohammed Shafi Shajakhan c3d77696b0 ath9k: move few descriptor macros to ath9k.h
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:04 -04:00
Rafał Miłecki 2d02c86b77 b43: HT-PHY: basic PHY init
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:03 -04:00
Rafał Miłecki 71d3b0d592 b43: HT-PHY: add init tables
They were written from observing MMIO writes to registers 0x72 0x74 and
0x73 right after phy_write(0x017e) <- 0x3830 which finishes chennel
switching. RegExps were used to translate writes to arrays.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:03 -04:00
Rafał Miłecki 3e644ab47e b43: HT-PHY: init radio when enabling it
Masks and sets were found in MMIO dumps by using MMIO hacks. Shortly:
radio_write(0x0c51) <- 0x0070
radio_write(0x0c5a) <- 0x0003
radio_write(0x0146) <- 0x0003
radio_write(0x0546) <- 0x0003
radio_write(0x0946) <- 0x0003
radio_write(0x002e) <- 0x0078
radio_write(0x00c0) <- 0x0080
radio_write(0x002e) <- 0xff87
radio_write(0x00c0) <- 0xff7f
radio_write(0x0011) <- 0xfff7

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:02 -04:00
Rafał Miłecki e8dec1e99a b43: HT-PHY: replace radio routing magic numbers
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:01 -04:00
Arik Nemtsov b4d38db121 wl12xx: AP-mode - use mac80211 indication about STA WME support
When adding a station, use the information given in the mac80211
populated ieee80211_sta structure to determine if it supports WME.
Provide this information to the FW.

This patch depends on "mac80211: propagate information about
STA WME support down".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:01 -04:00
Arik Nemtsov 39df600aa6 mac80211: propagate information about STA WME support down
Add a memeber to the ieee80211_sta structure to indicate whether the STA
supports WME.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:00 -04:00
Jon Mason f01dce9474 rtlwifi: use PCI_VENDOR_ID_*
Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define locally.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
Jon Mason 6a4ecc29c9 rtlwifi: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Also, remove unnecessary and unused #defines for PCI.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
Jon Mason f05b691150 iwlegacy: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:25 -04:00
Rafał Miłecki bfc8dfec45 b43: HT-PHY: implement lacking 0x908 PHY reg op
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:25 -04:00
Rafał Miłecki feb90636cc b43: HT-PHY: add channel switching tables for 2 GHz band
Tables were taken from observing writes in MMIO dumps.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:24 -04:00
Rafał Miłecki e5b61007bc b43: HT-PHY: perform some tables ops on channel switching
Starring at MMIO dumps around PHY channel switching has led to finding
serie of 3 similar ops this patch implements.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:24 -04:00
Rafał Miłecki bdb2dfb237 b43: HT-PHY: upload PHY values when switching channel
After calibrating radio you can find few PHY writes in MMIO dumps:
 phy_read(0x0009) -> 0x0000
phy_write(0x01ce) <- 0x03dd
phy_write(0x01cf) <- 0x03d9
phy_write(0x01d0) <- 0x03d5
phy_write(0x01d1) <- 0x0424
phy_write(0x01d2) <- 0x0429
phy_write(0x01d3) <- 0x042d
By comparing to N-PHY code we found out that they are PHY tables for
channel switching plus band info read at the beginning.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:23 -04:00
Rafał Miłecki 1a93139237 b43: HT-PHY: prepare place for HT-PHY tables
They are big arrays uploaded to the hardware on init, calibration, etc.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:22 -04:00
John W. Linville 3be3fdb58a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
2011-06-28 13:56:21 -04:00
John W. Linville 5ee0a58d8c iwlagn: use PCI_DMA_* for pci_* operations
"iwlagn: map command buffers BIDI" uses the DMA_* enumerations for DMA
directions, even though the pci_* DMA API is still in use.  That patch
was undoubtedly developed on top of "iwlagn: don't use the PCI wrappers
for DMA operation", which is due in the next release.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-28 11:16:39 -04:00
Arik Nemtsov 77b7023afe mac80211: dynamic PS - don't enter PS when TX frames are pending
Use the tx_frames_pending() driver callback to determine if Tx frames are
pending for its internal queues. If so postpone the dynamic PS timeout
to avoid interrupting Tx traffic.

The commit e8306f9894 enabled this
behavior for drivers with IEEE80211_HW_PS_NULLFUNC_STACK. We enable this
for all drivers supporting dynamic PS.

This patch helps improve performance in noisy environments.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Geert Uytterhoeven eef726994f bcma: main.c needs to include <linux/slab.h>
m68k allmodconfig:

drivers/bcma/main.c: In function ‘bcma_release_core_dev’:
drivers/bcma/main.c:68: error: implicit declaration of function ‘kfree’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
--
http://kisskb.ellerman.id.au/kisskb/buildresult/4243344/

 drivers/bcma/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Sergei Shtylyov 6691678dca iwlwifi: use pci_dev->revision, again
Commit ff938e43d3 (net: use pci_dev->revision,
again) already converted this driver to using the 'revision' field of 'struct
pci_dev' but commit 084dd79172 (iwlagn: move PCI
related operations from probe and remove to PCI layer) has again added the code
to read the PCI revision ID register...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Dan Carpenter a5e5aa6cee mwifiex: restore handling of NULL parameters
Prior to a5ffddb70c "mwifiex: remove casts of void pointers" the
code assumed that the data_buf parameter could be a NULL pointer.
The patch preserved some NULL checks but not consistently, so there
was a potential for NULL dereferences and it changed the behavior.
This patch restores the original behavior.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00