summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: add missing endian conversionsTobias Waldekranz2013-08-264-6/+6
| | | | | | | | Fixes multiple locations where a little endian host is assumed during ser/des of messages sent to/received from the chip. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: drop gratuitous ARP framesAvinash Patil2013-08-266-0/+67
| | | | | | | | | | | | This patch adds support for dropping gratuitous ARP frames which is requirement for WFA Hotspot2.0. Hotspot2.0 capability is enabled in driver if extended capabilities IE from BSS descriptor has 11u interworking enabled. 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>
* mwifiex: fix ext_capab IE structure definitionAvinash Patil2013-08-262-5/+7
| | | | | | | | | | EXT_CAPAB_IE format involves IEEE header followed by bytestream of capabilities. Current structure has incorrect member u8 for data; fix it by defining it as u8[0]. 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>
* mwifiex: fix driver unload problem for usb chipsetsAmitkumar Karwar2013-08-261-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>
* mwifiex: do not create AP and P2P interfaces upon driver loadingBing Zhao2013-08-221-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 60747 - 1286:2044 [Microsoft Surface Pro] Marvell 88W8797 wifi show 3 interface under network https://bugzilla.kernel.org/show_bug.cgi?id=60747 This issue was also reported previously by OLPC and some folks from the community. There are 3 network interfaces with different types being created when mwifiex driver is loaded: 1. mlan0 (infra. STA) 2. uap0 (AP) 3. p2p0 (P2P_CLIENT) The Network Manager attempts to use all 3 interfaces above without filtering the managed interface type. As the result, 3 identical interfaces are displayed under network manager. If user happens to click on an entry under which its interface is uap0 or p2p0, the association will fail. Work around it by removing the creation of AP and P2P interfaces at driver loading time. These interfaces can be added with 'iw' or other applications manually when they are needed. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix build error when CONFIG_PM is not setBing Zhao2013-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | config: make ARCH=m68k allmodconfig All error/warnings: drivers/net/wireless/mwifiex/cfg80211.c: In function 'mwifiex_fill_coalesce_rule_info': >> drivers/net/wireless/mwifiex/cfg80211.c:2493:3: error: implicit declaration of function 'mwifiex_is_pattern_supported' [-Werror=implicit-function-declaration] drivers/net/wireless/mwifiex/cfg80211.c: At top level: drivers/net/wireless/mwifiex/cfg80211.c:2537:12: warning: 'mwifiex_cfg80211_set_coalesce' defined but not used [-Wunused-function] cc1: some warnings being treated as errors Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add packet coalesce supportAmitkumar Karwar2013-08-095-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coalesce filters are configured in firmware based on settings received from cfg80211. Packet type which is required by firmware is determined based on provided patterns in a rule: Unicast: if pattern '01' with offset 0 is found Multicast: if pattern '33:33' or '01:00:5e' with offset 0 is found Broadcast: if pattern 'ff:ff:ff:ff' with offset 0 is found Some example coalesce configuration files: 1) Coalesce Rx data packets from 192.168.0.88 mac address of our device is 00:50:43:21:53:7A Source IP address offset comes out as 52 after following calculations: 32 bytes of HW 802.11 header + 8 bytes LLC + 12 bytes in IPV4 header till source IP address Destination mac is at offset 6 in HW header. delay=100 condition=1 patterns=01,6+00:50:43:22,10+53:7A,52+c0:a8:00:58 2) Coalesce all broadcast and multicast packets(Multiple packet types are not allowed in a single rule. Hence created separate rules) delay=400 condition=1 patterns=33:33 delay=400 condition=1 patterns=ff:ff:ff:ff 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>
* mwifiex: increase max supported pattern offsetAmitkumar Karwar2013-08-091-1/+1
| | | | | | | | | The offset number is increased to accomodate requests from user to match more fields in a Rx packet. 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>
* mwifiex: modify mwifiex_is_pattern_supported() routineAmitkumar Karwar2013-08-091-4/+6
| | | | | | | | It is modified so that it can be reused for coalesce feature. 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>
* mwifiex: rename mef macrosAmitkumar Karwar2013-08-093-14/+15
| | | | | | | | | Their names were generic. We need to define similar macros for coalesce feature. Hence they are renamed here. 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>
* Merge branch 'master' of ↵John W. Linville2013-08-095-9/+12
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * mwifiex: fix command 0x2c timeout during p2p_find or p2p_connectStone Piao2013-07-311-2/+2
| | | | | | | | | | | | | | | | | | We missed bss_mode check for P2P client. Signed-off-by: Stone Piao <piaoyun@marvell.com> 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>
| * mwifiex: fix wrong data rates in P2P clientAvinash Patil2013-07-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue wherein adhoc rates were being copied into association request from P2P client. Cc: <stable@vger.kernel.org> # 3.10.y Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mwifiex: check for bss_role instead of bss_mode for STA operationsAvinash Patil2013-07-312-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue wherein association would fail on P2P interfaces. This happened because we are checking priv->mode against NL80211_IFTYPE_STATION. While this check is correct for infrastructure stations, it would fail P2P clients for which mode is NL80211_IFTYPE_P2P_CLIENT. Better check would be bss_role which has only 2 values: STA/AP. Cc: <stable@vger.kernel.org> # 3.10.y Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mwifiex: Add missing endian conversion.Tomasz Moń2013-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | Both type and pkt_len variables are in host endian and these should be in Little Endian in the payload. Signed-off-by: Tomasz Moń <desowin@gmail.com> Acked-by: Bing Zhao <bzhao@marvell.com> Cc: <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: populate rates in probe request using cfg80211_scan_requestAvinash Patil2013-08-013-22/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever available, use cfg80211_scan_request to populates rates in outgoing probe request. This will help to advertise band specific rates and fix an issue where 11b rates were advertised in probe request going out on 11a band. This will also ensure that we do not advertise 11b rates while P2P scan is going on. 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>
* | mwifiex: fix adapter pointer dereference issueAmitkumar Karwar2013-08-011-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has introduced by recent commit 6b41f941d7cd: "mwifiex: handle driver initialization error paths" which adds error path handling for mwifiex_fw_dpc(). release_firmware(adapter->*) is called for success as well as failure paths. In failure paths, adapter is already freed at this point. The issue is fixed by moving mwifiex_free_adapter() call. Reported-by: Dan Carpenter <dan.carpenter@oracle.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>
* | Merge branch 'for-john' of ↵John W. Linville2013-08-011-2/+1
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * | cfg80211/nl80211: rename packet pattern related structures and enumsAmitkumar Karwar2013-07-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently packet patterns and it's enum/structures are used only for WoWLAN feature. As we intend to reuse them for new feature packet coalesce, they are renamed in this patch. Older names are kept for backward compatibility purpose. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* | | mwifiex: code rearrangement in sdio.cAmitkumar Karwar2013-07-261-107/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some function definitions are moved to appropriate place to avoid forward declarations. 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>
* | | mwifiex: handle driver initialization error pathsAmitkumar Karwar2013-07-262-28/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mwifiex_fw_dpc() asynchronously takes care of firmware download and initialization. Currently the error paths in mwifiex_fw_dpc() are not handled. So if wrong firmware is downloaded, required cleanup work is not performed. memory is leaked and workqueue remains unterminated in this case. mwifiex_terminate_workqueue() is moved to avoid forward declaration. 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>
* | | Merge branch 'master' of ↵John W. Linville2013-07-255-61/+57
|\ \ \ | | |/ | |/| | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * | mwifiex: fix IRQ enable/disableDaniel Drake2013-07-225-61/+57
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During tear down (e.g. mwifiex_sdio_remove during system suspend), mwifiex left IRQs enabled for a significant period of time when it was unable to handle them correctly. This caused interrupt storms and interfered with the bluetooth interface on the same SDIO card. Solve this by disabling interrupts at the point when they can no longer be handled correctly, which is at the start of mwifiex_remove_card(). For cleanliness, we now enable interrupts in the mwifiex_add_card() path, to be symmetrical with the disabling of interrupts. We also couple the registration of the sdio IRQ handler with the actual enable/disable of interrupts at the hardware level. I also removed a write to this register in mwifiex_init_sdio which seemed pointless and won't cause any ill effects now that we only register the SDIO IRQ handler when we are ready to accept interrupts. Includes some corrections from Amitkumar Karwar. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: modify mwifiex_ap_sta_limits to advertise support for P2PAvinash Patil2013-07-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | We support maximum simultaneous 2 non-AP station interfaces and they can assume role of Station/P2P client/P2P GO. Advertise this support to cfg80211 so that concurrent P2P/STA operation is possible. 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>
* | mwifiex: remove duplicate structure host_cmd_tlvAmitkumar Karwar2013-07-244-87/+91
| | | | | | | | | | | | | | | | | | We already have 'struct mwifiex_ie_types_header' with same definition. Hence host_cmd_tlv is removed in this patch. 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>
* | mwifiex: correction in mwifiex_check_fw_status() return statusAmitkumar Karwar2013-07-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For PCIe cards, when wrong firmware is downloaded, firmware is failed to be ready in 10 seconds. We should return an error at this point. But currently we are sending first command to firmware. As expected firmware doesn't respond to this command and command timeout occurs. This patch fixes the problem by removing unnecessary 'ret' variable modifications in "if (ret) {" block. The block is just supposed to update "adapter->winner" flag. 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>
* | mwifiex: replace mdelay with msleepAmitkumar Karwar2013-07-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It is observed that when wrong firmware is downloaded for PCIe card, system hangs for 10 seconds. The reason is mdelay() is used when firmware status is polled. Replace mdelay with msleep(non-blocking API) to fix the issue. 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>
* | mwifiex: reduce firmware poll retriesAmitkumar Karwar2013-07-242-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After downloading the firmware, firmware status is checked by reading a register. Polling interval is 100 msecs. Therefore 100 retries means the status is checked for 10 secs which is more than sufficient for firmware to get ready. This patch removes 1000 retries macro usage, because 100secs time is not practical. 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>
* | mwifiex: add unregister_dev handler for usb interfaceAmitkumar Karwar2013-07-241-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>
* | mwifiex: move if_ops.cleanup_if() callAmitkumar Karwar2013-07-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As if_ops.init_if() is called in mwifiex_register(), corresponding cleanup routine should be called in mwifiex_unregister(). Currently it's there in mwifiex_adapter_cleanup(), hence interface specific cleanup is not performed if driver initialization is failed. 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>
* | mwifiex: remove unnecessary del_timer(cmd_timer)Amitkumar Karwar2013-07-241-2/+0
| | | | | | | | | | | | | | | | | | It is already there in mwifiex_unregister(). So unnecessary call in mwifiex_adapter_cleanup() is removed in this patch. 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>
* | mwifiex: move del_timer_sync(scan_delay_timer) call to fix memleakAmitkumar Karwar2013-07-242-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently it is in mwifiex_adapter_cleanup() which doesn't get called if driver initialization is failed causing memory leak. scan_delay_timer is initialized in mwifiex_register(), so it should be deleted in mwifiex_unregister(). Hence it has been moved to appropriate place. 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>
* | mwifiex: add PCIe shutdown handler to avoid system hang on rebootAmitkumar Karwar2013-07-241-0/+9
| | | | | | | | | | | | | | | | | | | | If reboot command is issued when device is in connected state, system hangs while booting. This issue is fixed by doing cleanup in shutdown handler. 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>
* | mwifiex: correct max IE length check for WPS IEAvinash Patil2013-07-241-5/+6
| | | | | | | | | | | | | | | | | | | | | | This patch is bug fix for an invalid boundry check for WPS IE. We should check max IE length against defined macro; instead we were checking it against size of pointer. Fix it. Also move IE length check before allocation of memory. 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>
* | mwifiex: support to send deauth for P2P clientStone Piao2013-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | During P2P handshake, P2P client needs to send deauth after EAPOL FAILURE to GO. We need add bss mode for P2P client when handle deauth request. Without this change, deauth can not be sent out from P2P client side. Signed-off-by: Stone Piao <piaoyun@marvell.com> 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>
* | mwifiex: skip registering mgmt frame that has already registeredStone Piao2013-07-241-6/+10
| | | | | | | | | | | | | | | | | | Before sending command to firmware, we need to check the frame type. We skip registering the mgmt frame that has already been registered. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: discard deauth and disassoc event during WPS sessionStone Piao2013-07-241-0/+10
| | | | | | | | | | | | | | | | | | | | Some GO will send deauth or disassoc packet at the end of WPS handshake, which causes P2P connecion failure due to the race condition between event path and data path. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: add tx info to skb when forming mgmt frameHuawei Yang2013-07-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | In function 'mwifiex_write_data_complete' it need tx info to find the mwifiex_private to updates statistics and wake up tx queues. Or we may trigger tx queues timeout when transmitting lots of mgmt frames. Signed-off-by: Huawei Yang <harvey.huawei.yang@gmail.com> Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: delete AP TX queues when bridged packets reach thresholdAvinash Patil2013-07-244-2/+69
| | | | | | | | | | | | | | | | | | | | Delete packets from TX queues for this mwifiex_private structure when bridged packet count reaches maximum threshold. Bridged packets from each RA List are deleted till they fall to low threshold of 128. 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>
* | mwifiex: maintain outstanding packet count for RA list instead of packet sizeAvinash Patil2013-07-243-7/+7
| | | | | | | | | | | | | | | | | | | | Maintain total outstanding packet count for RA list instead of total outstanding size as packet count metric seems more reasonable for checking threshold etc. 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>
* | mwifiex: rename pkt_count to ba_pkt_count in mwifiex_ra_list_tbl structAvinash Patil2013-07-242-5/+5
| | | | | | | | | | | | | | | | | | | | | | pkt_count is used to determine if BA can be formed on this RA list by comparing it with randomly generated BA threshold. The pkt_count variable name here is ambiguous and does not reflect its usage correctly. Rename it to ba_pkt_count. 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>
* | mwifiex: remove stop_net_dev_queue operation in AP forwardingHuawei Yang2013-07-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Under uAP mode mwifiex may stop all net tx queues on forwarding packets. This may stop some tx queues and they never have chance to be waked up. There is also no need to check tx_pending and stop queues here. Because local host has such kind of check when transmitting packets and it's not proper to have forwarding affect local transmitting. Signed-off-by: Huawei Yang <harvey.huawei.yang@gmail.com> Reviewed-by: Avinash Patil <patila@marvell.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Convert mwifiex/pcie to dev_pm_ops from legacy pm_opsShuah Khan2013-07-221-9/+17
|/ | | | | | | | | | | Convert the mwifiex/pci driver to use dev_pm_ops for power management and remove Legacy PM handling. This change re-uses existing suspend and resume interfaces for dev_pm_ops, and changes CONFIG_PM ifdefs to CONFIG_PM_SLEEP as the driver does not support run-time PM. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: channel switch handling for stationAmitkumar Karwar2013-06-196-0/+54
| | | | | | | | | | | | After receiving channel switch announcement from AP, scan and association on that channel is blocked for DFS_CHAN_MOVE_TIME (10 seconds). Hence station will be able to connect to the AP, once it is moved to new channel. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add basic 11h support for stationAmitkumar Karwar2013-06-198-0/+155
| | | | | | | | | | | | | | This patch adds code to parse requested AP's 11h capabilities and add 11h information in association request. Also, deauth is sent to the AP after receiving channel switch announcement event from firmware. This happens when AP advertises WLAN_EID_CHANNEL_SWITCH IE in it's beacon. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: code rearrangement for better readabilityAmitkumar Karwar2013-06-191-12/+11
| | | | | | | | | | Use negative check (if(!bss_desc)) and return failure instead of failing a NULL check later in mwifiex_check_network_compatibility() routine. 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>
* mwifiex: fix memory corruption when unsetting multicast listDaniel Drake2013-06-172-13/+10
| | | | | | | | | | | | | | | | | | | | | When trying to unset a previously-set multicast list (i.e. the new list has 0 entries), mwifiex_set_multicast_list() was calling down to mwifiex_request_set_multicast_list() while leaving mcast_list.num_multicast_addr as an uninitialized value. We were arriving at mwifiex_cmd_mac_multicast_adr() which would then proceed to do an often huge memcpy of mcast_list.num_multicast_addr*ETH_ALEN bytes, causing memory corruption and hard to debug crashes. Fix this by setting mcast_list.num_multicast_addr to 0 when no multicast list is provided. Similarly, fix up the logic in mwifiex_request_set_multicast_list() to unset the multicast list that was previously sent to the hardware in such cases. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: Add module parameter for regdomainAvinash Patil2013-06-171-4/+25
| | | | | | | | | | | | | Allow a regulatory domain country code to be specified at boot using a module argument. This overrides the firmware regulatory mode. This patch also enables uAP to operate in 11a mode with hostapd. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-john' of ↵John W. Linville2013-06-121-5/+11
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/iwlwifi/mvm/mac80211.c
| * Merge remote-tracking branch 'wireless-next/master' into HEADJohannes Berg2013-06-0415-317/+810
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge to get the wil6210 changes that a cfg80211 change needs. A conflict in drivers/net/wireless/ath/ath9k/init.c was just whitespace changes. Also fix a semantic conflict due to cw1200 using WoWLAN which I had modified in my tree. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud