profile/ivi/kernel-adaptation-intel-automotive.git
12 years agomac80211: Push the deleted comment to correct place
Ashok Nagarajan [Tue, 8 May 2012 04:00:29 +0000 (21:00 -0700)]
mac80211: Push the deleted comment to correct place

This comment is deleted in the patch "mac80211: Advertise HT protection mode in
IEs". Moving the comment to the now corrected place.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowlcore: fix some sparse warnings due to missing static declaration
Luciano Coelho [Wed, 16 May 2012 03:00:00 +0000 (06:00 +0300)]
wlcore: fix some sparse warnings due to missing static declaration

There were three sparse warnings in main.c due to missing static
declaration:

  CHECK   drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/main.c:1265:5: warning: symbol 'wl1271_validate_wowlan_pattern' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:1408:5: warning: symbol 'wl1271_convert_wowlan_pattern_to_rx_filter' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:4823:6: warning: symbol 'wl1271_connection_loss_work' was not declared. Should it be static?

Fix these by adding the static declaration to those functions.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowlcore: fix pointer print out in wl1271_acx_set_rx_filter()
Luciano Coelho [Wed, 16 May 2012 02:59:59 +0000 (05:59 +0300)]
wlcore: fix pointer print out in wl1271_acx_set_rx_filter()

The debug print in wl1271_acx_set_rx_filter() was causing the
following warning:

  CC      drivers/net/wireless/ti/wlcore/acx.o
drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’:
drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size

Instead of casting the pointer to an integer, use %p to print it our
instead.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove set_channel cfg80211 hook
Johannes Berg [Fri, 11 May 2012 17:24:34 +0000 (19:24 +0200)]
mwifiex: remove set_channel cfg80211 hook

Since mwifiex only supports managed and IBSS
modes, it doesn't need a set_channel call. The
callback might be called, but it won't matter
as nothing can use the channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: remove set_channel cfg80211 hook
Johannes Berg [Fri, 11 May 2012 17:23:57 +0000 (19:23 +0200)]
rndis_wlan: remove set_channel cfg80211 hook

Since rndis_wlan only supports managed and IBSS
modes, it doesn't need a set_channel call. The
callback might be called, but it won't matter
as nothing can use the channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: support explicit monitor interface
Johannes Berg [Fri, 11 May 2012 08:53:18 +0000 (10:53 +0200)]
iwlwifi: support explicit monitor interface

Support explicit monitor interface to keep
injection working after the HW queue changes.
This also finally enables sniffer mode.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: invert the order of ssid list in scan cmd
David Spinadel [Fri, 11 May 2012 08:53:17 +0000 (10:53 +0200)]
iwlwifi: invert the order of ssid list in scan cmd

The firmware inverts the order of ssid list of scan command, we
should invert the order before sending the command, in order to
get probe requests sent in wanted order.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: disable default wildcard ssid scan
David Spinadel [Fri, 11 May 2012 08:53:16 +0000 (10:53 +0200)]
iwlwifi: disable default wildcard ssid scan

iwl_fill_probe_request has used to add a wildcard ssid IE to
any probe request template, now it's disabled and it will
send wildcard ssid only for full scan. Instead, the highest
priority ssid is set to the template.
Due to adding high priority SSID to the template, it reduce
IE len, but since we had only 260 bytes for IEs before changing
allocation size to be dynamic, now we should have a bit more room
for IEs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix scan_cmd_size allocation
David Spinadel [Fri, 11 May 2012 08:53:15 +0000 (10:53 +0200)]
iwlwifi: fix scan_cmd_size allocation

Allocate scan command with dynamic size based on uCode capability
and num of channels.
This isn't an important fix as the previous allocation was always
too large as it added the scan command size but later subtracted
it (which meant it was supposed to be part of the max scan size.)

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: refactor valid channel type check
Johannes Berg [Thu, 10 May 2012 19:27:18 +0000 (21:27 +0200)]
nl80211: refactor valid channel type check

There are four instances in nl80211 of getting the
channel type from the attribute and validating it,
refactor those.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix cfg80211_can_beacon_sec_chan prototype
Johannes Berg [Thu, 10 May 2012 19:25:23 +0000 (21:25 +0200)]
cfg80211: fix cfg80211_can_beacon_sec_chan prototype

It should return bool, not int. The function even
does return true/false.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: prevent additions to old station flags API
Johannes Berg [Thu, 10 May 2012 18:14:43 +0000 (20:14 +0200)]
nl80211: prevent additions to old station flags API

We don't really want/need to maintain the old
station flags API any more, so refuse changes
to new (not yet defined) flags from the old
flags API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Queue I frame fragments to the LLCP sockets queue tail
Samuel Ortiz [Thu, 10 May 2012 17:45:52 +0000 (19:45 +0200)]
NFC: Queue I frame fragments to the LLCP sockets queue tail

After testing our stack with large SNEP messages, we realized the fragments
were arriving in reversed order.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Export nfc.h to userland
Samuel Ortiz [Thu, 10 May 2012 17:45:51 +0000 (19:45 +0200)]
NFC: Export nfc.h to userland

The netlink commands and attributes, along with the socket structure
definitions need to be exported.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix network header location when adding encryption headers
Arik Nemtsov [Thu, 10 May 2012 10:21:09 +0000 (13:21 +0300)]
mac80211: fix network header location when adding encryption headers

Update the location of the network header when adding encryption
specific headers to a skb. This allows low-level drivers to use the
(now correct) location of the network header.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: (selectively) add HT details in radiotap
Johannes Berg [Thu, 10 May 2012 07:09:10 +0000 (09:09 +0200)]
mac80211: (selectively) add HT details in radiotap

Add a flag for the HT format (mixed vs. greenfield)
to allow drivers to report that on receive. Not all
drivers will do that though, so allow drivers to set
which radiotap MCS details they report.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add RT539b chipset support
Zero.Lin [Thu, 10 May 2012 02:06:31 +0000 (10:06 +0800)]
rt2x00:Add RT539b chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add PCI IDs 0x4322 and 43222
Hauke Mehrtens [Wed, 9 May 2012 22:22:46 +0000 (00:22 +0200)]
ssb: add PCI IDs 0x4322 and 43222

The 0x4322 ID is found on the BCM4322 used on some SoCs like the
Linksys WRT610N V1 connected to a BCM4705. The 43222 (0xa8d6) ID
is found on the BCM43222 used on some other SoCs like the D-Link
DSL-2760U connected to a BCM63xx.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Add IV-room in the skb for TKIP and WEP
Janusz.Dziedzic@tieto.com [Wed, 9 May 2012 05:11:20 +0000 (08:11 +0300)]
mac80211: Add IV-room in the skb for TKIP and WEP

Add IV-room in skb also for TKIP and WEP.
Extend patch: "mac80211: support adding IV-room in the skb for CCMP keys"

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: delete IEs when stop_ap
Avinash Patil [Wed, 9 May 2012 01:30:30 +0000 (18:30 -0700)]
mwifiex: delete IEs when stop_ap

Delete custom IEs set by start_ap cfg80211 handler when stop_ap
handler is called for AP interface.
IE index required for deletion is stored in mwifiex_private
structure.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: retrieve IEs from cfg80211_beacon_data and send to firmware
Avinash Patil [Wed, 9 May 2012 01:30:29 +0000 (18:30 -0700)]
mwifiex: retrieve IEs from cfg80211_beacon_data and send to firmware

This patch adds logic for setting tail beacon IE, probe response IE
and assoc response IE from cfg80211_ap_settings parameter of
start_ap handler into FW.

RSN IE is also retrieved from tail IE buffer and sent to firmware.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: add custom IE framework
Avinash Patil [Wed, 9 May 2012 01:30:28 +0000 (18:30 -0700)]
mwifiex: add custom IE framework

1. support for setting custom IE from application hostapd etc.
Custom IE addition using auto-indexing and Custom IE deletion using
static indices (which are allocated during IE addition and stored in
driver) are supported.
2. Separate file for handling IE related execution.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: rearrange AP sys configure code
Avinash Patil [Wed, 9 May 2012 01:30:27 +0000 (18:30 -0700)]
mwifiex: rearrange AP sys configure code

This patch takes into account AP config_type
(bss config/custom ie config) while preparing AP
sys_configure command buffer.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: add WPA2 support for AP
Avinash Patil [Wed, 9 May 2012 01:30:26 +0000 (18:30 -0700)]
mwifiex: add WPA2 support for AP

1. Support for parsing security related parameters from
   cfg80211_ap_settings in start_ap cfg80211 handler
2. Conversion of these security information into FW understandle TLVs
   and setting into FW thru sys_config command
3. key management is done on host. This ensures that FW forwards EAPOL
   key packets to host instead of processing on its own.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: add AP event handling framework
Avinash Patil [Wed, 9 May 2012 01:30:25 +0000 (18:30 -0700)]
mwifiex: add AP event handling framework

Added logic to handle AP event that are generated
by the firmware. As MLME/SME is implemented in the
firmware, events such as station association and
deauthentication, must be sent to userspace (hostapd)
for creating and deleting station database.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh 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>
12 years agomwifiex: add cfg80211 start_ap and stop_ap handlers
Avinash Patil [Wed, 9 May 2012 01:30:24 +0000 (18:30 -0700)]
mwifiex: add cfg80211 start_ap and stop_ap handlers

1. add start AP and stop AP handlers
2. support for parsing ssid, beacon period, DTIM period
from beacon_parameters structure and setting it to FW.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface
Avinash Patil [Wed, 9 May 2012 01:30:23 +0000 (18:30 -0700)]
mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface

Add support for setting fragmentation threshold, RTS threshold
and retry limit.
Since wiphy parameters are properties of physical device,
appropriate function to set phy parameters is invoked depending
upon bss_type(STA or AP) for each virtual interface.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: handle interface type changes correctly
Avinash Patil [Wed, 9 May 2012 01:30:22 +0000 (18:30 -0700)]
mwifiex: handle interface type changes correctly

mlan0: managed or ibss
The iftype can be changed from STATION to ADHOC, and vice versa.

uap0: AP only
The iftype cannot be changed.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: stop BSS in deauthentication handling
Avinash Patil [Wed, 9 May 2012 01:30:21 +0000 (18:30 -0700)]
mwifiex: stop BSS in deauthentication handling

While in AP mode, we should stop BSS in deauthentication handler.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add AP command sys_config and set channel
Avinash Patil [Wed, 9 May 2012 01:30:20 +0000 (18:30 -0700)]
mwifiex: add AP command sys_config and set channel

1. support for AP sys_config command and added parsing of channel
information.
2. support for setting AP channel from cfg80211 set_channel handler

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add bss start and bss stop commands for AP
Avinash Patil [Wed, 9 May 2012 01:30:19 +0000 (18:30 -0700)]
mwifiex: add bss start and bss stop commands for AP

1. separate file for preparing uAP command buffer
2. definition of bss_start and bss_stop commands being sent to
firmware

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: append peer mac address TLV in key material command to firmware
Avinash Patil [Wed, 9 May 2012 01:30:18 +0000 (18:30 -0700)]
mwifiex: append peer mac address TLV in key material command to firmware

Modify key related cfg80211 handlers to copy peer mac address for
pairwise keys. If peer mac address is not present or group keys,
it will be sent as broadcast mac address.
This would be required since hostapd downloads per peer PTK.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: save adapter pointer in wiphy_priv
Avinash Patil [Wed, 9 May 2012 01:30:17 +0000 (18:30 -0700)]
mwifiex: save adapter pointer in wiphy_priv

Since wiphy structure is per adapter we would save adapter,
instead of mwifiex private pointer, in wiphy_priv.
Also move country_info from mwifiex_private to mwifiex_adapter
as making it part of mwifiex_adapter looks logical.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: multi-interface support for mwifiex
Avinash Patil [Wed, 9 May 2012 01:30:16 +0000 (18:30 -0700)]
mwifiex: multi-interface support for mwifiex

mwifiex supports STA and AP interfaces which use same phy.
Indicate this to cfg80211.

Signed-off-by: Avinash Patil <patila@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>
12 years agomwifiex: support for creation of AP interface
Avinash Patil [Wed, 9 May 2012 01:30:15 +0000 (18:30 -0700)]
mwifiex: support for creation of AP interface

1. wiphy structure is per device; hence moved it to mwifiex_adapter
mwifiex_register_cfg80211 takes mwifiex_adapter as parameter.
This function only registers wiphy with cfg80211.
2. Creation of interfaces is moved to cfg80211 add_virtual_interface
handler.
3. Create 2 interfaces by default: station and AP

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: handle station specific commands on STA interface only
Avinash Patil [Wed, 9 May 2012 01:30:14 +0000 (18:30 -0700)]
mwifiex: handle station specific commands on STA interface only

Commands like IBSS coalescing status, power save, 11D should be
handled only when bss_type is STA.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: allocate space for one more mwifiex_private structure
Avinash Patil [Wed, 9 May 2012 01:30:13 +0000 (18:30 -0700)]
mwifiex: allocate space for one more mwifiex_private structure

Reserve space for one more priv structure.
This will be used by AP interface.

Signed-off-by: Avinash Patil <patila@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: John W. Linville <linville@tuxdriver.com>
12 years agob43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie
Bjorn Helgaas [Tue, 8 May 2012 23:27:32 +0000 (17:27 -0600)]
b43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie

Use pci_is_pcie() instead of looking at obsolete is_pcie field in
struct pci_dev.

CC: Stefano Brivio <stefano.brivio@polimi.it>
CC: b43-dev@lists.infradead.org
CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: add warning when calculating MCS rates >= 32
Johannes Berg [Tue, 8 May 2012 19:36:20 +0000 (21:36 +0200)]
cfg80211: add warning when calculating MCS rates >= 32

cfg80211_calculate_bitrate() doesn't work for MCS
rates 32 or higher, and it has always returned 0
in that case. Warn if it ever really happens.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: remove double prototype
Johannes Berg [Tue, 8 May 2012 19:23:54 +0000 (21:23 +0200)]
cfg80211: remove double prototype

cfg80211_calculate_bitrate() is defined in the external
header file cfg80211.h now, so no need to keep it in
the internal one as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNet: wireless: core.c: fixed checkpatch warnings
Cristian Chilipirea [Tue, 8 May 2012 09:38:53 +0000 (12:38 +0300)]
Net: wireless: core.c: fixed checkpatch warnings

Fixed some checkpatch warnings.

Signed-off-by: Cristian Chilipirea <cristian.chilipirea@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix TX aggregation session timer
Johannes Berg [Mon, 7 May 2012 15:57:36 +0000 (17:57 +0200)]
mac80211: fix TX aggregation session timer

In commit 12d3952fc4a1cd96234bc7023bf7eefeb0bb6355
("mac80211: optimize aggregation session timeout handling")
two bugs were introduced:
 1) RCU usage was completely broken since no locks are held
 2) the timer must not rearm when agg session is stopping

Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix single queue drivers
Johannes Berg [Mon, 7 May 2012 15:45:29 +0000 (17:45 +0200)]
mac80211: fix single queue drivers

My queue management rework broke drivers that don't
have multiple AC queues and register a single queue
only, causing a warning:

WARNING: at net/mac80211/iface.c:162 ieee80211_check_queues

This was due to filling the queues wrongly and then
noticing the error when checking later.

Reported-and-Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Add flush for BCMA_RESET_CTL write
Nathan Hintz [Sat, 5 May 2012 04:56:36 +0000 (21:56 -0700)]
bcma: Add flush for BCMA_RESET_CTL write

Adds a missing read to flush the previous write (per the Broadcom SDK).

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Add __devexit to bcma_host_pci_remove
Nathan Hintz [Sat, 5 May 2012 04:56:35 +0000 (21:56 -0700)]
bcma: Add __devexit to bcma_host_pci_remove

Add missing __devexit attribute to bcma_host_pci_remove.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: reads/writes are always 4 bytes, so always map 4 bytes
Nathan Hintz [Sat, 5 May 2012 04:56:34 +0000 (21:56 -0700)]
bcma: reads/writes are always 4 bytes, so always map 4 bytes

Modify ioremap_nocache calls to reflect the number of bytes read/written.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Account for variable PCI memory base/size
Nathan Hintz [Sat, 5 May 2012 04:56:33 +0000 (21:56 -0700)]
bcma: Account for variable PCI memory base/size

PCI Memory Resource start address and size are variable, dependent on
the H/W configuration.  Modify the computation of io_map_base to use the
computed values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Move initialization of SPROM to prevent overwrite
Nathan Hintz [Sat, 5 May 2012 04:56:32 +0000 (21:56 -0700)]
bcma: Move initialization of SPROM to prevent overwrite

The first thing bcm47xx_fill_sprom does is initialize (zero fill) the SPROM.  For
BCMA SOC, this wipes out any values previously read by bcm47xx_fill_sprom_ethernet
(see arch/mips/bcm47xx/setup.c - bcm47xx_get_sprom_bcma).  Move the initialization
of SPROM so it is called prior to filling in any values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Find names of non BCM cores
Nathan Hintz [Sat, 5 May 2012 04:56:31 +0000 (21:56 -0700)]
bcma: Find names of non BCM cores

bcma_device_name only provides names for Broadcom cores.  Modify logic to
provide names for MIPS and ARM cores as well.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: handle non pci in ai_deviceremoved()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:43 +0000 (02:50 +0200)]
brcmsmac: handle non pci in ai_deviceremoved()

This is based on code from the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: read PCI vendor and device id only for PCI devices
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:42 +0000 (02:50 +0200)]
brcmsmac: read PCI vendor and device id only for PCI devices

If brcmsmac is used on non PCI(s) devices it should not try to access
bus->host_pci.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: do not access host_pci
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:41 +0000 (02:50 +0200)]
brcmsmac: do not access host_pci

The irq number is copied from the PCIe host device to the bcma cores so
just request it using the bcma core device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove nicpci.c
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:40 +0000 (02:50 +0200)]
brcmsmac: remove nicpci.c

There is no code doing anything useful in nicpci.c anymore, so remove
it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_fixcfg()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:39 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_fixcfg()

This is now done in bcma by bcma_core_pci_fixcfg().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcie_extendL1timer()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:38 +0000 (02:50 +0200)]
brcmsmac: remove pcie_extendL1timer()

This is now done by calling bcma_core_pci_extend_L1time()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_find_pci_capability()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:37 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_find_pci_capability()

This function is now unreferenced

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_attach()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:36 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_attach()

This is already done by bcma in bcma_pcicore_serdes_workaround().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove _ai_clkctl_cc()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:35 +0000 (02:50 +0200)]
brcmsmac: remove _ai_clkctl_cc()

This is now done by calling bcma_core_set_clockmode()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_gpiocontrol()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:34 +0000 (02:50 +0200)]
brcmsmac: remove ai_gpiocontrol()

This is now done by calling bcma_chipco_gpio_control().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_chipcontrl_epa4331
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:33 +0000 (02:50 +0200)]
brcmsmac: remove ai_chipcontrl_epa4331

ai_chipcontrl_epa4331 is not referenced by any method in brcmsmac and
the functionality is already in bcma_chipco_bcm4331_ext_pa_lines_ctl in
drivers/bcma/driver_chipcommon_pmu.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_pci_setup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:32 +0000 (02:50 +0200)]
brcmsmac: remove ai_pci_setup()

This is now done by calling bcma_core_pci_irq_ctl()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_hwup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:31 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_hwup()

This is now done by bcma_core_pci_config_fixup() in drivers/bcma/driver_pci.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove PCIe functions needed for PCIe core rev <= 10
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:30 +0000 (02:50 +0200)]
brcmsmac: remove PCIe functions needed for PCIe core rev <= 10

The devices I know of are not using a PCIe core with rev <= 10. The
BCM4718 uses a PCIe core with revision 14 and the BCM43224 uses a PCIe
core with revision 15. This patch removes support for old PCIe core
versions, which are not found on devices supported by brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove references to PCI
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:29 +0000 (02:50 +0200)]
brcmsmac: remove references to PCI

There are no devices which are using bcma and have a PCI bus, just a
PCIe bus or something else. bcma does not support PCI devices, so lets
also remove PCI support from brcmsmac. All devices currently supported
by brcmsmac are PCIe based.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove support for cc rev < 20
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:28 +0000 (02:50 +0200)]
brcmsmac: remove support for cc rev < 20

The lowest chip common version used on bcma based devices is 31 on the
bcm4718 and 32 on the bcm4313, bcm43224, and bcm43225, so the support
for the old versions could be removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: get board and chip info from bcma
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:27 +0000 (02:50 +0200)]
brcmsmac: get board and chip info from bcma

bcma now provide this data and brcmsmac should get it from there and
not parse it by its self.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove brcmsmac own sprom parsing
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:26 +0000 (02:50 +0200)]
brcmsmac: remove brcmsmac own sprom parsing

brcmsmac now takes the sprom from bcma and do not uses its own sprom
parsing any more. Remove this code as it is not used any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: use sprom from bcma
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:25 +0000 (02:50 +0200)]
brcmsmac: use sprom from bcma

bcma now provides all sprom attributes needed by brcmsmac and also
parses them from the pci sprom ant otp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_config_fixup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:52 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_config_fixup()

This code is based on code from pcie_misc_config_fixup() in brcmsmac.
This patch is part of the move of pci specific code from brcmsmac to
bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_fixcfg()
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:51 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_fixcfg()

This code is based on code from pcicore_fixcfg() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_extend_L1timer
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:50 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_extend_L1timer

This code is based on code from pcie_extendL1timer() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: implement setting core clock mode to dynamic
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:49 +0000 (02:18 +0200)]
bcma: implement setting core clock mode to dynamic

This patch is based on code from _ai_clkctl_cc() in brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma/ssb: parse new attributes from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:13 +0000 (02:04 +0200)]
bcma/ssb: parse new attributes from sprom

These newly added attributes are used by brcmsmac. Now bcma should
parse all attributes used by brcmsmac out of the sprom.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: read out some additional sprom attributes
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:12 +0000 (02:04 +0200)]
bcma: read out some additional sprom attributes

This code is copied from the ssb sprom read code. These attributes are
partly used by b43 and brcmsmac and should also be read out on bcma
based devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: fill board_rev attribute from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:11 +0000 (02:04 +0200)]
ssb: fill board_rev attribute from sprom

This attribute is now used in b43 driver and should be filled for all
sprom versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb/bcma: fill attribute alpha2 from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:10 +0000 (02:04 +0200)]
ssb/bcma: fill attribute alpha2 from sprom

The attribute country_code and alpha2 are two different attributes in
the sprom. country_code contains some code in an 8 bit coding and
alpha2 contains two chars with the country code. The attributes where
read out wrongly in the past and country_code is only available on
sprom version 1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: bcm47xx: read baordrev without prefix from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:09 +0000 (02:04 +0200)]
MIPS: bcm47xx: read baordrev without prefix from sprom

When the boardrev with a prefix is not available, try to read it
without a prefix. This is based on code from the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add boardinfo struct
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:08 +0000 (02:04 +0200)]
bcma: add boardinfo struct

This struct contains information about the board, the chip is running
on. The struct is filled for PCIe devices and SoCs. This information is
used by b43 and will be used by brcmsmac soon.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: bcm47xx: refactor fetching board data
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:07 +0000 (02:04 +0200)]
MIPS: bcm47xx: refactor fetching board data

Now the fetching of board data also uses nvram_read_u16 and not
simple_strtoul any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: remove rev from boardinfo
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:06 +0000 (02:04 +0200)]
ssb: remove rev from boardinfo

Previously the rev contained the revision read from the pci config
space and was used as board_rev in the wireless drivers. This is wrong
the board_rev is only fetched from the sprom accordingly to the open
source part of the Broadcom SDK and brcmsmac. This patch removes the
rev from the boardinfo structure and uses the board_rev attribute from
sprom instead. This attribute is filled by PCI, PCMCIA, SDIO and SoC
code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Wed, 16 May 2012 14:57:32 +0000 (10:57 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agowlcore/wl12xx: implement better beacon loss handling
Bartosz.Markowski@tieto.com [Thu, 26 Apr 2012 07:35:07 +0000 (10:35 +0300)]
wlcore/wl12xx: implement better beacon loss handling

Make use of REGAINED_BSS_EVENT and instead of reporting connection
loss immediately on each BEACON_LOSE event, try if not regained
in reasonable period of time.

Signed-off-by: bartosz.markowski <bartosz.markowski@tieto.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: fix size of two memset's in wl1271_cmd_build_arp_rsp()
Jesper Juhl [Thu, 3 May 2012 07:25:51 +0000 (10:25 +0300)]
wlcore: fix size of two memset's in wl1271_cmd_build_arp_rsp()

We currently do this:

int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)
...
      struct wl12xx_arp_rsp_template *tmpl;
      struct ieee80211_hdr_3addr *hdr;
...
      tmpl = (struct wl12xx_arp_rsp_template *)skb_put(skb, sizeof(*tmpl));
      memset(tmpl, 0, sizeof(tmpl));
...
      hdr = (struct ieee80211_hdr_3addr *)skb_push(skb, sizeof(*hdr));
      memset(hdr, 0, sizeof(hdr));
...

I believe we want to set the entire structures to 0 with those
memset() calls, not just zero the initial part of them (size of the
pointer bytes).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowireless: TI wlxxx depends on MAC80211
Randy Dunlap [Mon, 16 Apr 2012 19:51:39 +0000 (12:51 -0700)]
wireless: TI wlxxx depends on MAC80211

wl12xx build fails with many undefined symbol errors when MAC80211
and CFG80211 are not enabled, so make WLCORE and WL12XX depend
on MAC80211 (which already depends on CFG80211).

Here are a few of the many build errors:

drivers/built-in.o: In function `wl1271_register_hw':
main.c:(.text+0x4197cd): undefined reference to `ieee80211_register_hw'
drivers/built-in.o: In function `wl1271_rx_streaming_timer':
main.c:(.text+0x419818): undefined reference to `ieee80211_queue_work'
drivers/built-in.o: In function `wl1271_flush_deferred_work':
main.c:(.text+0x419910): undefined reference to `ieee80211_rx'
main.c:(.text+0x419938): undefined reference to `ieee80211_tx_status'
drivers/built-in.o: In function `wl12xx_op_channel_switch':
main.c:(.text+0x419afc): undefined reference to `ieee80211_chswitch_done'
drivers/built-in.o: In function `wl1271_ssid_set':
drivers/built-in.o: In function `wl1271_event_process':
event.c:(.text+0x41fec4): undefined reference to `ieee80211_sched_scan_stopped'
event.c:(.text+0x41ff88): undefined reference to `ieee80211_cqm_rssi_notify'
event.c:(.text+0x42000d): undefined reference to `ieee80211_stop_rx_ba_session'
event.c:(.text+0x420048): undefined reference to `ieee80211_stop_rx_ba_session'
event.c:(.text+0x4200b8): undefined reference to `ieee80211_chswitch_done'
event.c:(.text+0x4201ae): undefined reference to `ieee80211_find_sta'
event.c:(.text+0x4201ba): undefined reference to `ieee80211_report_low_ack'
event.c:(.text+0x42021b): undefined reference to `ieee80211_connection_loss'
drivers/built-in.o: In function `wl1271_tx_complete_packet':
tx.c:(.text+0x4206a6): undefined reference to `ieee80211_get_hdrlen_from_skb'
drivers/built-in.o: In function `wl1271_tx_fill_hdr':
tx.c:(.text+0x4208ca): undefined reference to `ieee80211_hdrlen'
drivers/built-in.o: In function `wl1271_handle_tx_low_watermark':
(.text+0x420e25): undefined reference to `ieee80211_wake_queue'
drivers/built-in.o: In function `wl12xx_rearm_rx_streaming':
(.text+0x420ed9): undefined reference to `ieee80211_queue_work'
drivers/built-in.o: In function `wl1271_tx_work_locked':
(.text+0x421008): undefined reference to `ieee80211_free_txskb'
drivers/built-in.o: In function `wl1271_rx_status.clone.2':
rx.c:(.text+0x421593): undefined reference to `ieee80211_channel_to_frequency'
drivers/built-in.o: In function `wl1271_ps_filter_frames':
ps.c:(.text+0x421a41): undefined reference to `ieee80211_tx_status'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: fixup an allocation
Dan Carpenter [Tue, 17 Apr 2012 06:28:47 +0000 (09:28 +0300)]
wlcore: fixup an allocation

GFP_DMA isn't supposed to be used by itself.  This allocation is allowed
to sleep so it should be ORing it with GFP_KERNEL.
Also we should check for allocations errors.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: release lock on error in wl1271_op_suspend()
Dan Carpenter [Mon, 16 Apr 2012 10:57:02 +0000 (13:57 +0300)]
wlcore: release lock on error in wl1271_op_suspend()

We should release this lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: support wowlan wakeup patterns
Eyal Shapira [Wed, 14 Mar 2012 04:32:10 +0000 (06:32 +0200)]
wl12xx: support wowlan wakeup patterns

Use FW RX data filters to support cfg80211 wowlan wakeup patterns.
This enables to wake up the host from suspend following detection
of certain configurable patterns within an incoming packet.
Up to 5 patterns are supported. Once the host is resumed
any configured RX data filter is cleared.
A single pattern can match several bytes sequences with different
offsets within a packet.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: add RX filters driver state mgmt functions
Eyal Shapira [Wed, 14 Mar 2012 04:32:09 +0000 (06:32 +0200)]
wlcore: add RX filters driver state mgmt functions

More prep work to support wowlan wakeup patterns.
Added some wrappers that also keep the current filters state
updated in the driver.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: add RX filters ACX commands
Eyal Shapira [Wed, 14 Mar 2012 04:32:08 +0000 (06:32 +0200)]
wl12xx: add RX filters ACX commands

More prep work for wowlan patterns.
Added ACXs to set global RX filter behavior and
enable or disable a specific filter.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: add RX filters util functions
Eyal Shapira [Wed, 14 Mar 2012 04:32:07 +0000 (06:32 +0200)]
wlcore: add RX filters util functions

This is prep work for the support of wowlan patterns
using the FW data rx filters mechanism.
Added an rx filter struct and some util functions
required to manipulate it.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: use GFP_KERNEL together with GFP_DMA
Luciano Coelho [Thu, 3 May 2012 07:31:02 +0000 (10:31 +0300)]
wlcore: use GFP_KERNEL together with GFP_DMA

GFP_DMA should not be used by itself, it still needs GFP_KERNEL or
such.  Fix two occurrences of allocations with GFP_DMA only.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoNFC: HCI drivers don't have to keep track of polling state
Eric Lapuyade [Mon, 7 May 2012 10:31:31 +0000 (12:31 +0200)]
NFC: HCI drivers don't have to keep track of polling state

The NFC core code already does that for them.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agofeature-removal: Remove pn544 raw driver
Samuel Ortiz [Mon, 7 May 2012 10:31:30 +0000 (12:31 +0200)]
feature-removal: Remove pn544 raw driver

The pn544_hci driver uses the kernel NFC APIs while pn544 does not.
Moreover pn544 is outdated and not maintained.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: HCI based pn544 driver
Eric Lapuyade [Mon, 7 May 2012 10:31:29 +0000 (12:31 +0200)]
NFC: HCI based pn544 driver

This is an NFC driver for NXP pn544.
Unlike pn544.c, this one is based on the NFC HCI and SHDLC kernel layers.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: The NFC genl family structure should not be exposed globally
H Hartley Sweeten [Mon, 7 May 2012 10:31:28 +0000 (12:31 +0200)]
NFC: The NFC genl family structure should not be exposed globally

The variable 'nfc_genl_family' is only referenced in this file and
should be marked static to prevent it from being exposed globally.

Quites the sparse warning:

warning: symbol 'nfc_genl_family' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: HCI ops should not be exposed globally
H Hartley Sweeten [Mon, 7 May 2012 10:31:27 +0000 (12:31 +0200)]
NFC: HCI ops should not be exposed globally

The variable 'hci_nfc_ops' is only referenced in this file and
should be marked static to prevent it from being exposed globally.

Quites the sparse warning:

warning: symbol 'hci_nfc_ops' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Quiet nci/ntf.c sparse noise about plain integer as NULL pointer
H Hartley Sweeten [Mon, 7 May 2012 10:31:26 +0000 (12:31 +0200)]
NFC: Quiet nci/ntf.c sparse noise about plain integer as NULL pointer

Pointers should be cleared with NULL, not 0.

Quiets a couple sparse warnings of the type:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Include nci_core.h to nci/lib.c
H Hartley Sweeten [Mon, 7 May 2012 10:31:25 +0000 (12:31 +0200)]
NFC: Include nci_core.h to nci/lib.c

Include the header to pickup the exported symbol prototype.

Quites the sparse warning:

warning: symbol 'nci_to_errno' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
CC: Samuel Ortiz <sameo@linux.intel.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer
H Hartley Sweeten [Mon, 7 May 2012 10:31:24 +0000 (12:31 +0200)]
NFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer

Pointers should be cleared with NULL, not 0.

Quiets a couple sparse warnings of the type:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Fix LLCP compilation warning
joseph daniel [Mon, 7 May 2012 10:31:23 +0000 (12:31 +0200)]
NFC: Fix LLCP compilation warning

nfc_llcp_general_bytes is defined in nfc/core.c as:
nfc_llcp_general_bytes(struct nfc_dev *dev, size_t *gb_len).

as in nfc/nfc.h:
nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *gb_len), if CONFIG_NFC_LLCP
is not defined.

so we got some warnings,
net/nfc/core.c:207:2: warning: passing argument 2 of ‘nfc_llcp_general_bytes’ from incompatible pointer type [enabled by default]
net/nfc/nfc.h:87:19: note: expected ‘u8 *’ but argument is of type ‘size_t *’

Signed-off-by: joseph daniel <josephdanielwalter@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>