Commit graph

348673 commits

Author SHA1 Message Date
Avinash Patil
e05dc3e93c mwifiex: define generic data type for PCIe ring buffers
This patch defines PCIe ring buffer array pointer as void instead
of mwifiex_pcie_buf_desc. This will enable us to use same pointers
for ring operations instead of new structures if buffer descriptor
structure changes.

Also split out event buffer descriptor structure from struct
mwifiex_pcie_buf_desc. For PCIe8766 TX/RX buffer descriptor is
same as evevt buffer descriptor. Newer chips could use different
TX/RX buffer descriptor while event descriptor remains the same.

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>
2013-02-11 15:34:57 -05:00
Avinash Patil
0732484b47 mwifiex: separate ring initialization and ring creation routines
This patch separates PCIe ring initialization from ring creation
routines. This modularizes ring creation(TXBD, RXBD and event
rings) functions.

Readability has been improved while moving the code around.

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>
2013-02-11 15:34:57 -05:00
Avinash Patil
dd04e6acd8 mwifiex: store card specific data in PCI device table entry
This patch adds support for storing PCIe device specific data
into driver_data structure of pci_device_id. When a device with
known device_id is probed, we use this driver_data to populate
card specific structres in driver.
This enables to remove device specific defines for scratch
registers, firmware name, FW download block size, etc. from
source code.

This will make addition of support for new chipsets a lot easier.

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>
2013-02-11 15:34:56 -05:00
Sujith Manoharan
1a6404a1d8 ath9k: Fix IBSS joiner mode
On joining an existing IBSS network, beaconing has to start
only after a TSF sync has happened by receiving a beacon from
the BSS. In creator mode, beaconing can start immediately after
a HW reset has been done.

Now that mac80211 notifies the driver of the mode type (creator/joiner)
via ieee80211_bss_conf->ibss_creator, make use of it to properly setup
the HW beacon timers.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-11 15:34:56 -05:00
Sujith Manoharan
dd5ee59bb0 ath9k: Fix ATH9K_HW_CAP_HT usage
There are a few places where the station's HT capabilities
should be checked instead of ATH9K_HW_CAP_HT, which is a global
feature for the driver. Fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-11 15:34:56 -05:00
John W. Linville
5d8eac3ad9 This 3rd NFC pull request for 3.9 contains a fix for the microread MEI
physical layer support, as the MEI bus API changed.
 
 From the MEI code, we now pass the MEI id back to the driver probe routine,
 and we also pass a name and a MEI id table through the mei_bus_driver
 structure. A few renames as well like e.g. mei_bus_driver to mei_driver or
 mei_bus_client to mei_device in order to be closer to the driver model
 practices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRGSzIAAoJEIqAPN1PVmxKMvQP+wVGB2rGrkSl4yDkH3GUiByA
 52+PlWsiYQPZ8vMUWzZbdSeDr8tvg0SfJuQV1OBH+Z0h0mKW5EtgvVBKYcT760H2
 pwSKidQj6OjdUJMmneJMCeiSduK5BUi4Ij86EAXxGiNHWuON4g+oYOumwE8uXznG
 LRL5q3DaHksaKzARapy5duhj6QFP3vMGzDge+DDx4BCJALzG8LU+hB/Op3NdgqO4
 WrK3wCIb0xmZLM1ZmQv/pfGU7TELzaMUhRSzI5g6HvDU9ikRkbftu0uxEnHmtPuX
 h7kQpTBZsQ35qXNH5YsLvXf8my2Ru6ix4+3YCX2dBnHsLfVmdEhZPX81D5Pbj8qT
 ph2Rz21UgnEQ2ZpOys3vWAA0geVWmkTKvQwDJAaRn6e/mYzV1Rji4Ujoqj8RQfqf
 2AoRPhT468jznFNkMfoAy5YQvi+BV+HXmyd64rMBSrMd2MXvL677JSNAFK2SBN7l
 Ki8Y3AmA/LLxW7/cptMlD0ILhWLzzETiVKCKOargQpSncaEYlG9L8iSshQKo8LWF
 7F1+7tjquYVKgIGpvMVfooO1xPCI0QXeFxtH1riwDnAqzyMkc22FOg4PTXz9WcPx
 gIosvAmu3mQ81NskWFzll+gBVD2+5hctEJA8nTa6PB9/Gdf+vTjDbO9Hjx9HAIzT
 gWFk/JUShDwEMK3ybnh4
 =PtZa
 -----END PGP SIGNATURE-----

Merge tag 'nfc-next-3.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"This 3rd NFC pull request for 3.9 contains a fix for the microread MEI
physical layer support, as the MEI bus API changed.

From the MEI code, we now pass the MEI id back to the driver probe routine,
and we also pass a name and a MEI id table through the mei_bus_driver
structure. A few renames as well like e.g. mei_bus_driver to mei_driver or
mei_bus_client to mei_device in order to be closer to the driver model
practices."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-11 15:32:21 -05:00
Samuel Ortiz
cd48d8ba14 NFC: microread: Fix mei physical layer
The MEI bus API changed according to the latest comments from the char-misc
maintainers, and this patch fixes the microread mei physical layer code
according to those changes:
We pass the MEI id back to the probe routine, and the mei_driver takes a
table of MEI ids instead of one static id.
Also, mei_bus_driver got renamed to mei_driver, mei_bus_client to
mei_device, and mei_bus_set/get_clientdata to mei_set/get_clientdata.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-11 18:35:36 +01:00
Larry Finger
8708aac79e rtlwifi: rtl8192cu: Add new USB ID
A new model of the RTL8188CUS has appeared.

Reported-and-tested-by: Thomas Rosenkrantz <tom.rosary@googlemail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:43 -05:00
Hante Meuleman
6eda4e2c54 brcmfmac: Add tx p2p off-channel support.
With this patch off-channel action frames can be transmitted. This
is needed for p2p when two devices need to find each other while
using different social channels.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:43 -05:00
Hante Meuleman
4b3a89de8a brcmfmac: Create netdev before returning from add_virtual_intf.
Currently netdev gets created possibly after returning from
add_virtual_intf. This is because add_if is handled asynch. This
is wrong and netdev should be up before returning.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:42 -05:00
Hante Meuleman
dae3a27359 brcmfmac: Cleanup of unused defines.
Remove some unused defines and comments. Also use same define
for IE length.

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>
2013-02-08 14:51:42 -05:00
Hante Meuleman
28c14f4a3b brcmfmac: Fix rtnl_lock lockup when registering netdev.
When adding a virtual interface cfg80211 already has taken the
rtnl_lock. So when the netdevice is being registered the
register_netdevice should be used instead of register_netdev.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:42 -05:00
Hante Meuleman
7ab6acd025 brcmfmac: Remove sleep on del_station.
Currently there is a sleep after disconnect on del_station. This
timeout is not needed (anymore) and is causing problems with p2p
setup, because remote side disconnects then supplicant will do
del_station and while it waits the 400ms remote side will already
reconnect and that is something supplicant cant handle.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:42 -05:00
Hante Meuleman
dded3d532c brcmfmac: Update netdev configuration in wiphy for p2p.
Wiphy object holds information about possible netdev
combinations which can be supported. This needs updating for
p2p device. Also p2p device netdev has wrong 80211 iftype.
Limit the change interface support to match the netdev
configuration/combination possibilities.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:42 -05:00
Hante Meuleman
1bc7c654a9 brcmfmac: Reject change vif for p2p if.
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>
2013-02-08 14:51:41 -05:00
Hante Meuleman
cdcef36b3f brcmfmac: Ignore E_ADD_IF for ifidx 0.
All interfaces for ifidx is 0 are created ahead and therefor
double registrations for not only bssidx 0, but ifidx 0 should
be ignored in brcfm_add_if.

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>
2013-02-08 14:51:41 -05:00
Hante Meuleman
0a4cf487ff brcmfmac: Put printing action frames code under debug flag.
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>
2013-02-08 14:51:41 -05:00
Hante Meuleman
426d0a5629 brcmfmac: Use role from wdev on AP commands and fix stop_ap.
Use the stored role in wdev struct to determine AP/GO role. This
simplifies code. Fix stop_ap for GO role.

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>
2013-02-08 14:51:41 -05:00
Hante Meuleman
2fde59d93f brcmfmac: Create p2p0 netdev via module variable.
Add module variable with which a p2p0 netdev can be created. This
netdev can be used by wpa-supplicant to configure and set up the
p2p client/GO.

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>
2013-02-08 14:51:40 -05:00
Arend van Spriel
1ce3086ccd brcmfmac: change function signatures
cfg80211 api change needs to be applied. this change will be squashed
with introducing commit:

commit 68751daec95b07a74b18aa22b2f9c196991dbe81
Author: Hante Meuleman <meuleman@broadcom.com>
Date:   Mon Nov 26 12:21:27 2012 +0100

    brcmfmac: add support for P2P listen mode.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:40 -05:00
Hante Meuleman
f2058dde8c brcmfmac: Use real cookie value for p2p remain on channel.
In some rare situations the wpa_supplicant can lock up on a remain
on channel command. Use actual cookies for the remain on channel
related commands and allow for additional remain on channel while
still having one set.

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>
2013-02-08 14:51:40 -05:00
Hante Meuleman
18e2f61db3 brcmfmac: P2P action frame tx.
With this patch it is possible to send action frames.

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>
2013-02-08 14:51:40 -05:00
Hante Meuleman
e6da3400b3 brcmfmac: Add handling of receiving P2P action frames.
Once wpa_supplicant has registered for P2P action frames all received
action frames for the device are passed up to cfg80211.

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>
2013-02-08 14:51:39 -05:00
Hante Meuleman
a0f07959ee brcmfmac: Update AP mode for GO creation.
With this update it is possible to create an P2P go. Handle the
p2p go role in creation and the update beacon from cfg80211. Also
store primary bss in global struct. Needed to map cfg device
back to primary device.

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>
2013-02-08 14:51:39 -05:00
Hante Meuleman
89286dc945 brcmfmac: Update connect setup/handling routines for multiple bss.
In preparation of p2p connections update the sta connect setup and
handling routines. Use join iovar and bsscfg commands where
applicable. Handle assoc ind per bsscfg (vif) and generalize
vndr ie setup to support assoc IEs and support all setup types,
e.g. sta, ap and p2p.

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>
2013-02-08 14:51:39 -05:00
Hante Meuleman
318a64cede brcmfmac: Fix bug mgmt_rx_register
Mask is OR-ed with value in case of deregister. Should
be AND-ed.

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>
2013-02-08 14:51:39 -05:00
Hante Meuleman
7a5c1f64f6 brcmfmac: add p2p change vif routines.
Add support for changing existing interface into p2p go
interface.

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>
2013-02-08 14:51:39 -05:00
Hante Meuleman
7ee2d92600 brcmfmac: update p2p add and delete vif routines.
Improve exception handling. Store and removed created vif
in cfg.p2p.bss array. Fix big endian bug. Fix msec jiffies bug.

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>
2013-02-08 14:51:38 -05:00
Hante Meuleman
0f8ffe1774 brcmfmac: update escan for multiple bss and simplify.
Add support for scanning on non primary netdev (p2p) and
simplify the p2p scanning preparation.

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>
2013-02-08 14:51:38 -05:00
Arend van Spriel
5f4f9f114e brcmfmac: implement support for deleting virtual interfaces
Deletion of the virtual interface was not fully supported so
adding it now. Tested using p2p_connect command in wpa_supplicant.

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: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:38 -05:00
Arend van Spriel
de66efcadb brcmfmac: fix generation of the p2p related mac addresses
The driver determines the P2P interface address and device
address from the primary mac address. However, the function
used an invalid input. This caused a mac address mismatch
between firmware and driver. This was hidden because the
brcmf_if_add() function corrected the error upon receiving
the IF_ADD event from firmware.

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: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:38 -05:00
Arend van Spriel
33a6b157f8 brcmfmac: fix compiler warning on printf format
On 64-bit target a warning was given when using %d to print
sizeof() value:

  CC [M]  drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.o
brcm80211/brcmfmac/wl_cfg80211.c: In function 'brcmf_alloc_vif':
brcm80211/brcmfmac/wl_cfg80211.c:3884:2: error: format '%d' expects
argument of type 'int', but argument 3 has type 'long unsigned int'
[-Werror=format]

Fixed using %zu instead.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:37 -05:00
Hante Meuleman
0de8aace0f brcmfmac: add support for P2P listen mode.
With this patch a device can be put in p2p listen mode and becomes
visible for other p2p devices (via p2p_find).

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
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>
2013-02-08 14:51:37 -05:00
Arend van Spriel
d3c0b63396 brcmfmac: add support for creating P2P client/GO interface
This patch allow the creation of P2P client and group owner
virtual interfaces in the driver.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
2013-02-08 14:51:37 -05:00
Arend van Spriel
9f440b7bc7 brcmfmac: add peer-to-peer group discovery support
First part for P2P support. It is a variation on the existing
scanning functionality and is used to discover peer-to-peer
group owners and/or peer-to-peer devices in listen state.

Tested with wpa_cli/wpa_supplicant v2.0-devel.

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: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:37 -05:00
Piotr Haber
0bc9a8cb24 brcmfmac: remove unnecessary locking in trap info processing
Locking host access in trap info processing
is not needed as bus access functions do it on
their own.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:37 -05:00
Piotr Haber
bd16e3555f brcmfmac: turn clocks on when reading shared info
Make sure backplane clocks are on while reading crash data.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:36 -05:00
Piotr Haber
b55de97ffd brcmfmac: fix mmc host locking issue
fix wrong locking in crash info processing

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:36 -05:00
Hante Meuleman
643ecaab35 brcmfmac: Check null pointer on brcmf_dev_reset.
When unloading it is possible that drvr is not null, but iflist[0]
is. So check iflist[0] pointer before using it.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:36 -05:00
Hante Meuleman
2880b86859 brcmfmac: use brcmf_if::bssidx as index in interface list
Upon receiving an IF event from the firmware the interface
was created and stored on a list using the interface index.
With upcoming P2P feature the firmware will send a IF event
in which two interfaces have the same interface index. To
uniquely locate them on the list the bss index is now used.

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>
2013-02-08 14:51:36 -05:00
Joe Perches
4fe238b732 mwl8k: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:35 -05:00
Tim Gardner
0d61c9177c brcmsmac: avoid 512 byte stack variable
Dynamically allocate the probe response template which
avoids potential stack corruption. Observed with smatch:

drivers/net/wireless/brcm80211/brcmsmac/main.c:7412 brcms_c_bss_update_probe_resp()
 warn: 'prb_resp' puts 512 bytes on stack

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:35 -05:00
Tim Gardner
708eb54f20 brcmsmac: fix u16 overflow warning
DOT11_MIN_BEACON_PERIOD and DOT11_MAX_BEACON_PERIOD are
superfluous. The only invalid beacon period is 0. Comparing
a 16 bit quantity to 0xffff also causes a compile warning:

drivers/net/wireless/brcm80211/brcmsmac/main.c:5560 brcms_c_set_beacon_period()
 warn: impossible condition '(period > 65535) => (0-65535 > 65535)'

Observed from smatch analysis.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:35 -05:00
Jiri Slaby
c5e534e569 NET: ath5k, check ath5k_eeprom_mode_from_channel retval
It can, if invalid argument given, return a negative value. In that
case we would access arrays out-of-bounds and such. Check the value
and yell loudly if that happened as it would be a bug in the
implementation. (Instead of silently corrupting memory.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:35 -05:00
Larry Finger
957f4aca5f rtlwifi: rtl8192cu: Fix NULL dereference BUG when using new_id
When the new_id entry in /sysfs is used for a foreign USB device, rtlwifi
BUGS with a NULL pointer dereference because the per-driver configuration
data is not available. The probe function has been restructured as
suggested by Ben Hutchings <bhutchings@solarflare.com>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:34 -05:00
Arend van Spriel
cbb1ec9491 brcmfmac: fix problem connecting to AP without security
The bcm43236 device showed having an issue connection to an AP without
security when auth_type was set to automatic. For this particular device
a workaround is made by selecting open-system. This problem does not
occur when using wpa_supplicant as it will not use auth type automatic.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:34 -05:00
Arend van Spriel
371830eafe brcmfmac: add function to retrieve chip information
Added function to obtain chip information for chip specific
code.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:34 -05:00
Arend van Spriel
75d907d3ee brcmfmac: add chip information to the bus interface
Extend the bus interface with chip identifier and revision. This
will be used when certain devices need special handling in the
driver.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-08 14:51:34 -05:00
Hante Meuleman
1701261d07 brcmfmac: Use single function for channel to chanspec.
Simplify code by using single function for converting channel to
chanspec. No need to set 40MHz flags, as they are not needed for
correct working in FW.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:34 -05:00
Hante Meuleman
7ee2960278 brcmfmac: Cleanup function brcmf_notifiy_connect_status_ap.
Clean up function, removing some unnecessary code and
initialisation.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
2013-02-08 14:51:33 -05:00