summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
Commit message (Collapse)AuthorAgeFilesLines
* rtlwifi: rtl8192cu: Add new IDLarry Finger2014-08-251-0/+1
| | | | | | | | | | The Sitecom WLA-2102 adapter uses this driver. Reported-by: Nico Baggus <nico-linux@noci.xs4all.nl> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Nico Baggus <nico-linux@noci.xs4all.nl> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: btcoexist: adjust double testHimangi Saraogi2014-08-251-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 <himangi774@gmail.com> Acked-by: Larry.Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2014-08-123-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 <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
* rtlwifi: use pci_zalloc_consistentJoe Perches2014-08-081-12/+5
| | | | | | | | | | | Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtlwifi: rtl8188ee: remove unnecessary break after returnFabian Frederick2014-07-201-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: rtl8723be: remove unnecessary break after returnFabian Frederick2014-07-201-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: rtl8723ae: remove unnecessary break after returnFabian Frederick2014-07-201-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: rtl8192se: remove unnecessary break after returnFabian Frederick2014-07-202-4/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: rtl8192ce: remove unnecessary break after returnFabian Frederick2014-07-201-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: remove unnecessary break after returnFabian Frederick2014-07-201-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: remove unnecessary break after gotoFabian Frederick2014-07-131-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi/rtl8723be: Replace magic number by macroRickard Strandqvist2014-06-252-1/+2
| | | | | | | | For consistency with other drivers, replace a magic number by a macro. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi/rtl8723ae: Replace magic number by macroRickard Strandqvist2014-06-252-1/+2
| | | | | | | | For consistency with other drivers, replace a magic number by a macro. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi/rtl8188ee: Fix media status register maskRickard Strandqvist2014-06-252-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 <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi/rtl8192c[eu]: Fix media status register maskRickard Strandqvist2014-06-253-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 <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi/rtl8192de: Fix media status register maskRickard Strandqvist2014-06-252-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 <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: btcoexist: avoid format string in printkKees Cook2014-06-191-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 <keescook@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variableRickard Strandqvist2014-06-191-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 <rickard_strandqvist@spectrumdigital.se> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192cu: remove check for CONFIG_AUTOSUSPENDPaul Bolle2014-05-291-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 <pebolle@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723ae: Remove duplicate inclusion of fw_common.hSachin Kamat2014-05-291-1/+0
| | | | | | | fw_common.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: Remove duplicate inclusion of phy.hSachin Kamat2014-05-291-1/+0
| | | | | | | phy.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: remove unused allow_all_destaddr functionsPeter Wu2014-05-1915-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 <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: add msi module parameterAdam Lee2014-05-131-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8188ee: add msi module parameterAdam Lee2014-05-131-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: make MSI support a module parameterAdam Lee2014-05-131-0/+4
| | | | | | | | This makes MSI support a module parameter, for debugging and workaround convenience. Signed-off-by: Adam Lee <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2014-05-133-2/+8
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init()Ben Hutchings2014-04-301-1/+1
| | | | | | | | | | | | | | Fixes: a53268be0cb9 ('rtlwifi: rtl8192cu: Fix too long disable of IRQs') Cc: stable@vger.kernel.org Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbbLarry Finger2014-04-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beginning with kernel 3.13, this driver fails on some systems. The problem was bisected to: Commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac Author: Felix Fietkau <nbd@openwrt.org> 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 <almiller_1@yahoo.co.uk> Tested-by: Alex Miller <almiller_1@yahoo.co.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.13+] Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rtlwifi: rtl8188ee: initialize packet_beaconColin Ian King2014-04-221-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 <colin.king@canonical.com> Cc: Stable <stable@vger.kernel.org> [3.10+] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | RTL8192CU: Increase max APFM_ONMAC polling countAndy Spencer2014-05-061-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 <andy753421@ucla.edu> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | rtlwifi: rtl8723be: disable MSI interrupts modeAdam Lee2014-04-301-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Revert "rtlwifi: rtl8188ee: enable MSI interrupts mode"Adam Lee2014-04-301-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'for-john' of ↵John W. Linville2014-04-301-1/+2
|\ \ | |/ |/| | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: net/mac80211/chan.c
| * mac80211: add vif to flush callEmmanuel Grumbach2014-04-091-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 <emmanuel.grumbach@intel.com> [fix staging rtl8821ae driver] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | rtlwifi: btcoexist: remove undefined Kconfig macrosPaul Bolle2014-04-091-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 <pebolle@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8188ee: enable MSI interrupts modeAdam Lee2014-03-311-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: add MSI interrupts mode supportAdam Lee2014-03-311-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 <adam.lee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Remove casts of pointer to same typeJoe Perches2014-03-2715-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 <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Remove addressof casts to same typeJoe Perches2014-03-274-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 <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: Fix array dimension problemsLarry Finger2014-03-131-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 <Larry.Finger@lwfinger.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: Fix smatch warningsLarry Finger2014-03-062-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 <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: Fix sparse errorsLarry Finger2014-03-062-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 <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192ce: Handle unused switch caseLarry Finger2014-03-061-1/+3
| | | | | | | | This patch prevents log spamming by adding a case for a previously unhandled case. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723ae: Fix too long disable of IRQsLarry Finger2014-03-061-3/+15
| | | | | | | | | | | In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <olivier@trillion01.com> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8723ae. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8188ee: Fix too long disable of IRQsLarry Finger2014-03-061-4/+16
| | | | | | | | | | | In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <olivier@trillion01.com> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8188ee. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192se: Fix too long disable of IRQsLarry Finger2014-03-061-6/+21
| | | | | | | | | | | In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <olivier@trillion01.com> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8192se. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192cu: Fix too long disable of IRQsLarry Finger2014-03-061-1/+14
| | | | | | | | | | | In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <olivier@trillion01.com> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8192cu. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8723be: rtl8723com: Remove unused allow_all_destaddr functionsLarry Finger2014-03-062-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 <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Move common routines to coreLarry Finger2014-03-0631-725/+520
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be: ↵Larry Finger2014-03-0619-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 <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud