aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/usb.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-02-28mwifiex: do not advertise usb autosuspend supportBing Zhao1-8/+0
As many Surface Pro I & II users have found out, the mwifiex_usb doesn't support usb autosuspend, and it has caused some system stability issues. Bug 69661 - mwifiex_usb on MS Surface Pro 1 is unstable Bug 60815 - Interface hangs in mwifiex_usb Bug 64111 - mwifiex_usb USB8797 crash failed to get signal information USB autosuspend get triggered when Surface Pro's AC power is removed or powertop enables power saving on USB8797 device. Driver's suspend handler is called here, but resume handler won't be called until the AC power is put back on or powertop disables power saving for USB8797. We need to refactor the suspend/resume handlers to support usb autosuspend properly. For now let's just remove it. Cc: <stable@vger.kernel.org> # 3.5+ Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-24mwifiex: rename usb driver name registerring to usb coreBing Zhao1-3/+1
Both libertas USB driver and mwifiex_usb driver are registerring with name 'usb8xxx'. The following conflict happens while trying to load both drivers. [6.211307] Error: Driver 'usb8xxx' is already registered... [6.217261] mwifiex_usb: Driver register failed! Fix it by renaming mwifiex_usb driver's name. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-13mwifiex: add USB8897 supportYogesh Ashok Powar1-13/+41
Adding new device IDs and assigning generic function/variable names instead of using device-id specific names. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09mwifiex: fix rx_pending count imbalanceUjjal Roy1-3/+1
RX packets are handled in different paths. Not all paths have decrement of rx_pending counter. This patch fixes the counter imbalance. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-11-15mwifiex: fix issues in driver unload path for USB chipsetsUjjal Roy1-12/+15
1) After driver load failure, clear 'card->adapter' instead of card pointer so that card specific cleanup is performed later when user unloads the driver. 2) Clear usb_card pointer in disconnect handler to avoid invalid memory access when user unloads the driver after removing the card. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-26mwifiex: fix NULL pointer dereference in usb suspend handlerBing Zhao1-7/+0
Bug 60815 - Interface hangs in mwifiex_usb https://bugzilla.kernel.org/show_bug.cgi?id=60815 [ 2.883807] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 [ 2.883813] IP: [<ffffffff815a65e0>] pfifo_fast_enqueue+0x90/0x90 [ 2.883834] CPU: 1 PID: 3220 Comm: kworker/u8:90 Not tainted 3.11.1-monotone-l0 #6 [ 2.883834] Hardware name: Microsoft Corporation Surface with Windows 8 Pro/Surface with Windows 8 Pro, BIOS 1.03.0450 03/29/2013 On Surface Pro, suspend to ram gives a NULL pointer dereference in pfifo_fast_enqueue(). The stack trace reveals that the offending call is clearing carrier in mwifiex_usb suspend handler. Since commit 1499d9f "mwifiex: don't drop carrier flag over suspend" has removed the carrier flag handling over suspend/resume in SDIO and PCIe drivers, I'm removing it in USB driver too. This also fixes the bug for Surface Pro. Cc: <stable@vger.kernel.org> # 3.5+ Tested-by: Dmitry Khromov <icechrome@gmail.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-26mwifiex: fix driver unload problem for usb chipsetsAmitkumar Karwar1-25/+25
We have usb_deregister() call in our rmmod routine. deauth, shutdown etc. commands will be sent to FW later when bus driver calls disconnect handler. This mechanism works fine with SDIO and PCIe interfaces, but there is an issue with USB. USB bus driver returns all URBs submitted for receiving data and command response immediately after usb_deregister() with failure status. Hence we don't send deauth, shutdown etc. command to firmware. The problem is fixed by moving code from disconnect handler to rmmod routine for USB interface. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-24mwifiex: add unregister_dev handler for usb interfaceAmitkumar Karwar1-0/+8
Clear the data pointer stored in USB interface structure in this handler. This helps to return from mwifiex_usb_disconnect() if driver deinitialization is already performed while handling an error path for mwifiex_usb_probe(). USB8797 card gets enumerated twice. First enumeration is for firmware download and second enumeration expects firmware initialization. mwifiex_usb_probe() always takes care of deinitialization for first enumeration after firmware download. Also, this change matches our handling for SDIO and PCIe interfaces. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30mwifiex: do not overwrite error code from lower layer driverBing Zhao1-2/+2
Instead of converting it to a bogus error code -1, we should return the original error code from lower layer driver. This error code will be printed so it may give user some clues on what has happened. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07wireless: mwifiex: remove unreachable pathsSasha Levin1-27/+3
We know 'firmware' is non-NULL from the beginning of mwifiex_prog_fw_w_helper, remove all !firmware paths from the rest of the function. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-30wireless: mwifiex: Fix typo in wireless/mwifiex driverMasanari Iida1-1/+1
Correct spelling typo in wireless/mwifiex driver. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-14mwifiex: add multi-queue supportAvinash Patil1-1/+1
This patch adds support for multiple TX queues inside mwifiex driver. Four different queues according to WMM access categories are defined for each virtual interface. When a packet is received from netdev for transmission, tx pending count for particular queue is incremented and if tx pending count has reached upper water-mark, this queue is stopped instead of stopping all queues. Similarly when a packet is successfully transmitted from device, tx pending count is decremented per queue and if pending count falls below lower water-mark, queue operations are again resumed. This ensures that not all tranmission is blocked if traffic with particular TOS value suddenly increases. Also wake all queues after association/IBSS_join/uAP_BSS_start to enable traffic on all queues. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-22mwifiex: improve error path handling in usb.cAmitkumar Karwar1-5/+17
skb allocated during initialisation is reused for receiving commands/events by USB interface. We miss to reset skb->data in failure cases. This patch takes care of it. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-22mwifiex: fix bugs in event handling codeAmitkumar Karwar1-3/+3
This patch ensures uniformity in event skb sent by interface code (USB/PCIe/SDIO) which automatically fixes following bugs. 1) For USB interface, same buffer is reused for receiving cmd and events from firmware. While handling events, we perform skb_pull(skb, 4) to remove event header. Corresponding skb_push() call is missing while submitting the buffer. 2) For PCIe interface, event skb is passed with event header. Recently added uAP events EVENT_UAP_STA_ASSOC, EVENT_UAP_STA_DEAUTH will not work for PCIe, as they assume event skb points to event body. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23mwifiex: add support for Marvell USB8797 chipsetAmitkumar Karwar1-0/+1052
This patch supports Avastar 88W8797 chipset with USB interface. The corresponding firmware image file is located at: "mrvl/usb8797_uapsta.bin" Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>