Commit Graph

22 Commits (8fc229a51b0e10f4ceb794e8b99fa0a427a7ba41)

Author SHA1 Message Date
Amitkumar Karwar e80c81dc14 mwifiex: fix bugs in event handling code
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-06-22 13:59:50 -04:00
WarheadsSE 98e6b9df53 mwifiex: add support for SD8786 sdio
modified:   drivers/net/wireless/mwifiex/Kconfig
	- notate additional chipset
	modified:   drivers/net/wireless/mwifiex/sdio.c
	- add definition of id (0x9116)
	- add to switch for firmware load
	- add MODULE_FIRMWARE
	modified:   drivers/net/wireless/mwifiex/sdio.h
	- add definition of default firmware name

Signed-off-by: Jason Plum <max@warheads.net>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-08 20:56:10 -04:00
Amitkumar Karwar 59a4cc2539 mwifiex: use asynchronous firmware loading
Make use of request_firmware_nowait instead of request_firmware
to load FW asynchronously. This fixes timeouts introduced with
recent udev changes.

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-12 15:10:30 -04:00
John W. Linville 01a2829809 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/ath/ath9k/hw.c
2012-03-16 13:45:25 -04:00
Yogesh Ashok Powar 5dbd326ca7 mwifiex: fix checkpatch --strict warnings/errors Part 6
For file sdio.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-14 14:39:37 -04:00
Yogesh Ashok Powar e7891ba2de mwifiex: use usleep_range instead of udelay
For the delay of 10 uSec or more usleep_range is prefered.
Unlike udelay, sleep_range avoids large number of undesired
interrupts.

Ref Documentation/timers/timers-howto.txt

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13 14:54:18 -04:00
Joe Perches e404decb0f drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages
alloc failures use dump_stack so emitting an additional
out-of-memory message is an unnecessary duplication.

Remove the allocation failure messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31 16:20:21 -05:00
Avinash Patil 17a60b4819 mwifiex: proper cleanup when RX multiport aggregation fails
Free SKBs allocated during multiport aggrgation setup when RX
multiport aggregation fails in the middle. With this handling
freeing SKB in mwifiex_process_int_status() for failure case
is removed.

Also handles single RX transaction failure.

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>
2011-12-13 15:33:23 -05:00
Bing Zhao e3bea1c875 mwifiex: add support for Marvell sd8797 device
This patch supports Marvell chipset 88W8797 (Avastar) with
SDIO interface.

The corresponding firmware image file is located at:
"mrvl/sd8797_uapsta.bin"

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@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>
2011-11-17 15:45:19 -05:00
Amitkumar Karwar 7d7ab02204 mwifiex: enable SDIO multiport aggregation
By default SDIO multiport aggregation is disabled. It's useful to
get good throughput results. This patch enables it.

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>
2011-11-09 16:14:13 -05:00
Amitkumar Karwar d930faee14 mwifiex: add support for Marvell pcie8766 chipset
This patch supports 88W8766P chipset with a PCIe interface.

The corresponding firmware image file is located at:
"mrvl/pcie8766_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@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>
2011-10-12 14:41:44 -04:00
Amitkumar Karwar a049093600 mwifiex: disable auto deep sleep before unloading the driver
Since the auto deep sleep mode has been enabled at driver init time
we should disable it at driver unloading to shutdown the function
gracefully.

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>
2011-07-21 14:52:04 -04:00
Amitkumar Karwar df3b124bdb mwifiex: check SDIO multi-port aggregation buffer room correctly
We should consider current packet length also while checking
Tx aggregation buffer room.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:03 -04:00
Amitkumar Karwar 287546df34 mwifiex: get rid of global adapter pointer
1) Avoid global adapter pointer usage
   a) in sdio.c by moving some code from mwifiex_cleanup_module() to
      mwifiex_sdio_remove().
   b) in main.c by passing an extra parameter to few functions.
2) Add new variable "user_rmmod" to identify if mwifiex_sdio_remove()
   callback function is called in card removal or rmmod context. These
   code changes are adapted from Libertas driver.
3) Remove unnecessary NULL pointer check for "func" pointer in
   mwifiex_sdio_remove().

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:52 -04:00
Amitkumar Karwar 4a7f5db19c mwifiex: remove support for old chipsets W0/W1
For SD8787 A0/A1 chipsets we use the default firmware image
file 'mrvl/sd8787_uapsta.bin'. So the chip rev id variable
is removed.

The global variable fw_name is moved to adapter structure
so that we can support a different interface, such as PCIe,
in future.

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>
2011-06-01 15:12:31 -04:00
Christoph Fritz b53575ecf9 mwifiex: fix null derefs, mem leaks and trivia
This patch:
 - adds kfree() where necessary
 - prevents potential null dereferences
 - makes use of kfree_skb()
 - replaces -1 for failed kzallocs with -ENOMEM

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10 15:54:50 -04:00
Yogesh Ashok Powar 270e58e889 mwifiex: remove unnecessary variable initialization
Skip initialization of local variables with some default values
if the values are not going to be used further down the code path.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:16 -04:00
Yogesh Ashok Powar 636c459849 mwifiex: remove redundant local variables and comments
Remove some local variables (mainly function return values)
that are used only once. Also, one dummy function and some
wordy comments are removed.

Signed-off-by: Yogesh Ashok Powar <yogeshp@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>
2011-04-19 15:38:04 -04:00
Amitkumar Karwar 572e8f3ead mwifiex: remove unused function parameters
Some function parameters become useless after previous
cleanup changes.

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>
2011-04-14 15:35:13 -04:00
Yogesh Ashok Powar 19a898601a mwifiex: remove redundant "return" at end of void function
The return statement at the last line of a void function
is not necessary.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:12 -04:00
Amitkumar Karwar 600f5d909a mwifiex: cleanup ioctl wait queue and abstraction layer
1) remove mwifiex_alloc_fill_wait_queue() and
mwifiex_request_ioctl()
2) avoid dynamic allocation of wait queue
3) remove unnecessary mwifiex_error_code macros that
were used mainly by the wait queue status code
4) remove some abstraction functions
5) split mwifiex_prepare_cmd() to mwifiex_send_cmd_async()
and mwifiex_send_sync() to handle asynchronous and
synchronous commands respectively

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>
2011-04-14 15:35:11 -04:00
Bing Zhao 5e6e3a92b9 wireless: mwifiex: initial commit for Marvell mwifiex driver
This driver adds WiFi support for Marvell 802.11n based chipsets
with SDIO interface. Currently only SD8787 is supported. More
chipsets will be supported later.

drivers/net/wireless/mwifiex/

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
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: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-30 14:15:17 -04:00