Arend van Spriel [Thu, 27 Sep 2012 12:17:56 +0000 (14:17 +0200)]
brcmfmac: remove brcmf_read_prof() function
The function brcmf_read_prof() provided access to fields
with brcmf_cfg80211_profile structure using a field id,
but the calling function can easily access that structure
directly. This patch removes the function.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 27 Sep 2012 12:17:55 +0000 (14:17 +0200)]
brcmfmac: rename structure brcmf_cfg80211_priv
Renamed structure to brcmf_cfg80211_info as it is not really a
private structure since it is exposed in header file.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 27 Sep 2012 12:17:54 +0000 (14:17 +0200)]
brcmfmac: add hostap supoort.
This patch adds support for host AP mode.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 27 Sep 2012 12:17:53 +0000 (14:17 +0200)]
brcmfmac: remove two obsolete structure definitions
The structures brcmf_cfg80211_dev and brcmf_cfg80211_iface are only
adding complexity and provide no additional value. These have been
removed in this patch.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 27 Sep 2012 12:17:52 +0000 (14:17 +0200)]
brcmfmac: use brcmf_cfg80211_priv to interface with wl_cfg80211 code
The low-level driver part interfaces with wl_cfg80211 part using
brcmf_cfg80211_dev structure as handle. As brcmf_cfg80211_priv
is defined in interface it is more efficient to use that as handle
in function calls.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 27 Sep 2012 12:17:51 +0000 (14:17 +0200)]
brcmfmac: get rid of extern keyword in wl_cfg80211.h
The function declarations in wl_cfg80211.h used the extern keyword
but it is redundant as that is implicit so they were removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 27 Sep 2012 12:17:50 +0000 (14:17 +0200)]
brcmfmac: notify common driver about usb tx completion.
brcmf_usb_tx_complete now calls brcmf_txcomplete to correct
eapol counter.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 27 Sep 2012 12:17:49 +0000 (14:17 +0200)]
brcmfmac: use define instead of hardcoded values.
brcmf_parse_tlvs was using hardcoded values.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 27 Sep 2012 12:17:48 +0000 (14:17 +0200)]
brcmfmac: use different fw api for encryption,auth. config
This patch changes the commands being used to configure
encryption and authentication. These new methods are needed
for when p2p and hostap support are added.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 27 Sep 2012 12:17:47 +0000 (14:17 +0200)]
brcmfmac: use wait_event_timeout for fw control packets over usb.
firmware control packets over usb are async acked. This is
awaited for by using interruptible wait. This can be
interrupted by signal which results in undesirable behavior.
Instead wait_event_timeout is used.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 26 Sep 2012 17:32:02 +0000 (12:32 -0500)]
b43legacy: Fix crash on unload when firmware not available
When b43legacy is loaded without the firmware being available, a following
unload generates a kernel NULL pointer dereference BUG as follows:
[ 214.330789] BUG: unable to handle kernel NULL pointer dereference at
0000004c
[ 214.330997] IP: [<
c104c395>] drain_workqueue+0x15/0x170
[ 214.331179] *pde =
00000000
[ 214.331311] Oops: 0000 [#1] SMP
[ 214.331471] Modules linked in: b43legacy(-) ssb pcmcia mac80211 cfg80211 af_packet mperf arc4 ppdev sr_mod cdrom sg shpchp yenta_socket pcmcia_rsrc pci_hotplug pcmcia_core battery parport_pc parport floppy container ac button edd autofs4 ohci_hcd ehci_hcd usbcore usb_common thermal processor scsi_dh_rdac scsi_dh_hp_sw scsi_dh_emc scsi_dh_alua scsi_dh fan thermal_sys hwmon ata_generic pata_ali libata [last unloaded: cfg80211]
[ 214.333421] Pid: 3639, comm: modprobe Not tainted 3.6.0-rc6-wl+ #163 Source Technology VIC 9921/ALI Based Notebook
[ 214.333580] EIP: 0060:[<
c104c395>] EFLAGS:
00010246 CPU: 0
[ 214.333687] EIP is at drain_workqueue+0x15/0x170
[ 214.333788] EAX:
c162ac40 EBX:
cdfb8360 ECX:
0000002a EDX:
00002a2a
[ 214.333890] ESI:
00000000 EDI:
00000000 EBP:
cd767e7c ESP:
cd767e5c
[ 214.333957] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 214.333957] CR0:
8005003b CR2:
0000004c CR3:
0c96a000 CR4:
00000090
[ 214.333957] DR0:
00000000 DR1:
00000000 DR2:
00000000 DR3:
00000000
[ 214.333957] DR6:
ffff0ff0 DR7:
00000400
[ 214.333957] Process modprobe (pid: 3639, ti=
cd766000 task=
cf802e90 task.ti=
cd766000)
[ 214.333957] Stack:
[ 214.333957]
00000292 cd767e74 c12c5e09 00000296 00000296 cdfb8360 cdfb9220 00000000
[ 214.333957]
cd767e90 c104c4fd cdfb8360 cdfb9220 cd682800 cd767ea4 d0c10184 cd682800
[ 214.333957]
cd767ea4 cba31064 cd767eb8 d0867908 cba31064 d087e09c cd96f034 cd767ec4
[ 214.333957] Call Trace:
[ 214.333957] [<
c12c5e09>] ? skb_dequeue+0x49/0x60
[ 214.333957] [<
c104c4fd>] destroy_workqueue+0xd/0x150
[ 214.333957] [<
d0c10184>] ieee80211_unregister_hw+0xc4/0x100 [mac80211]
[ 214.333957] [<
d0867908>] b43legacy_remove+0x78/0x80 [b43legacy]
[ 214.333957] [<
d083654d>] ssb_device_remove+0x1d/0x30 [ssb]
[ 214.333957] [<
c126f15a>] __device_release_driver+0x5a/0xb0
[ 214.333957] [<
c126fb07>] driver_detach+0x87/0x90
[ 214.333957] [<
c126ef4c>] bus_remove_driver+0x6c/0xe0
[ 214.333957] [<
c1270120>] driver_unregister+0x40/0x70
[ 214.333957] [<
d083686b>] ssb_driver_unregister+0xb/0x10 [ssb]
[ 214.333957] [<
d087c488>] b43legacy_exit+0xd/0xf [b43legacy]
[ 214.333957] [<
c1089dde>] sys_delete_module+0x14e/0x2b0
[ 214.333957] [<
c110a4a7>] ? vfs_write+0xf7/0x150
[ 214.333957] [<
c1240050>] ? tty_write_lock+0x50/0x50
[ 214.333957] [<
c110a6f8>] ? sys_write+0x38/0x70
[ 214.333957] [<
c1397c55>] syscall_call+0x7/0xb
[ 214.333957] Code: bc 27 00 00 00 00 a1 74 61 56 c1 55 89 e5 e8 a3 fc ff ff 5d c3 90 55 89 e5 57 56 89 c6 53 b8 40 ac 62 c1 83 ec 14 e8 bb b7 34 00 <8b> 46 4c 8d 50 01 85 c0 89 56 4c 75 03 83 0e 40 80 05 40 ac 62
[ 214.333957] EIP: [<
c104c395>] drain_workqueue+0x15/0x170 SS:ESP 0068:
cd767e5c
[ 214.333957] CR2:
000000000000004c
[ 214.341110] ---[ end trace
c7e90ec026d875a6 ]---Index: wireless-testing/drivers/net/wireless/b43legacy/main.c
The problem is fixed by making certain that the ucode pointer is not NULL
before deregistering the driver in mac80211.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [v 3.3.0+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bala Shanmugam [Wed, 26 Sep 2012 11:34:26 +0000 (17:04 +0530)]
ath9k: Enable MCI for AR9565
Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Wed, 26 Sep 2012 07:21:48 +0000 (10:21 +0300)]
brcmfmac: use kcalloc() to prevent integer overflow
The multiplication here looks like it could overflow. I've changed it
to use kcalloc() to prevent that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 26 Sep 2012 06:52:08 +0000 (12:22 +0530)]
ath9k: Fix chainmask selection for AR9462
Force chain 1 to be used for CCK rates since the target power
table stored in EEPROM is too high to transmit with both chains.
This is needed to avoid regulatory violation.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kevin Gan [Wed, 26 Sep 2012 03:23:45 +0000 (20:23 -0700)]
mwifiex: add inactivity deauth support for ap
The firmware has support for this feature, so we offload it to
firmware. In start_ap, driver passes the inactivity timeout
value to firmware via TLVs and firmware will report STA_DEAUTH
event to driver when inactivity timer is fired.
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stone Piao [Wed, 26 Sep 2012 03:23:44 +0000 (20:23 -0700)]
mwifiex: set txpd when send a mgmt frame for AP and GO mode
Set packet type and packet offset in txpd when send a mgmt frame
in AP and GO mode.
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kevin Gan <ganhy@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>
Stone Piao [Wed, 26 Sep 2012 03:23:43 +0000 (20:23 -0700)]
mwifiex: parse P2P IEs from beacon_data
Parse P2P IEs and set them to FW with related masks.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:42 +0000 (20:23 -0700)]
mwifiex: add support for P2P GO in interface type change
When cfg80211 calls to change interface type for P2P GO, send
P2P mode config commands to firmware and set bss role and bss
mode accordingly.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:41 +0000 (20:23 -0700)]
mwifiex: add support for P2P client in interface type change
When cfg80211 calls to change interface type for P2P client,
send P2P mode config commands to firmware.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:40 +0000 (20:23 -0700)]
mwifiex: add P2P interface
Due to firmware design, driver needs to add a default P2P interface
to implement find phase and action frame handshake.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:39 +0000 (20:23 -0700)]
mwifiex: send firmware initialization commands synchronously
The driver will send some commands to firmware during the
initialization. Currently these commands are sent asynchronously,
which means that we firstly insert all of them to a pre-allocated
command queue, and then start to process them one by one. The
command queue will soon be exhausted if we keep adding new
initialization commands.
This issue can be resolved by sending initialization commands
synchronously because each command is consumed and the buffer is
recycled before queuing next command.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:38 +0000 (20:23 -0700)]
mwifiex: append each IE into a seperate IE buffer
When scan is triggered from cfg80211, the request contains some IEs
and we should parse all the IEs and append each IE into a seperate
IE buffer.
Signed-off-by: Stone Piao <piaoyun@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>
Stone Piao [Wed, 26 Sep 2012 03:23:37 +0000 (20:23 -0700)]
mwifiex: process remain on channel expired event
Process remain on channel expired event, and notify cfg80211.
Signed-off-by: Stone Piao <piaoyun@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>
Stone Piao [Wed, 26 Sep 2012 03:23:36 +0000 (20:23 -0700)]
mwifiex: implement remain_on_channel and cancel_remain_on_channel
Add a new command to implement remain_on_channel and
cancel_remain_on_channel.
Signed-off-by: Stone Piao <piaoyun@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>
Stone Piao [Wed, 26 Sep 2012 03:23:35 +0000 (20:23 -0700)]
mwifiex: report received management frames to cfg80211
Process the management frames received from firmware and report
them to cfg80211.
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stone Piao [Wed, 26 Sep 2012 03:23:34 +0000 (20:23 -0700)]
mwifiex: implement cfg80211 mgmt_frame_register handler
Add a new command to implement mgmt_frame_register.
Signed-off-by: Stone Piao <piaoyun@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>
Stone Piao [Wed, 26 Sep 2012 03:23:33 +0000 (20:23 -0700)]
mwifiex: advertise mgmt_stype to cfg80211
Advertise supported management frame types to cfg80211.
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>
Stone Piao [Wed, 26 Sep 2012 03:23:32 +0000 (20:23 -0700)]
mwifiex: implement cfg80211 mgmt_tx handler
Implement mgmt_tx in cfg80211 ops through data path.
Advertise probe resp offload and skip to send probe resp in AP
or GO mode.
Signed-off-by: Stone Piao <piaoyun@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>
Stone Piao [Wed, 26 Sep 2012 03:23:31 +0000 (20:23 -0700)]
mwifiex: fix coding style issue
Remove unnecessary blank lines and extra tab.
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>
Sujith Manoharan [Wed, 26 Sep 2012 02:25:18 +0000 (07:55 +0530)]
ath9k: Add a debugfs file to adjust antenna diversity
Location: /<debugfs>/ieee80211/phy#/ath9k/diversity
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 26 Sep 2012 02:24:43 +0000 (07:54 +0530)]
ath9k: Handle errors properly in MCI initialization
The MCI initialization path has various points of failures,
handle these to ensure that we bail out correctly in such
cases.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Wagner [Tue, 25 Sep 2012 16:02:55 +0000 (21:32 +0530)]
ath9k: Fix rx filtering issue for older chips
We need to have the promiscuous mode enabled for older
chipsets so that the olderchips hardware does not
filters out some valid/necessary frames that need
to be sent to mac80211. Fix this by enabling promiscus
mode for all the chipsets whose macversion <= AR9160
chipsets. This should fix
https://bugzilla.kernel.org/show_bug.cgi?id=45591
shafi: made the fix generic by having the frame filtering
disabled for chipsets older than AR9280.
Cc: Javier Cardona <javier@cozybit.com>
Signed-off-by: Thomas Wagner <Thomas.Wagner@hs-rm.de>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 25 Sep 2012 08:17:22 +0000 (10:17 +0200)]
bcma: change delays to follow timers-howto guide
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 28 Sep 2012 17:49:21 +0000 (13:49 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx
John W. Linville [Fri, 28 Sep 2012 14:55:00 +0000 (10:55 -0400)]
Merge tag 'nfc-next-3.7-2' of git://git./linux/kernel/git/sameo/nfc-3.0
So says Samuel Ortiz <sameo@linux.intel.com>:
The 2nd NFC pull request for 3.7.
- A couple of wrong context sleep fixes.
- An LLCP rwlock intizialisation fix.
- A missing mutex unlocking for pn533.
- LLCP raw sockets support. This is going to be used for NFC sniffing.
- A build fix for llc_shdlc. It fixes a build error triggered by code that's
living in wireless-next.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Mon, 3 Sep 2012 15:27:58 +0000 (18:27 +0300)]
wlcore: protect wlcore_op_set_key with mutex
wlcore_op_set_key() calls wl18xx_set_key(),
which in turn executes some of his function
calls without acquiring wl->mutex and making
sure the fw is awake.
Adding mutex_lock()/ps_elp_wakeup() calls is
not enough, as wl18xx_set_key() calls
wl1271_tx_flush() which can't be called while
the mutex is taken.
Add the required calls to wlcore_op_set_key,
but limit the queues_stop and flushing
to the only encryption types in which
a spare block might be needed (GEM and TKIP).
[Arik - move state != ON check]
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Sun, 2 Sep 2012 10:30:04 +0000 (13:30 +0300)]
wlcore: decrease elp timeout
The current elp timeout (the same as the dynamic
ps timeout - 1500ms) is too high. Usually,
wl1271_ps_elp_sleep() get called right after tx/rx,
which is fine, but some command might get sent
even when there is no traffic (e.g. ht changes
triggered by beacon frames), and leaving the
device awake for 1500ms in this case is redundant.
Use a timeout of 30ms.
The fw won't enter elp anyway before the dynamic-ps
timeout was expired as well (and it entered ps
successfully).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Sat, 1 Sep 2012 22:32:47 +0000 (01:32 +0300)]
wlcore: Load the NVS file asynchronously
The NVS file is loaded by the device's probe callback with the help of
request_firmware(). Since request_firmware() relies on udevd, the
modules cannot be loaded before hotplug events are handled.
Fix this by loading the NVS file asynchronously and continue
initialization only after the firmware request is over.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Sun, 2 Sep 2012 09:29:27 +0000 (12:29 +0300)]
wlcore: Refactor probe
Move most of the device-specific probe functionality into setup(), a new
op. By doing this, wlcore_probe will be the first to request a firmware
from userspace, making it easier to load the NVS file asynchronously.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Tue, 21 Aug 2012 14:17:13 +0000 (17:17 +0300)]
wlcore: Allow memory access when the FW crashes
When the no_recovery flag is used, the recovery work will not restart
the FW and the state will not be set to 'on'. To enable post-mortem
analysis, allow memory access in the 'restarting' state.
Also, since the FW might not be operational, don't fail the read/write
operations if elp_wakeup fails.
Reported-by: Arkady Miasnikov <a-miasnikov@ti.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Thu, 16 Aug 2012 10:52:47 +0000 (13:52 +0300)]
wlcore: use dynamic keep-alive template ids
Currently, all the (station) roles use the same
keep-alive template id (0). However, the klv
template ids shouldn't be shared by different
roles.
Implement a simple klv_templates bitmap, and let
each role allocate its own klv template id on
role initialization.
[Arik - remove invalidation of KLV template when getting into "idle".
This is already handled in unjoin]
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Thu, 16 Aug 2012 10:32:32 +0000 (13:32 +0300)]
wlcore: invalidate keep-alive template on disconnection
Previously, invalidation of the keep-alive template was
done when going idle. However, while removing the
idle-handling we didn't move the keep-alive template
invalidation to another place.
This finally resulted in fw error when trying to use
the keep-alive template by another role.
(Note that we still have an error here - each role
should have its unique keep-alive template id, while
currently they all use CMD_TEMPL_KLV_IDX_NULL_DATA (0).
This only works now because we don't support concurrent
connected stations yet)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Wed, 15 Aug 2012 16:11:43 +0000 (19:11 +0300)]
wl18xx: default to siso40 in 2.4ghz with a single antenna
The driver used siso20 in this case for legacy reasons.
Reported-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Wed, 15 Aug 2012 15:29:04 +0000 (18:29 +0300)]
wlcore: Fix unbalanced interrupts enablement
The interrupt line is enabled by wl12xx_enable_interrupts and
wl18xx_enable_interrupts, but it will not be disabled in all failure
paths. Fix this.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Wed, 15 Aug 2012 12:09:30 +0000 (15:09 +0300)]
wlcore: Don't recover during boot
While recursive recovery is avoided during shutdown, a new recovery may
be queued when the FW boots. The recovery work will then try to stop an
already stopped hardware, which will most likely result in a kernel
panic.
Fix this by verifying that wl->state is on before queueing a new
recovery.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Yair Shapira [Tue, 7 Aug 2012 14:38:21 +0000 (17:38 +0300)]
wlcore/wl18xx: add phy_fw_version_str to debugfs driver_state
add phy_fw_version_str to debugfs driver_state file.
information is taken during boot and stored in wl->chip.phy_fw_ver_str.
Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Mon, 6 Aug 2012 08:21:39 +0000 (11:21 +0300)]
wlcore: spi: use private max-buf-size limit
Limit SPI transmissions to the wl12xx max buffer size, as only 12xx was
tested with SPI.
This allows us to remove the global aggregation buffer constant.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Yair Shapira [Sun, 5 Aug 2012 13:51:16 +0000 (16:51 +0300)]
wl18xx: number_of_assembled_ant5 indicates if A band is enabled
Use number_of_assembled_ant5 phy param to indicate if A band is enabled:
if number_of_assembled_ant5 != 0 then it is enabled otherwise it is
disabled.
This aligns with phy implementation that uses this param both to indicate
if band is active and the number of antennas.
This parameter replaces enable_11a module param that was removed.
User-Space applications can use wlconf and/or INI files to disable A band
using this parameter.
Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Thu, 2 Aug 2012 19:00:34 +0000 (22:00 +0300)]
wlcore: allow up to 3 running STA interfaces in combinations
This allows us to have a p2p-management interface (in STA mode),
as we as a group dedicated interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Thu, 26 Jul 2012 14:17:06 +0000 (17:17 +0300)]
wlcore: lazy-enable device roles
Enable device roles just before starting it.
This way, a single device role should be enough
for all vifs, as we can't use concurrent device
roles (which require ROC) anyway.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Thu, 26 Jul 2012 14:17:05 +0000 (17:17 +0300)]
wlcore: always use wlvif->role_id for scans
enabled (but not-started) sta role should be good enough
for scanning (both normal and scheduled), so use it
instead of the device_role.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Thu, 2 Aug 2012 12:27:51 +0000 (15:27 +0300)]
wlcore: make debug prints work without dynamic debug
Make debug prints operational when dynamic debug is not defined.
This allows better debugging in production environments.
Change the driver prefix to "wlcore" while were at it.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Thu, 2 Aug 2012 17:37:21 +0000 (20:37 +0300)]
wlcore/wl18xx/wl12xx: allow up to 3 mac addresses
Allow 3 native mac addresses on 18xx. On 12xx allow 2 native mac
addresses and set the LAA bit to create a third mac address. This
enabled operation with a separate group interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Wed, 1 Aug 2012 15:44:22 +0000 (18:44 +0300)]
wlcore: resume() only if sta is associated
mac80211's resume() callback might get called even if
the sta is not associated (but only up). The
resume sequence in this case results in configuring
the wake-up conditions of a non-started role, which
causes fw assertion.
Fix it by bailing out if the STA is not connected
(like we do on suspend()).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eyal Shapira [Thu, 2 Aug 2012 04:15:19 +0000 (07:15 +0300)]
wlcore: configure wowlan regardless of wakeup conditions
wowlan filters should be configured in any case in suspend/resume.
This shouldn't be dependent on whether wakeup conditions are the
same for suspend and resume states. Only the FW command to
reconfigure wakeup conditions should be avoided in such a case.
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Igal Chernobelsky [Sun, 29 Jul 2012 15:21:12 +0000 (18:21 +0300)]
wlcore/wl18xx/wl12xx: aggregation buffer size set
Aggregation buffer size is set separately per 18xx/12xx chip family.
For 18xx aggragation buffer is set to 13 pages to utilize all
the available tx/rx descriptors for aggregation.
[Arik - remove redundant parts from the patch]
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Igal Chernobelsky [Tue, 31 Jul 2012 11:48:46 +0000 (14:48 +0300)]
wl18xx/wl12xx: defines for Tx/Rx descriptors num
Use defines for number of Tx/Rx descriptors.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Sun, 29 Jul 2012 09:18:32 +0000 (12:18 +0300)]
wlcore: tx_flush - optimize flow and force Tx during the flush
Force Tx during the flush if there are packets pending in the driver.
This actually solves a bug where we would get called from the mac80211
wq context, which would prevent tx_work from getting queued, even when
the mutex is unlocked.
Don't stop the queues needlessly if there's nothing to flush. Use a
larger delay when sleeping to give the driver a chance to flush and
avoid cpu busy looping. Re-arrange the loop so the last iteration is
not wasted.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Mon, 23 Jul 2012 20:50:45 +0000 (23:50 +0300)]
wlcore: make Tx flush timings more verbose
Print how much time a flush took. This will help debug the time it takes
to switch between channels.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Mon, 23 Jul 2012 12:18:29 +0000 (15:18 +0300)]
wlcore: allow only the lowest OFDM rate for p2p setup frames
The IEEE80211_TX_CTL_NO_CCK_RATE flag is only set for mgmt packets
transmitted during p2p connection setup. Make sure to use the lowest
OFDM rate guarantee the peer always hears us.
Change the p2p rate policy to contain only the 6mpbs rate to acheive
this effect.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Arik Nemtsov [Mon, 23 Jul 2012 07:38:18 +0000 (10:38 +0300)]
wlcore: AP mode - send non-data packets with basic rates
This solves interoperability issues with peer that don't seem to "hear"
management packets transmitted in higher rates. Based on a previous
patch by Igal Chernobelsky.
Cc: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Sun, 29 Jul 2012 11:37:29 +0000 (14:37 +0300)]
wlcore: cancel recovery_work on stop() instead of remove_interface()
recovery_work should be cancelled when stopping the device,
not when removing an interface (this is probably a leftover
from the single-role days)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Reis [Mon, 25 Jun 2012 15:51:54 +0000 (18:51 +0300)]
wl18xx: increase rx_ba_win_size to 32
The new FWs support a bigger BA window.
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Yariv [Tue, 24 Jul 2012 16:18:49 +0000 (19:18 +0300)]
wlcore: Prevent interaction with HW after recovery is queued
When a function requests to recover, it would normally abort and will
not send any additional commands to the HW. However, other threads may
not be aware of the failure and could try to communicate with the HW
after a recovery was queued, but before the recovery work began.
Fix this by introducing an intermediate state which is set when recovery
is queued, and modify all state checks accordingly.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Eliad Peller [Wed, 25 Jul 2012 11:22:21 +0000 (14:22 +0300)]
wlcore: consider single fw case
When a single fw is being used for both single-role
and multi-role cases (e.g. 18xx), wl->mr_fw_name is
NULL, which results in NULL dereference while trying
to load the multi-role fw.
In this case, always use the single-role fw, and avoid
redundant fw switch by checking for this case in
wl12xx_need_fw_change() as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Ido Reis [Thu, 12 Jul 2012 21:12:08 +0000 (00:12 +0300)]
wl18xx: update default phy configuration for pg2
default switch configuration set to pg2 chips (rdl 1/2/3/4).
removed hacks for specific board types.
pg1.x boards are now supported only using module params
or specific conf files.
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Wei Yongjun [Sun, 26 Aug 2012 01:47:06 +0000 (09:47 +0800)]
wl12xx: remove duplicated include from main.c
Remove duplicated include.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Tim Gardner [Wed, 29 Aug 2012 19:09:33 +0000 (13:09 -0600)]
wlcore: Declare MODULE_FIRMWARE usage
Declare any firmware that might be used by this driver.
If all drivers declare their firmware usage, then a sufficiently
complete list of firmware files can then be used to pare down
the external linux-firmware package to just the files in actual use.
Cc: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Luciano Coelho [Thu, 27 Sep 2012 09:02:38 +0000 (12:02 +0300)]
wl12xx: use module_platform_driver
Use a module_platform_driver declaration instead of replicating the
init and exit functions in the driver.
Based on the patch for wl18xx by Devendra Naga.
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Szymon Janc [Wed, 26 Sep 2012 12:22:10 +0000 (14:22 +0200)]
NFC: Fix sleeping in atomic when releasing socket
nfc_llcp_socket_release is calling lock_sock/release_sock while holding
write lock for rwlock. Use bh_lock/unlock_sock instead.
BUG: sleeping function called from invalid context at net/core/sock.c:2138
in_atomic(): 1, irqs_disabled(): 0, pid: 56, name: kworker/1:1
4 locks held by kworker/1:1/56:
Pid: 56, comm: kworker/1:1 Not tainted 3.5.0-999-nfc+ #7
Call Trace:
[<
ffffffff810952c5>] __might_sleep+0x145/0x200
[<
ffffffff815d7686>] lock_sock_nested+0x36/0xa0
[<
ffffffff81731569>] ? _raw_write_lock+0x49/0x50
[<
ffffffffa04aa100>] ? nfc_llcp_socket_release+0x30/0x200 [nfc]
[<
ffffffffa04aa122>] nfc_llcp_socket_release+0x52/0x200 [nfc]
[<
ffffffffa04ab9f0>] nfc_llcp_mac_is_down+0x20/0x30 [nfc]
[<
ffffffffa04a6fea>] nfc_dep_link_down+0xaa/0xf0 [nfc]
[<
ffffffffa04a9bb5>] nfc_llcp_timeout_work+0x15/0x20 [nfc]
[<
ffffffff810825f7>] process_one_work+0x197/0x7c0
[<
ffffffff81082596>] ? process_one_work+0x136/0x7c0
[<
ffffffff8172fbc9>] ? __schedule+0x419/0x9c0
[<
ffffffffa04a9ba0>] ? nfc_llcp_build_gb+0x1b0/0x1b0 [nfc]
[<
ffffffff81083090>] worker_thread+0x190/0x4c0
[<
ffffffff81082f00>] ? rescuer_thread+0x2a0/0x2a0
[<
ffffffff81088d1e>] kthread+0xae/0xc0
[<
ffffffff810caafd>] ? trace_hardirqs_on+0xd/0x10
[<
ffffffff8173acc4>] kernel_thread_helper+0x4/0x10
[<
ffffffff81732174>] ? retint_restore_args+0x13/0x13
[<
ffffffff81088c70>] ? flush_kthread_worker+0x150/0x150
[<
ffffffff8173acc0>] ? gs_change+0x13/0x13
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Szymon Janc [Wed, 26 Sep 2012 12:17:12 +0000 (14:17 +0200)]
NFC: Fix sleeping in invalid context when netlink socket is closed
netlink_register_notifier requires notify functions to not sleep.
nfc_stop_poll locks device mutex and must not be called from notifier.
Create workqueue that will handle this for all devices.
BUG: sleeping function called from invalid context at kernel/mutex.c:269
in_atomic(): 0, irqs_disabled(): 0, pid: 4497, name: neard
1 lock held by neard/4497:
Pid: 4497, comm: neard Not tainted 3.5.0-999-nfc+ #5
Call Trace:
[<
ffffffff810952c5>] __might_sleep+0x145/0x200
[<
ffffffff81743dde>] mutex_lock_nested+0x2e/0x50
[<
ffffffff816ffd19>] nfc_stop_poll+0x39/0xb0
[<
ffffffff81700a17>] nfc_genl_rcv_nl_event+0x77/0xc0
[<
ffffffff8174aa8c>] notifier_call_chain+0x5c/0x120
[<
ffffffff8174abd6>] __atomic_notifier_call_chain+0x86/0x140
[<
ffffffff8174ab50>] ? notifier_call_chain+0x120/0x120
[<
ffffffff815e1347>] ? skb_dequeue+0x67/0x90
[<
ffffffff8174aca6>] atomic_notifier_call_chain+0x16/0x20
[<
ffffffff8162119a>] netlink_release+0x24a/0x280
[<
ffffffff815d7aa8>] sock_release+0x28/0xa0
[<
ffffffff815d7be7>] sock_close+0x17/0x30
[<
ffffffff811b2a7c>] __fput+0xcc/0x250
[<
ffffffff811b2c0e>] ____fput+0xe/0x10
[<
ffffffff81085009>] task_work_run+0x69/0x90
[<
ffffffff8101b951>] do_notify_resume+0x81/0xd0
[<
ffffffff8174ef22>] int_signal+0x12/0x17
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
John W. Linville [Wed, 26 Sep 2012 17:39:10 +0000 (13:39 -0400)]
NFC: Add dummy nfc_llc_shdlc_register definition
This is used when CONFIG_NFC_SHDLC is disabled.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thierry Escande [Wed, 26 Sep 2012 16:16:44 +0000 (18:16 +0200)]
NFC: LLCP raw socket support
This adds support for socket of type SOCK_RAW to LLCP.
sk_buff are copied and sent to raw sockets with a 2 bytes extra header:
The first byte header contains the nfc adapter index.
The second one contains flags:
- 0x01 - Direction (0=RX, 1=TX)
- 0x02-0x80 - Reserved
A raw socket has to be explicitly bound to a nfc adapter. This is achieved
by specifying the adapter index to be bound to in the dev_idx field of the
sockaddr_nfc_llcp struct passed to bind().
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Szymon Janc [Thu, 27 Sep 2012 07:16:54 +0000 (09:16 +0200)]
NFC: Fix missing mutex unlock in pn533_send_cmd_frame_async
If command allocation failed cmd_lock was not released and deadlock
would occur.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Szymon Janc [Tue, 25 Sep 2012 10:42:50 +0000 (12:42 +0200)]
NFC: Use dynamic initialization for rwlocks
If rwlock is dynamically allocated but statically initialized it is
missing proper lockdep annotation.
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
Pid: 3352, comm: neard Not tainted 3.5.0-999-nfc+ #2
Call Trace:
[<
ffffffff810c8526>] __lock_acquire+0x8f6/0x1bf0
[<
ffffffff81739045>] ? printk+0x4d/0x4f
[<
ffffffff810c9eed>] lock_acquire+0x9d/0x220
[<
ffffffff81702bfe>] ? nfc_llcp_sock_from_sn+0x4e/0x160
[<
ffffffff81746724>] _raw_read_lock+0x44/0x60
[<
ffffffff81702bfe>] ? nfc_llcp_sock_from_sn+0x4e/0x160
[<
ffffffff81702bfe>] nfc_llcp_sock_from_sn+0x4e/0x160
[<
ffffffff817034a7>] nfc_llcp_get_sdp_ssap+0xa7/0x1b0
[<
ffffffff81706353>] llcp_sock_bind+0x173/0x210
[<
ffffffff815d9c94>] sys_bind+0xe4/0x100
[<
ffffffff8139209e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[<
ffffffff8174ea69>] system_call_fastpath+0x16/0x1b
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Devendra Naga [Wed, 29 Aug 2012 17:33:01 +0000 (23:03 +0530)]
wl18xx: use module_platform_driver
the driver's init and exit routines can be implemented with the
module_platform_driver, as the init and exit code is same as
that of the module_platform_driver
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
John W. Linville [Wed, 26 Sep 2012 17:30:16 +0000 (13:30 -0400)]
nfc: add dummy nfc_llc_shdlc_register definition
This is used when CONFIG_NFC_SHDLC is disabled.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 24 Sep 2012 18:30:19 +0000 (14:30 -0400)]
ath5k: add missing breaks in ath5k_hw_set_spur_mitigation_filter
https://bugzilla.kernel.org/show_bug.cgi?id=47681
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Mon, 24 Sep 2012 08:34:24 +0000 (14:04 +0530)]
ath9k_hw: fix BT sleep state on chip wakeup
Whenever both WLAN and BT in/out sleep mode, sometimes WLAN
is not able to take back the shared LNA control after resumes
from sleep mode. The idea is that for WLAN to check if BT owns
LNA control and BT is in sleep mode when WLAN just resumes from
sleep mode. If the condition is true, do a BTCOEX_RC_WARM_RESET
for WLAN to take back the control of shared LNA.
Now the issue is the BT sleep value read from MCI register is
overlooked by assigning u32 into u8. Hence the above condition never
be met so that WLAN used to report beacon losses and frequent
connection drops.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Tested-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Sun, 23 Sep 2012 18:22:54 +0000 (20:22 +0200)]
rt2x00: Replace open coded interface checking with interface combinations.
Mac80211 has formal infrastructure to specify which interface combinations
are supported. Make use of this facility in favor of open coding it
ourselves.
So far we only have to specify we can support multiple AP interfaces,
no other combinations are supported.
Inspired by an earlier patch from Paul Fertser.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Sun, 23 Sep 2012 18:22:53 +0000 (20:22 +0200)]
rt2x00: Deprecate max_sta_intf field of struct rt2x00_ops.
All drivers set this value to 1, so there is no need (currently) to let
drivers set this.
Therefor, remove the field; we can always add it back when it is needed.
Inspired by an earlier patch from Paul Fertser.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sun, 23 Sep 2012 16:33:00 +0000 (19:33 +0300)]
mwifiex: potential corruption in mwifiex_update_uap_custom_ie()
ap_custom_ie is a struct mwifiex_ie_list which is quite different and
also larger than struct mwifiex_ie. It's a difference between 4196
bytes and 262.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Stone Piao <piaoyun@marvell.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 21 Sep 2012 18:44:28 +0000 (00:14 +0530)]
ath9k: Disable ASPM only for AR9285
Currently, ASPM is disabled for all WLAN+BT combo chipsets
when BTCOEX is enabled. This is incorrect since the workaround
is required only for WB195, which is a AR9285+AR3011 combo
solution. Fix this by checking for the HW version when enabling
the workaround.
Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Tested-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 25 Sep 2012 19:55:02 +0000 (15:55 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
John W. Linville [Tue, 25 Sep 2012 19:54:32 +0000 (15:54 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next
John W. Linville [Tue, 25 Sep 2012 19:50:56 +0000 (15:50 -0400)]
Merge tag 'nfc-next-3.7-1' of git://git./linux/kernel/git/sameo/nfc-3.0
So says Samuel Ortiz <sameo@linux.intel.com>:
This is the first NFC pull request for the 3.7 merge window.
With this one we get:
- HCI and LLC layers separation. We now can support various LLC
protocols for HCI drivers, SHDLC being one of them. This will be needed as
we're planning to support raw HCI chipsets that do the SHDLC encapsulation
in firmware. So for now we have an SHDLC and a NOP LLC layers.
- pn533 command queueing implementation. This simplifies the pn533 locking
logic and fixes a kernel warning.
- NCI p2p initiator mode implementation.
- Replace custom workqueues with system ones, for HCI and LLCP.
- Raw pn544 driver removal, as scheduled on the features-removal.txt file.
- A few HCI, SHDLC and LLCP fixes.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Sun, 23 Sep 2012 07:49:54 +0000 (09:49 +0200)]
cfg80211: Fix regulatory check for 60GHz band frequencies
The current regulatory code on cfg80211 performs a check to
see if a regulatory rule belongs to an IEEE band so that if
a Country IE is received and no rules are specified for a
band (which is allowed by IEEE) those bands are left intact.
The current band check assumes a rule is bound to a band
if the rule's start or end frequency is less than 2 GHz
apart from the center of frequency being inspected.
In order to support 60 GHz for 802.11ad we need to increase
this to account for the channel spacing of 2160 MHz whereby
a channel somewhere in the middle of a regulatory rule may
be more than 2 GHz apart from either the beginning or
end of the frequency rule.
Without a fix for this even though channels 1-3 are allowed world
wide on the rule (57240 - 63720 @ 2160), channel 2 at 60480 MHz
will end up getting disabled given that it is 3240 MHz from
both the frequency rule start and end frequency. Fix this by
using 2 GHz separation assumption for the 2.4 and 5 GHz bands
but for 60 GHz use a 10 GHz separation before assuming a rule
is not part of the band.
Since we have no 802.11ad drivers yet merged this change has
no impact to existing Linux upstream device drivers.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Waldemar Rymarkiewicz [Mon, 24 Sep 2012 06:07:07 +0000 (08:07 +0200)]
NFC: Fix typo negociating -> negotiating
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Waldemar Rymarkiewicz [Fri, 21 Sep 2012 12:02:46 +0000 (14:02 +0200)]
NFC: Don't handle consequent RSET frames after UA
During processing incoming RSET frame chip, possibly due to
its internal timout, can retrnasmit an another RSET which
is next queued for processing in shdlc layer.
In case when we accept processed RSET skip those remaining on
the rcv queue until chip will send it's first S or I frame.
This will mean the chip completed connection as well.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Waldemar Rymarkiewicz [Thu, 20 Sep 2012 06:59:11 +0000 (08:59 +0200)]
NFC: Handle RSET in SHDLC_CONNECTING state
As queue_work() does not guarantee immediate execution of sm_work it
can happen in crossover RSET usecase that connect timer will constantly
change the shdlc state from NEGOTIATING to CONNECTING before shdlc has
chance to handle incoming frame.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Waldemar Rymarkiewicz [Thu, 20 Sep 2012 06:59:10 +0000 (08:59 +0200)]
NFC: xmit from hci ops must return 0 or negative
xmit callback provided by a driver encapsulates upper layers
data and sends it to the hardware. So, HCI does not know the
exact amount of data being sent and thus can't handle partially
sent frames properly.
Therefore, the driver must return 0 for completely sent frame or
negative for failure.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Samuel Ortiz [Wed, 18 Jul 2012 10:58:51 +0000 (12:58 +0200)]
MAINTAINERS: Add NFC specific mailing list
linux-nfc@lists.01.org is where all the Linux NFC related discussions take
place, and one can also send kernel patches there.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Cong Wang [Tue, 18 Sep 2012 17:31:58 +0000 (19:31 +0200)]
NFC: Remove the pn544 raw driver
This was scheduled for 3.6, we're late.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Eric Lapuyade [Tue, 18 Sep 2012 17:25:38 +0000 (19:25 +0200)]
NFC: Add HCI module description
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Eric Lapuyade [Tue, 18 Sep 2012 17:24:37 +0000 (19:24 +0200)]
NFC: Fix LLC registration definitions for ANSI compliance
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Wei Yongjun [Sat, 8 Sep 2012 13:19:44 +0000 (21:19 +0800)]
NFC: Move the pn544_hci dereference below the NULL test
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Wei Yongjun [Sat, 8 Sep 2012 01:53:22 +0000 (09:53 +0800)]
NFC: Move the nfcwilink dereference below the NULL test
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Samuel Ortiz [Tue, 18 Sep 2012 17:17:33 +0000 (19:17 +0200)]
NFC: Remove unneeded LLC symbols export
After fixing the LLC Makefile, we no longer need those exports.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Eric Lapuyade [Tue, 18 Sep 2012 17:45:48 +0000 (19:45 +0200)]
NFC: Changed HCI and PN544 HCI driver to use the new HCI LLC Core
The previous shdlc HCI driver and its header are removed from the tree.
PN544 now registers directly with HCI and passes the name of the llc it
requires (shdlc).
HCI instantiation now allocates the required llc instance. The llc is
started when the HCI device is brought up.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Eric Lapuyade [Thu, 13 Sep 2012 15:11:37 +0000 (17:11 +0200)]
NFC: Add an shdlc llc module to llc core
This is used by HCI drivers such as the one for the pn544 which require
communications between HCI and the chip to use shdlc.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>