aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtlwifi
AgeCommit message (Collapse)AuthorFilesLines
2014-08-25rtlwifi: rtl8192cu: Add new IDLarry Finger1-0/+1
The Sitecom WLA-2102 adapter uses this driver. Reported-by: Nico Baggus <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Nico Baggus <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-08-25rtlwifi: btcoexist: adjust double testHimangi Saraogi1-1/+1
Rewrite a duplicated test to test the correct value The Coccinelle semantic patch that finds this problem is: // <smpl> @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Larry.Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine3-3/+3
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2014-08-08rtlwifi: use pci_zalloc_consistentJoe Perches1-12/+5
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <[email protected]> Cc: Larry Finger <[email protected]> Cc: Chaoming Li <[email protected]> Cc: "John W. Linville" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-07-20rtlwifi: rtl8188ee: remove unnecessary break after returnFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-20rtlwifi: rtl8723be: remove unnecessary break after returnFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-20rtlwifi: rtl8723ae: remove unnecessary break after returnFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-20rtlwifi: rtl8192se: remove unnecessary break after returnFabian Frederick2-4/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-20rtlwifi: rtl8192ce: remove unnecessary break after returnFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-20rtlwifi: remove unnecessary break after returnFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-07-13rtlwifi: remove unnecessary break after gotoFabian Frederick1-1/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-06-25rtlwifi/rtl8723be: Replace magic number by macroRickard Strandqvist2-1/+2
For consistency with other drivers, replace a magic number by a macro. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-25rtlwifi/rtl8723ae: Replace magic number by macroRickard Strandqvist2-1/+2
For consistency with other drivers, replace a magic number by a macro. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-25rtlwifi/rtl8188ee: Fix media status register maskRickard Strandqvist2-1/+2
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-25rtlwifi/rtl8192c[eu]: Fix media status register maskRickard Strandqvist3-2/+3
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-25rtlwifi/rtl8192de: Fix media status register maskRickard Strandqvist2-1/+2
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rtlwifi: btcoexist: avoid format string in printkKees Cook1-1/+1
Since CL_PRINTF only ever takes a single argument, make sure a format string cannot leak into printk. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variableRickard Strandqvist1-1/+2
There is a risk that the variables will be used without being initialized. Have also moved variable to the part of the code where it is used. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29rtlwifi: rtl8192cu: remove check for CONFIG_AUTOSUSPENDPaul Bolle1-3/+0
A check for CONFIG_AUTOSUSPEND was included in this driver when it was added in v2.6.39. But that Kconfig symbol doesn't exist. Remove that check and the single line it hides. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29rtlwifi: rtl8723ae: Remove duplicate inclusion of fw_common.hSachin Kamat1-1/+0
fw_common.h was included twice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29rtlwifi: rtl8723be: Remove duplicate inclusion of phy.hSachin Kamat1-1/+0
phy.h was included twice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-19rtlwifi: remove unused allow_all_destaddr functionsPeter Wu15-118/+0
Unused as configure_filter takes care of setting/clearing RCR_AAP. In commit "rtlwifi: rtl8723be: rtl8723com: Remove unused allow_all_destaddr functions", Larry Finger removed allow_all_destaddr from the struct. This commit removes the related function too. Signed-off-by: Peter Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-13rtlwifi: rtl8723be: add msi module parameterAdam Lee1-1/+4
The msi module parameter offers an option to enable or disable MSI interrupts mode, for debugging and workaround(in case) convenience. Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-13rtlwifi: rtl8188ee: add msi module parameterAdam Lee1-0/+4
The msi module parameter offers an option to enable or disable MSI interrupts mode. For now, some users report RTL8188EE works only with MSI on their certain platforms, some others report it works only without MSI, this parameter will help. Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-13rtlwifi: make MSI support a module parameterAdam Lee1-0/+4
This makes MSI support a module parameter, for debugging and workaround convenience. Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-13Merge branch 'master' of ↵John W. Linville3-2/+8
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-05-06RTL8192CU: Increase max APFM_ONMAC polling countAndy Spencer1-1/+1
With certain hardware combinations the poll interval is exceeded before initialization completes. Tested on a MacBookPro10,1 using a Sabrent USB-A11N USB adapter. Signed-off-by: Andy Spencer <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-30rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init()Ben Hutchings1-1/+1
Fixes: a53268be0cb9 ('rtlwifi: rtl8192cu: Fix too long disable of IRQs') Cc: [email protected] Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-30rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbbLarry Finger1-0/+6
Beginning with kernel 3.13, this driver fails on some systems. The problem was bisected to: Commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac Author: Felix Fietkau <[email protected]> Title: mac80211: send control port protocol frames to the VO queue There is noting wrong with the above commit. The regression occurs because V0 queue on RTL8192SE cards uses priority 6, not the usual 7. The fix is to modify the rtl8192se routine that sets the correct transmit queue. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=74541 Reported-by: Alex Miller <[email protected]> Tested-by: Alex Miller <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> [3.13+] Signed-off-by: John W. Linville <[email protected]>
2014-04-30rtlwifi: rtl8723be: disable MSI interrupts modeAdam Lee1-1/+1
94010fa0dd07e8b904e7c6b6589f15573008ab15 ("rtlwifi: add MSI interrupts mode support") introduced MSI interrupts mode support, which seemed safe enough with RTL8188EE and RTL8723BE as RealTek's testing results, but some users reported their RTL8188EE modules could not connect to any wireless network after the MSI mode was enabled by Ubuntu 14.04. So, let's fallback to pin-based mode until rtlwifi's MSI support get good compatibility. BugLink: https://bugs.launchpad.net/bugs/1310512 Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-30Revert "rtlwifi: rtl8188ee: enable MSI interrupts mode"Adam Lee1-1/+0
This reverts commit 2a54eb5e1476426ee639bbfbe179b52342a0d82c ("rtlwifi: rtl8188ee: enable MSI interrupts mode"). 94010fa0dd07e8b904e7c6b6589f15573008ab15 ("rtlwifi: add MSI interrupts mode support") introduced MSI interrupts mode support, which seemed safe enough with RTL8188EE and RTL8723BE as RealTek's testing results, but some users reported their RTL8188EE modules could not connect to any wireless network after the MSI mode was enabled by Ubuntu 14.04. So, let's fallback to pin-based mode until rtlwifi's MSI support get good compatibility. BugLink: https://bugs.launchpad.net/bugs/1310512 Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-30Merge branch 'for-john' of ↵John W. Linville1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: net/mac80211/chan.c
2014-04-22rtlwifi: rtl8188ee: initialize packet_beaconColin Ian King1-1/+1
static code analysis from cppcheck reports: [drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:322]: (error) Uninitialized variable: packet_beacon packet_beacon is not initialized and hence packet_beacon contains garbage from the stack, so set it to false. Signed-off-by: Colin Ian King <[email protected]> Cc: Stable <[email protected]> [3.10+] Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-09rtlwifi: btcoexist: remove undefined Kconfig macrosPaul Bolle1-10/+0
There are references to four undefined Kconfig macros in the code. Commit 8542373dccd2 ("Staging: rtl8812ae: remove undefined Kconfig macros") removed identical references from that staging driver, but they resurfaced in rtlwifi. Remove these again as the checks for them still will always evaluate to false. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-04-09mac80211: add vif to flush callEmmanuel Grumbach1-1/+2
This will allow the low level driver to make decision based on the vif such as queues etc... Since the vif might be NULL, we can't add it to the tracing functions. Signed-off-by: Emmanuel Grumbach <[email protected]> [fix staging rtl8821ae driver] Signed-off-by: Johannes Berg <[email protected]>
2014-03-31rtlwifi: rtl8188ee: enable MSI interrupts modeAdam Lee1-0/+1
Some HP notebooks using this rtl8188ee hardware module can't get AP scan results with pin-based interrupts mode, enabling MSI interrupts mode could fix it. As RealTek's testing results, RTL8188EE works well with both MSI mode and pin-based mode fallback. Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-31rtlwifi: add MSI interrupts mode supportAdam Lee1-2/+63
Add MSI interrupts mode support, enable it when submodules' msi_support flag is true, also could fallback to pin-based interrupts mode if MSI interrupts mode fails. RealTek's policy(on modules which work well with MSI interrupts mode) is: > If the platform supports both MSI and pin-based, use MSI. > If the platform supports MSI only, use MSI. > If the platform supports pin-based only, use pin-based. Also as RealTek's testing results, RTL8188EE and RTL8723BE work well with both MSI mode and pin-based mode fallback. Signed-off-by: Adam Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-27rtlwifi: Remove casts of pointer to same typeJoe Perches15-137/+118
Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Around these changes: o Remove unnecessary parentheses o Use consistent dereference style (change ptr[0] to *ptr) o Argument alignment Done via coccinelle script: (and some typing) $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-27rtlwifi: Remove addressof casts to same typeJoe Perches4-15/+12
Using addressof then casting to the original type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast.cocci @@ type T; T foo; @@ - (T *)&foo + &foo Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-13rtlwifi: rtl8723be: Fix array dimension problemsLarry Finger1-5/+9
Commit a619d1abe20c leads to the following static checker warning: drivers/net/wireless/rtlwifi/rtl8723be/phy.c:667 _rtl8723be_store_tx_power_by_rate() error: buffer overflow 'rtlphy->tx_power_by_rate_offset[band]' 4 <= 5 This warning arises because the code is testing the indices for the wrong maximum values. In addition, the tests merely putput a warning, and then procedes to corrupt memory. With this change, any such invalid memory access is avoided. Signed-off-by: Larry Finger <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8723be: Fix smatch warningsLarry Finger2-9/+1
Smatch reports the following: drivers/net/wireless/rtlwifi/rtl8723be/fw.c:208 _rtl8723be_fill_h2c_command() warn: variable dereferenced before check 'rtlhal' (see line 69) drivers/net/wireless/rtlwifi/rtl8723be/hw.c:1732 _rtl8723be_read_adapter_info() error: __builtin_memcpy() '&rtlefuse->efuse_map[0][0]' too small (256 vs 512) The first one is fixed by removing two pointless tests for NULL pointers. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8723be: Fix sparse errorsLarry Finger2-3/+2
Sparse reports the following: drivers/net/wireless/rtlwifi/rtl8723be/sw.c:374:14: sparse: duplicate const drivers/net/wireless/rtlwifi/rtl8723be/hw.c:2214:30: sparse: cast to restricted __le32 Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8192ce: Handle unused switch caseLarry Finger1-1/+3
This patch prevents log spamming by adding a case for a previously unhandled case. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8723ae: Fix too long disable of IRQsLarry Finger1-3/+15
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <[email protected]> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8723ae. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8188ee: Fix too long disable of IRQsLarry Finger1-4/+16
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <[email protected]> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8188ee. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8192se: Fix too long disable of IRQsLarry Finger1-6/+21
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <[email protected]> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8192se. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8192cu: Fix too long disable of IRQsLarry Finger1-1/+14
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <[email protected]> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8192cu. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8723be: rtl8723com: Remove unused allow_all_destaddr functionsLarry Finger2-2/+1
In a previous commit, Peter Wu removed this call as configure_filter takes care of setting/clearing RCR_AAP. This patch makes the same change for rtl8723be. In addition, a change is made in the logging level for one debug printout. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: Move common routines to coreLarry Finger31-725/+520
Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-03-06rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be: ↵Larry Finger19-78/+282
rtl8188eu: Modify for new API The addition of a driver for the RTL8821AE requires a new API for the fill_tx_desc() and set_desc() callback routines. This commit makes the appropriate modifications in all the other drivers. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>