Eliad Peller [Thu, 22 Nov 2012 16:06:15 +0000 (18:06 +0200)]
wlcore: split 18xx and 12xx scan mechanism
The scan APIs of 12xx and 18xx are totally different.
Use some common functions as much as possible (e.g.
for setting scan channels), but split scan.c into
chip-specific scan.c files, each implementing its
own scan mechanism.
(in other words - move most of the current wlcore's
scan.c into wl12xx, and implement a similar mechanism
in 18xx, according to the new api)
New wlcore ops are introduced in order to call the
chip-specific scan functions.
The template indices used for each scan (regular/scheduled)
are also different between the chips, so set the correct
indices used for each scan type after identifying the chip.
Eliad Peller [Thu, 22 Nov 2012 16:06:13 +0000 (18:06 +0200)]
wl18xx: change fw name and temporarily fail loading
The new fw (8.5.0.0.28) is not backward compatible
with older drivers.
Use a new fw name (along with bumping the min
fw version), and add some code to fail
any boot attempt during the fw api alignment
patches (as the driver is not functional in
these transitional patches).
This code will be removed after the api alignment
will be done.
When we stop sched scan during connection, we shouldn't
call ieee80211_sched_scan_stopped directly, but do it
in the normal flow, as part of the SCHED_SCAN_COMPLETED
event handling.
Luciano Coelho [Tue, 20 Nov 2012 09:03:31 +0000 (11:03 +0200)]
wlcore: avoid using goto in normal code flow
Remove goto and label in the code where a simple if can be used. If
nothing else, this is at least confusing git diff, which shows the
label name as the name of the function.
Eliad Peller [Tue, 20 Nov 2012 11:20:11 +0000 (13:20 +0200)]
wlcore: configure the remote rates with our own rates
With the new connection flow, start_sta is called before
the remote rates where updated. Use our own supported rates
instead to make sure we don't disable any potential rate
(the rate policies will be updated later, but there is
currently no way to update the remote rates)
Eliad Peller [Tue, 20 Nov 2012 11:20:07 +0000 (13:20 +0200)]
wlcore: set active psm on association
The default ps mode of the fw is auto, while the default
ps mode of mac80211 is active (ps off).
In order to sync them, configure active ps on association.
Eliad Peller [Tue, 20 Nov 2012 11:20:03 +0000 (13:20 +0200)]
wlcore: implement .remain_on_channel() callback
implement the reamin_on_channel() callback by starting
a dev role (already associated with the current vif)
on the requested channel/band.
This channel is usually different from the channel
of the sta role, so pass it to wl12xx_roc() as well,
and notify mac80211 (async) when the fw is ready
on the new channel.
Now, in case of offchannel tx, we should use the dev
role hlid, instead of the sta hlid.
Eliad Peller [Tue, 20 Nov 2012 11:20:02 +0000 (13:20 +0200)]
wlcore: workaround start_sta problem in wl12xx fw
for some reason, the wl12xx fw is not able to rx/tx
on the first start_sta cmd.
Workaround it by issuing a dummy start_sta + stop_sta
before starting the sta for the final time.
Eliad Peller [Tue, 20 Nov 2012 11:20:01 +0000 (13:20 +0200)]
wlcore: start sta role on CHANGED_BSSID
Make the connection flow simpler by starting
sta role on bssid change.
Currently, we start dev role when going idle-off,
and start the sta role only after association
indication. This complicates the connection
flow with some possible intermediate states.
Make it simpler by starting sta role on bssid change,
which now happens *before* auth req get sent.
Update the handling of mac80211's notifications
and change wl1271_join/unjoin accordingly -
* Split wl1271_join() into wlcore_join (tuning on
a channel/bssid) and wlcore_set_assoc (configure
sta after association).
* Rename wl1271_unjoin() to wlcore_unset_assoc(), as
it is no longer the inversion of wl1271_join()
(now it's only used to disconnect associated sta /
joined ibss, without stopping the role).
* Set ssid before starting station role (needed for
start_role(sta)
While on it, split wl1271_bss_info_changed_sta() into
some sub-functions.
since we no longer use dev role in the connection flow,
we now always use the hlid of the sta role.
In corner case for wl12xx_spi_raw_write() when
len == SPI_AGGR_BUFFER_SIZE
we don't setup correctly spi transfer_list.
Next we will have garbage and strange errors
reported by SPI framework (eg. wrong speed_hz,
failed to transfer one message from queue)
when iterate transfer_list.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.
Wei Yongjun [Tue, 23 Oct 2012 05:23:13 +0000 (13:23 +0800)]
wlcore: sdio: use platform_device_unregister in wl1271_remove()
platform_device_unregister() only calls platform_device_del() and
platform_device_put(), thus use platform_device_unregister() to
simplify the code.
Also the documents in platform.c shows that platform_device_del
and platform_device_put must _only_ be externally called in error
cases. All other usage is a bug.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Wei Yongjun [Tue, 23 Oct 2012 05:22:48 +0000 (13:22 +0800)]
wlcore: spi: use platform_device_unregister in wl1271_remove()
platform_device_unregister() only calls platform_device_del() and
platform_device_put(), thus use platform_device_unregister() to
simplify the code.
Also the documents in platform.c shows that platform_device_del
and platform_device_put must _only_ be externally called in error
cases. All other usage is a bug.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Julia Lawall [Sun, 21 Oct 2012 10:52:04 +0000 (12:52 +0200)]
drivers/net/wireless/ti/wlcore/main.c: eliminate possible double power off
The function wl12xx_set_power_on is only called twice, once in
wl12xx_chip_wakeup and once in wl12xx_get_hw_info. On the failure of the
call in wl12xx_chip_wakeup, the containing function just returns, but on
the failure of the call in wl12xx_get_hw_info, the containing function
calls wl1271_power_off. This does not seem necessary, because if
wl12xx_set_power_on has set the power on and then fails, it has already
turned the power off.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
mwl8k: Set packet timestamp to 0 when life time expiry is not used
Set tx packet timestamp to 0 in following scenarios:-
- All packets in STA mode
- Mgmt packets in AP mode
- Eapol packets in AP mode
In STA mode, this field is unused in the firmware. In AP
mode, we should not be expiring mgmt and eapol frames.
Setting timestamp to 0 will ensure that.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
We have 6.5 Mbps is minimum rate of the link
as the criterion for creation of BA.
Although we check this before creating the BA
stream, by the time amdpu_action is called from
the workqueue, the link can get affected in the
meantime.
Hence, add an additional check in amdpu_action.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Tue, 6 Nov 2012 00:59:15 +0000 (16:59 -0800)]
mwifiex: process RX packets in SDIO IRQ thread directly
ksdioirqd has higher priority than kworker. Process RX packets
in SDIO IRQ thread (ksdioirqd/mmcX) directly instead of deferring
the work to kworker to avoid the extra latency.
This improves TCP throughput 15~20% on an ARM platform with SDIO
2.0 controller.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmfmac: use struct brcmf_if parameter in firmware event callbacks
Firmware events are passed to wl_cfg80211 module associated with
the primary net device. With virtual interface support events can
be received for different interfaces, ie. struct brcmf_if instances.
Pass it in the event to determine appropriate net device associated
with the event.
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: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 6 Nov 2012 00:22:31 +0000 (16:22 -0800)]
brcmfmac: add dedicated USB log level.
Add USB log level and update and add log messages in usb module.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 6 Nov 2012 00:22:30 +0000 (16:22 -0800)]
brcmfmac: on halting driver check before release or free.
brcmf_netdev_stop shall first check bus_if status before bringing
down cfg80211. brcmf_detach shall first check if driver is
allocated.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 6 Nov 2012 00:22:29 +0000 (16:22 -0800)]
brcmfmac: check bus state to be data before sending data.
brcmf_netdev_start_xmit and brcmf_fil_cmd_data are checking
bus state for down. These functions should check for data
state.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 6 Nov 2012 00:22:28 +0000 (16:22 -0800)]
brcmfmac: return immediately error for out of range key_idx.
when brcmf_cfg80211_del_key was called with out of range key index
then firmware would return error. Checking was added to
brcmf_cfg80211_del_key to immediately return error.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Yuanhan Liu <yuanhan.liu@intel.com> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Tue, 6 Nov 2012 00:22:25 +0000 (16:22 -0800)]
brcmfmac: remove brcmf_sdbrcm_wait_for_event
brcmf_sdbrcm_wait_for_event is now a one line function and only
used by brcmf_sdbrcm_bus_txctl. Intergrate the function call
wait_event_interruptible_timeout into brcmf_sdbrcm_bus_txctl.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Tue, 6 Nov 2012 00:22:24 +0000 (16:22 -0800)]
brcmfmac: protect consecutive SDIO access with sdio_claim_host
Semaphore sdsem is used to protect consecutive memory access
through SDIO bus. Same functionality is provided by sdio_claim_host/
sdio_release_host interface as well. Replace sdsem with
sdio_claim_host.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Tue, 6 Nov 2012 00:22:23 +0000 (16:22 -0800)]
brcmfmac: decrease the range of SDIO access lock
Semaphore sdsem which protects consecutive SDIO bus access is used
to lock down unnecessary wide range. Decrease the locking range
provides the capability of parallel processing.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Tue, 6 Nov 2012 00:22:22 +0000 (16:22 -0800)]
brcmfmac: use dynamically allocated control frame buffer
Rxbuf in SDIO interface is used in normal frame and control frame
read. Use dynamically allocated buffer in control frame read path
for post processing to avoid conflicts.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmfmac: fix NULL pointer access in brcmf_create_iovar()
The function brcmf_fil_bsscfg_data_get() calls brcmf_create_iovar()
with data pointer set to NULL, which caused a NULL pointer access.
As it should be possible to provide data in message towards the
firmware, it should just pass the data buffer instead.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 6 Nov 2012 00:22:20 +0000 (16:22 -0800)]
brcmfmac: remove obsolete function brcmf_c_mkiovar
the refactored firmware interface layer made this function obsolete.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmfmac: change parameter of brcmf_set_management_ie()
The function brcmf_set_management_ie() operates on virtual
interface data and brcmf_cfg80211_vif structure provides
all information needed for interfacing with firmware. As
this function will also be needed for interface without
an associated net device it makes sense to provide the vif
instead of deriving it from the net device.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmfmac: make pointer type constant in brcmf_set_management_ie()
The vendor ie buffer passed to brcmf_set_management_ie() is not modified
and the caller always provided a constant buffer, which needed a cast.
Better making the buffer parameter of the function constant so the
casts can be removed.
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: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmfmac: restrict error condition in brcmf_inform_bss()
The function brcmf_inform_bss() validates the version received
from the device, before processing the individual bss entries.
This error condition is only applicable when the list contains
entries. A specific scan, ie. for a specific ssid, can result
in a scan completion without finding any bss entries. No need
to flag it as an error in the log when this happens.
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: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The data stored in ap_info structure is no longer used so remove
it from the driver.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pontus Fuchs [Mon, 5 Nov 2012 20:17:51 +0000 (21:17 +0100)]
ar5523: Don't dereference sta if NULL
A missing else caused a potential NULL dereference.
Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jaume Delclòs [Fri, 2 Nov 2012 22:35:20 +0000 (23:35 +0100)]
Wireless: rt2x00: Add device id for Sweex LW323 to rt2800usb.c
This patch adds detection for the Sweex LW323 USB wireless network card
in the rt2x00 driver (just one line in rt2800usb.c).
It applies to linux-3.7-rc3.
Signed-off-by: Jaume Delclòs <jaume@delclos.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Fri, 2 Nov 2012 01:44:16 +0000 (18:44 -0700)]
mwifiex: add multi-queue support
This patch adds support for multiple TX queues inside mwifiex
driver. Four different queues according to WMM access categories
are defined for each virtual interface. When a packet is
received from netdev for transmission, tx pending count for
particular queue is incremented and if tx pending count has
reached upper water-mark, this queue is stopped instead of
stopping all queues. Similarly when a packet is successfully
transmitted from device, tx pending count is decremented per
queue and if pending count falls below lower water-mark, queue
operations are again resumed. This ensures that not all
tranmission is blocked if traffic with particular TOS value
suddenly increases.
Also wake all queues after association/IBSS_join/uAP_BSS_start
to enable traffic on all queues.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When command timeout happens due to a bug in firmware/hardware,
the timeout handler just prints some debug information. User is
unable to reload the driver in this case.
Inspired by 9a821f5 "libertas: add sd8686 reset_card support",
this patch adds card reset support for SDIO interface when
command timeout happens. If the SDIO host contoller supports
MMC_POWER_OFF|UP|ON operations, the chip will be reset and the
firmware will be re-downloaded.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Harro Haan [Wed, 31 Oct 2012 22:24:26 +0000 (23:24 +0100)]
add Marvell 88W8688 support to libertas_sdio
This chip is for example used in the GuruPlug.
This patch avoids the following error:
libertas_sdio: failed to load firmware
libertas_sdio: probe of mmc0:0001:1 failed with error -5
The fix is based on code in:
drivers/net/wireless/libertas_uap/uap_sdio_mmc.c
This file can for example be found on the following links:
http://www.xilka.com/sheeva/2.6/2.6.36/2.6.36.2/source/0002-Driver-for-Marvell-Libertas-8688-SDIO-micro-AP-suppo-2.6.35.patch
http://www.downloadsnewit.co.uk/kernel-v3.0.7/
I followed the following wiki to setup a working WiFi client mode
connection on the GuruPlug:
http://wiki.debian.org/libertas
Signed-off-by: Harro Haan <hrhaan@gmail.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This is pretty pointless. Lets kill this to stop people from
thinking that its actually used. Maybe we should go on
a crusade and kill this completely from the kernel.
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 25 Oct 2012 18:46:46 +0000 (13:46 -0500)]
rtlwifi: rtl8192ce: rtl8192cu: rtl8192se: rtl81723ae: Turn on building of the new driver
This patch completes the addition of the new driver for the Realtek
RTL8723AE devices by adding the make file and by modifying Kconfig
and Makefile of rtlwifi. Some variable names were shortened to ease
the problem of limiting all lines to 80 characters, thus changes were
made to wifi.h and rtl8192{ce,cu,sw}/hw.c.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 25 Oct 2012 18:46:45 +0000 (13:46 -0500)]
rtlwifi: Modify files for addition of rtl8723ae
This patch modifies the files of rtlwifi for the addition of a new driver
to handle the Realtek RTL8723AE wireless device, and introduces a new
routine to maintaim statistics that will be used later for roaming.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johan Hedberg [Thu, 1 Nov 2012 11:27:26 +0000 (13:27 +0200)]
Bluetooth: Fix parameter order of hci_get_route
The actual parameter order of hci_get_route is (dst, src) and not (src,
dst). All current callers use the right order but the header file shows
the parameters in the wrong order.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Since we have started to use local_amp_id for local AMP
Controller Id it makes sense to rename ctrl_id to remote_amp_id
since it represents remote AMP controller Id.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Bluetooth: AMP: Use l2cap_physical_cfm in phylink complete evt
When receiving HCI Phylink Complete event run amp_physical_cfm
which initialize BR/EDR L2CAP channel associated with High Speed
link and run l2cap_physical_cfm which shall send L2CAP Create
Chan Request.
Bluetooth: AMP: Check for hs_hcon instead of ctrl_id
When deciding whether to send EFS configuration response with success,
check rather for existence of High Speed physical link hs_hcon then
ctrl_id. There might be cases when there is ctrl_id but high speed link
is not established yet.
After physical link is created logical link needs to be created.
The process starts after L2CAP channel is created and L2CAP
Configuration Response with result PENDING is received.
Bluetooth: Save hs_hchan instead of hs_hcon in loglink complete
When logical link creation is completed we need to save hs_hchan
which represents logical link instead of hs_hcon representing
physical link. hs_hcon shall be saved when receiving physical link
complete event.
Syam Sidhardhan [Tue, 23 Oct 2012 13:32:17 +0000 (19:02 +0530)]
Bluetooth: Remove unnecessary include export.h
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.
Johan Hedberg [Wed, 24 Oct 2012 21:09:54 +0000 (00:09 +0300)]
Bluetooth: Fix unnecessary EIR update during powering on
When powered on the EIR data gets updated as the last step by mgmt.
Therefore avoid an update when getting a local name update as that's
part of the normal HCI init sequence.
Johan Hedberg [Wed, 24 Oct 2012 18:12:03 +0000 (21:12 +0300)]
Bluetooth: Disallow LE scanning and connecting in peripheral role
When an adapter is in the LE peripheral role scanning for other devices
or initiating connections to them is not allowed. This patch makes sure
that such attempts will result in appropriate error returns.