aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtlwifi
AgeCommit message (Collapse)AuthorFilesLines
2012-05-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-13/+13
2012-05-14rtlwifi: fix for race condition when firmware is cachedLarry Finger2-13/+13
In commit b0302ab, the rtlwifi family of drivers was converted to use asynchronous firmware loading. Unfortumately, the implementation was racy, and the ieee80211 routines could be started before rtl_init_core() was called to setup the data. This patch fixes the bug noted in https://bugzilla.kernel.org/show_bug.cgi?id=43187. Reported-by: Joshua Roys <[email protected]> Tested-by: Neptune Ning <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> [3.3] Signed-off-by: John W. Linville <[email protected]>
2012-05-10drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches6-22/+24
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-05-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+1
Conflicts: drivers/net/ethernet/intel/e1000e/param.c drivers/net/wireless/iwlwifi/iwl-agn-rx.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c drivers/net/wireless/iwlwifi/iwl-trans.h Resolved the iwlwifi conflict with mainline using 3-way diff posted by John Linville and Stephen Rothwell. In 'net' we added a bug fix to make iwlwifi report a more accurate skb->truesize but this conflicted with RX path changes that happened meanwhile in net-next. In e1000e a conflict arose in the validation code for settings of adapter->itr. 'net-next' had more sophisticated logic so that logic was used. Signed-off-by: David S. Miller <[email protected]>
2012-04-23rtlwifi: rtl8192se: Convert driver to use private dm structLarry Finger3-81/+84
Convert driver to use private version of dig_t instead of global version. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: rtl8192de: Convert driver to use private dm structsLarry Finger3-94/+100
Convert driver to use the private dig_t instead of a global version. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: rtl8192c: Convert driver to use private ps_t structLarry Finger1-27/+31
Convert driver to use the private instead of global version. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: rtl8192c: Convert driver to use private dm structsLarry Finger4-112/+123
Convert rtl8192c to use the dm_digtable struct in the common header file instead of the global variable. Without this change, every instance of rtl8192ce and rtl8192cu will be using the same global arrays. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: Add dm structs to private structureLarry Finger1-0/+4
Add the dig_t and ps_t structures to the private variables. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: Move dig_t and ps_t structsLarry Finger5-159/+59
Move struct definitions for dig_t and ps_t to the common header file. This move is needed to convert these structures from a "per-driver" to a "per-interface" basis. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-23rtlwifi: Fix oops on unloadLarry Finger1-0/+1
Under some circumstances, a PCI-based driver reports the following OOPs: Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Oops: 0000 [#1] SMP --snip-- Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Pid: 19627, comm: rmmod Not tainted 3.2.9-2.fc16.x86_64 #1 LENOVO 05962RU/05962RU Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP: 0010:[<ffffffffa0418d39>] [<ffffffffa0418d39>] rtl92ce_get_desc+0x19/0xd0 [rtl8192ce] --snip-- Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Process rmmod (pid: 19627, threadinfo ffff880050262000, task ffff8801156d5cc0) Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Stack: Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000002 ffff8801176c2540 ffff880050263ca8 ffffffffa03348e7 Mar 19 08:14:35 kvothe kernel: [ 6584.626011] 0000000000000282 0000000180150014 ffff880050263fd8 ffff8801176c2810 Mar 19 08:14:35 kvothe kernel: [ 6584.626011] ffff880050263bc8 ffffffff810550e2 00000000000002c0 ffff8801176c0d40 Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Call Trace: Mar 19 08:14:35 kvothe kernel: [ 6584.626011] [<ffffffffa03348e7>] _rtl_pci_rx_interrupt+0x187/0x650 [rtlwifi] --snip-- Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Code: ff 09 d0 89 07 48 83 c4 08 5b 5d c3 66 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 40 84 f6 89 d3 74 13 84 d2 75 57 <8b> 07 48 83 c4 08 5b 5d c1 e8 1f c3 0f 1f 00 84 d2 74 ed 80 fa Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RIP [<ffffffffa0418d39>] rtl92ce_get_desc+0x19/0xd0 [rtl8192ce] Mar 19 08:14:35 kvothe kernel: [ 6584.626011] RSP <ffff880050263b58> Mar 19 08:14:35 kvothe kernel: [ 6584.626011] CR2: 00000000000006e0 Mar 19 08:14:35 kvothe kernel: [ 6584.646491] ---[ end trace 8636c766dcfbe0e6 ]--- This oops is due to interrupts not being disabled in this particular path. Reported-by: Dave Airlie <[email protected]> Tested-by: Dave Airlie <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-16net/wireless: use module_pci_driverAxel Lin2-36/+2
This patch converts the drivers in drivers/net/wireless/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Nick Kossifidis <[email protected]> Cc: "Luis R. Rodriguez" <[email protected]> Cc: Simon Kelley <[email protected]> Cc: Jouni Malinen <[email protected]> Cc: Lennert Buytenhek <[email protected]> Cc: Christian Lamparter <[email protected]> Cc: Ivo van Doorn <[email protected]> Cc: Larry Finger <[email protected]> Cc: [email protected] Acked-by: Lennert Buytenhek <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-16rtlwifi: rtl8192ce: Remove false positives for kmemleakLarry Finger2-0/+5
When rtl8192ce is in operation, kmemleak indicates a number of leaks, yet when the driver is removed all are gone. These false positives happen in two locations: unreferenced object 0xffff880041124000 (size 9536): comm "work_for_cpu", pid 9295, jiffies 4295037203 (age 20596.320s) hex dump (first 32 bytes): 33 00 00 01 01 6d 00 00 00 00 b1 0e 21 0b 00 00 3....m......!... 01 01 6d 00 00 00 00 8b 20 c0 e9 00 00 01 01 6d ..m..... ......m backtrace: [<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50 [<ffffffff8138d01f>] kmalloc_large_node+0x9a/0xa6 [<ffffffff811335a5>] __kmalloc_node_track_caller+0x175/0x3b0 [<ffffffff812ddfe3>] __alloc_skb+0x73/0x230 [<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30 [<ffffffffa091a3b7>] rtl_pci_probe+0x10e0/0x17d2 [rtlwifi] -- snip -- unreferenced object 0xffff8800b4d3f600 (size 256): comm "kworker/u:2", pid 13221, jiffies 4297830173 (age 9424.568s) hex dump (first 32 bytes): 1c d6 45 b1 00 88 ff ff 1c d6 45 b1 00 88 ff ff ..E.......E..... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50 [<ffffffff81130f43>] kmem_cache_alloc_node+0x153/0x270 [<ffffffff812ddfb6>] __alloc_skb+0x46/0x230 [<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30 [<ffffffffa093264a>] rtl92c_set_fw_rsvdpagepkt+0x22a/0x5c0 [rtl8192c_common] -- snip -- Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-12rtl8192de: Recognize 92D E-CUT version.Forest Bond1-1/+5
The chip version constant (0xCC33) was taken from version 0001.0105.2011 of the GPL vendor driver. Note that this driver version also ships a firmware update, but I am unsure if it is required for E-CUT chips to function properly. A nearby spelling error was also corrected. Signed-off-by: Forest Bond <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-12rtl8192de: Clean up and fix 92D cut version constants and macros.Forest Bond1-9/+7
The previous definitions included both {B,C,D,E}_CUT_VERSION and CHIP_92D_{C,D}_CUT with conflicting values for the C and D cut versions, and literal hex values were used in the IS_92D_{C,D,E}_CUT macros. So we clean all this up and in doing so enable cut-specific code paths for cuts C and D, which would not have been executed because the CHIP_92D_{C,D}_CUT constants were wrong and the cut version was thus recorded incorrectly. Signed-off-by: Forest Bond <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-12rtlwifi: support for Belkin Surf N300 XRLorenzo Bianconi1-0/+1
Added support for Belkin Surf N300 XR wireless usb adapter to rtlwifi driver Signed-off-by: Lorenzo Bianconi <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-12Merge branch 'master' of ↵John W. Linville2-7/+4
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-04-11wireless: Remove unnecessary ; from while (0) macrosJoe Perches4-21/+7
Semicolons are not necessary after macros that end in while (0). Remove them. Simplify the macros with tests of do { if (foo>size) memset1; else memset2;} while (0); to a single line memset(,,min_t(size_t, foo, size)) Signed-off-by: Joe Perches <[email protected]> Acked-by: Arend van Spriel <[email protected]> Acked-by: Larry Finger <[email protected]> Acked-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-11rtlwifi: Add missing DMA buffer unmapping for PCI driversLarry Finger1-1/+6
In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These are caused by the DMA buffers used for beacons never being unmapped. This bug was also reported at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618 Reported-and-Tested-by: Da Xue <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-11rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routineLarry Finger2-19/+21
The current version of rtlwifi for USB operations uses kmalloc to acquire a 32-bit buffer for each read of the device. When _usb_read_sync() is called with the rcu_lock held, the result is a "sleeping function called from invalid context" BUG. This is reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775. The first case has the lock originating from within rtlwifi and could be fixed by rearranging the locking; however, the second originates from within mac80211. The kmalloc() call is removed from _usb_read_sync() by creating a ring buffer pointer in the private area and allocating the buffer data in the probe routine. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> [This version good for 3.3+ - different patch for 3.2 - 2.6.39] Signed-off-by: John W. Linville <[email protected]>
2012-04-10mac80211: remove channel type argument from rate_updateJohannes Berg1-2/+1
The channel type argument to the rate_update() callback isn't really the correct way to give the rate control algorithm about the desired RX bandwidth of the peer. Remove this argument, and instead update the STA capabilities with 20/40 appropriately. The SMPS update done by this callback works in the same way, so this makes the callback cleaner. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-10rtlwifi: Add missing DMA buffer unmapping for PCI driversLarry Finger1-1/+6
In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These are caused by the DMA buffers used for beacons never being unmapped. This bug was also reported at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618 Reported-and-Tested-by: Da Xue <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-09rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routineLarry Finger2-19/+21
The current version of rtlwifi for USB operations uses kmalloc to acquire a 32-bit buffer for each read of the device. When _usb_read_sync() is called with the rcu_lock held, the result is a "sleeping function called from invalid context" BUG. This is reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775. The first case has the lock originating from within rtlwifi and could be fixed by rearranging the locking; however, the second originates from within mac80211. The kmalloc() call is removed from _usb_read_sync() by creating a ring buffer pointer in the private area and allocating the buffer data in the probe routine. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> [This version good for 3.3+ - different patch for 3.2 - 2.6.39] Signed-off-by: John W. Linville <[email protected]>
2012-04-09rtlwifi: Simplify rtl_get/set inline functionsJoe Perches1-13/+11
Use a temporary to make the code a bit neater. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-09rtlwifi: Use is_zero_ether_addr, remove line continuationJoe Perches1-3/+2
Use the normal kernel facilities and use %pM to print the all zero mac address. Remove unnecessary line continuation. Signed-off-by: Joe Perches <[email protected]> Acked-by: [email protected] Signed-off-by: John W. Linville <[email protected]>
2012-04-09rtlwifi: Fix oops on rate-control failureLarry Finger1-1/+4
When the rate-control indexing is incorrectly set up, mac80211 issues a warning and returns NULL from the call to ieee80211_get_tx_rate(). When this happens, avoid a NULL pointer dereference. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-09rtlwifi: rtl8192de: Fix firmware initializationLarry Finger1-6/+0
Before the switch to asynchronous firmware loading (mainline commit b0302ab), it was necessary to load firmware when initializing the first of the units in a dual-mac system. After the change, it is necessary to load firmware in both units. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-26rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanningLarry Finger2-2/+2
In https://bugzilla.redhat.com/show_bug.cgi?id=770207, slowdowns of driver rtl8192ce are reported. One fix (commit a9b89e2) has already been applied, and it helped, but the maximum RX speed would still drop to 1 Mbps. As in the previous fix, the initial gain was determined to be the problem; however, the problem arises from a setting of the gain when scans are started. Driver rtl8192de also has the same code structure - this one is fixed as well. Reported-and-Tested-by: Ivan Pesin <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-19rtlwifi: Remove unused ETH_ADDR_LEN definesJoe Perches2-2/+0
Just neatening. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-09Merge branch 'master' of ↵John W. Linville2-9/+24
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-03-06rtlwifi: rtl8192ce: Fix loss of receive performanceJingjun Wu1-0/+4
Driver rtl8192ce when used with the RTL8188CE device would start at about 20 Mbps on a 54 Mbps connection, but quickly drop to 1 Mbps. One of the symptoms is that the AP would need to retransmit each packet 4 of 5 times before the driver would acknowledge it. Recovery is possible only by unloading and reloading the driver. This problem was reported at https://bugzilla.redhat.com/show_bug.cgi?id=770207. The problem is due to a missing update of the gain setting. Signed-off-by: Jingjun Wu <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: rtl8192c: Prevent sleeping from invalid context in rtl8192cuLarry Finger1-3/+8
When driver rtl8192cu is used with the debug level set to 3 or greater, the result is "sleeping function called from invalid context" due to an rcu_read_lock() call in the DM refresh routine in driver rtl8192c. This lock is not necessary as the USB driver does not use the struct being protected, thus the lock is set only when a PCI interface is active. This bug is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42775. Reported-by: Ronald Wahl <[email protected]> Tested-by: Ronald Wahl <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Cc: Ronald Wahl <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: Remove extraneous value returnLarry Finger1-3/+2
In usb.c, routine _rtl_usb_init_sw() always returns 0, and rtl_usb_probe() never checks the returned value. Thus we can change _rtl_usb_init_sw() to a void routine. In addition, remove the underscore at the beginning of the name of the routine. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05rtlwifi: Detect misread of end-point countLarry Finger1-3/+10
In the unlikely event of a misread of the USB end point count, the driver generates a divide fault. To prevent this, add a check of the value returned by _rtl_usb_init(). In addition, add some logging to indicate why the condition occurred. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05Merge branch 'master' of ↵John W. Linville7-284/+113
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-02-27rtlwifi: Fix breakage in debug functions when built as a moduleLarry Finger1-1/+1
Since commit 481b9606, it has not been possible to invoke debugging with any rtlwifi driver built as a module. Reported-by: Johannes Berg <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-22rtlwifi: rtl8192se firmware load can overflow target bufferTim Gardner2-2/+4
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 <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-22Correcting typos in rtlwifi/base.cTristan Pourcelot1-3/+3
This patch correct some typos in a comment. Signed-off-by: Tristan Pourcelot <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-22rtlwifi: rtl8192c-common: rtl8192se: rtl8192de: Simplify if statementsLarry Finger3-277/+104
Devendra Naga <[email protected]> submitted a patch for rtl8192c_common to change the tests in _rtl92c_store_pwrIndex_diffrate_offset(). This patch improves on those changes and applies similar modifications to drivers rtl8192se and rtl8192de. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-22rtlwifi/rtl8192c: in _rtl92c_phy_calculate_bit_shift remove comparing ↵Devendra.Naga1-1/+1
bitmask against 1 in _rtl92c_phy_calculate_bit_shift everytime the right shifted bitmask is AND with 1 and compared against 1. i.e. if ((bitmask >> i) & 0x1 == 1) break; which in the if condition is anyway becomes a 1 or 0. Signed-off-by: Devendra.Naga <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-21Merge branch 'master' of ↵John W. Linville3-20/+25
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-02-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+2
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c Small minor conflict in bnx2x, wherein one commit changed how statistics were stored in software, and another commit fixed endianness bugs wrt. reading the values provided by the chip in memory. Signed-off-by: David S. Miller <[email protected]>
2012-02-13drivers/net: Remove boolean comparisons to true/falseJoe Perches17-49/+42
Booleans should not be compared to true or false but be directly tested or tested with !. Done via cocci script: @@ bool t; @@ - t == true + t @@ bool t; @@ - t != true + !t @@ bool t; @@ - t == false + !t @@ bool t; @@ - t != false + t Signed-off-by: Joe Perches <[email protected]> Reviewed-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-09rtlwifi: Modify rtl_pci_init to return 0 on successSimon Graham1-2/+2
Fixes problem where caller would think routine succeeded when it failed leading to divide by zero panic. Signed-off-by: Simon Graham <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-09rtlwifi: Modify rtl_pci_init to return 0 on successJohn W. Linville1-3/+3
Fixes problem where caller would think routine succeeded when it failed leading to divide by zero panic. (This also reverts an earlier attempt, commit 42bc0c97 "rtlwifi: Return correct failure code on error". -- JWL) Signed-off-by: Simon Graham <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-08rtlwifi: Return correct failure code on errorSimon Graham1-1/+1
Callers of rtl_pci_init expect zero to be returned on error. Returning the error code leads to, amongst other things, divide by zero panics attempting to use the ring size that is set to zero. Signed-off-by: Simon Graham <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-08rtlwifi: Handle previous allocation failures when freeing device memorySimon Graham1-6/+10
Handle previous allocation failures when freeing device memory Signed-off-by: Simon Graham <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06rtlwifi: Fix PCI probe error path orphaned memoryTim Gardner1-7/+12
Memory allocated by ieee80211_alloc_hw() will get orphaned if any subsequent initializations fail. Also don't pci_set_drvdata(pdev, NULL) until just before disabling the PCI device. Functions called by rtl_deinit_core(hw) may eventually need the context (when its actually implemented). Cc: Larry Finger <[email protected]> Cc: Chaoming Li <[email protected]> Cc: John W. Linville <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06rtlwifi: Remove extra debugging message accidentally left inLarry Finger1-3/+1
In commit b0302aba812bcc39291cdab9ad7e37008f352a91, an extra debugging message that is spamming the logs was not deleted before submission. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06rtlwifi: Fix typo in dm.cMasanari Iida1-1/+1
Correct a spelling "disconnet" to "disconnect" in drivers/net/wireless/rtlwifi/rtl8192de/dm.c Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>