]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
11 years agomac80211: use kstrtoull return value
Johannes Berg [Mon, 5 Nov 2012 19:30:39 +0000 (20:30 +0100)]
mac80211: use kstrtoull return value

If kstrtoull() returns an error code (a value
smaller than zero), use it since it can be an
error other than -EINVAL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: fix race in TKIP MIC test debugfs file
Johannes Berg [Mon, 5 Nov 2012 19:27:57 +0000 (20:27 +0100)]
mac80211: fix race in TKIP MIC test debugfs file

Accessing sdata->vif.bss_conf.bssid without any
protection here is racy, use u.mgd.associated
instead and lock the correct mutex for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: use mac_pton
Johannes Berg [Mon, 5 Nov 2012 19:24:38 +0000 (20:24 +0100)]
mac80211: use mac_pton

Instead of implementing practically the same
function (hwaddr_aton) use mac_pton.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()
Antonio Quartulli [Wed, 7 Nov 2012 11:52:20 +0000 (12:52 +0100)]
nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()

The userspace may want to know what is the current ssid that a given
interface is using. This patch enables nl80211 to send the
NL80211_ATTR_SSID attribute in nl80211_send_iface().

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: store the ssid into wirless_dev in AP mode
Antonio Quartulli [Wed, 7 Nov 2012 11:52:19 +0000 (12:52 +0100)]
cfg80211: store the ssid into wirless_dev in AP mode

Store the configured ssid in wdev->ssid when starting an AP

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix typo in RX data tracing
Johannes Berg [Tue, 6 Nov 2012 11:37:21 +0000 (12:37 +0100)]
iwlwifi: fix typo in RX data tracing

The printk message should say RX, not TX.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove useless messages
Johannes Berg [Mon, 5 Nov 2012 18:45:36 +0000 (19:45 +0100)]
iwlwifi: remove useless messages

There's no need to print the PCI resource
length and base address, nor the hardware
revision ID (which can be found in lspci)

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove SKU/antenna messages by default
Johannes Berg [Mon, 5 Nov 2012 18:48:33 +0000 (19:48 +0100)]
iwlwifi: remove SKU/antenna messages by default

There's no reason to print these all the time,
the messages aren't all that interesting. Leave
them as DEBUG_INFO though, just in case.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove EEPROM version message by default
Johannes Berg [Mon, 5 Nov 2012 18:50:26 +0000 (19:50 +0100)]
iwlwifi: remove EEPROM version message by default

If the EEPROM reading was successful, don't print
a message by default, the EEPROM version isn't all
that interesting. Change the message to DEBUG_INFO
priority so it can still be obtained.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: pass P2P powersave parameters to driver
Johannes Berg [Mon, 29 Oct 2012 19:08:01 +0000 (20:08 +0100)]
mac80211: pass P2P powersave parameters to driver

While connected to a GO, parse the P2P NoA attribute
and pass the CT Window and opportunistic powersave
parameters to the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowireless: add utility function to get P2P attribute
Johannes Berg [Mon, 29 Oct 2012 18:48:40 +0000 (19:48 +0100)]
wireless: add utility function to get P2P attribute

Parsing the P2P attributes can be tricky as their
contents can be split across multiple (vendor) IEs.
Thus, it's not possible to parse them like IEs (by
returning a pointer to the data.) Instead, provide
a function that copies the attribute data into a
caller-provided buffer and returns the size needed
(useful in case the buffer was too small.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: allow registering more than one beacon listener
Ben Greear [Fri, 26 Oct 2012 21:49:25 +0000 (14:49 -0700)]
cfg80211: allow registering more than one beacon listener

The commit:

commit 5e760230e42cf759bd923457ca2753aacf2e656e
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Nov 4 11:18:17 2011 +0100

    cfg80211: allow registering to beacons

allowed only a single process to register for beacon events
per wiphy.  This breaks cases where a user may want two or
more VIFs on a wiphy and run a seperate hostapd process on
each vif.

This patch allows multiple beacon listeners, fixing the
regression.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: zero trans_cfg before settings its fields
Emmanuel Grumbach [Mon, 5 Nov 2012 10:52:57 +0000 (12:52 +0200)]
iwlwifi: zero trans_cfg before settings its fields

People tend not to set the fields they want to leave as 0.
So make sure the struct is zeroed properly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: check the SCD conf from ALIVE response
Emmanuel Grumbach [Thu, 25 Oct 2012 21:08:27 +0000 (23:08 +0200)]
iwlwifi: check the SCD conf from ALIVE response

The ALIVE response of new fw inclues the base address of
the SCD in SRAM. Until we read it from a prph register,
which was set by the fw. Since the fw might well stop
updating the prph register, add a WARN when there is an
inconsitency between the ALIVE response and the register
to catch any change in the behavior.

Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: use list_first_entry
Johannes Berg [Sun, 4 Nov 2012 08:31:25 +0000 (09:31 +0100)]
iwlwifi: use list_first_entry

Instead of open-coding it with a temporary list_head
pointer, just use list_first_entry.

Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix queue flush confusion
Johannes Berg [Wed, 31 Oct 2012 21:21:28 +0000 (22:21 +0100)]
iwlwifi: fix queue flush confusion

The flush_control parameter to iwlagn_txfifo_flush
is passed as an internal value (context flags) and
then sent to the device, that can't be right.

Fix the confusion by removing the parameter, always
use IWL_DROP_ALL that is redefined according to the
firmware API in the flush control.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: don't clear CTL_AMPDU on frame status
Johannes Berg [Wed, 31 Oct 2012 20:46:07 +0000 (21:46 +0100)]
iwlwifi: don't clear CTL_AMPDU on frame status

There's no reason to clear the CTL_AMPDU flag on
transmitted frame status, it's not used by the
driver here and mac80211 only uses it for some
rate statistics.

Also remove a stray space in the function.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix flush command
Johannes Berg [Wed, 31 Oct 2012 19:49:32 +0000 (20:49 +0100)]
iwlwifi: fix flush command

The flush command really flushes queues, not
FIFOs, and the first 32 bits indicate the
queues to flush, not FIFOs. Change the command
accordingly.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: implement set_mcast_rate() callback
Antonio Quartulli [Fri, 2 Nov 2012 12:27:49 +0000 (13:27 +0100)]
mac80211: implement set_mcast_rate() callback

This new callback can be used to tune the rate to be used to send
multicast frames.

In the current state the multicast rate can be specified on IBSS/MESH
joining only. This makes it impossible to select a custom multicast
rate when then join command is sent by an external program (e.g.
wpa_supplicant)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE command
Antonio Quartulli [Fri, 2 Nov 2012 12:27:48 +0000 (13:27 +0100)]
nl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE command

This command triggers a new callback: set_mcast_rate(). It enables
the user to change the rate used to send multicast frames for vif
configured as IBSS or MESH_POINT

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowireless: add peer-to-peer related definitions
Arend van Spriel [Mon, 5 Nov 2012 14:29:09 +0000 (15:29 +0100)]
wireless: add peer-to-peer related definitions

The Peer-to-Peer IE is vendor-specific IE identified by WiFi Alliance
OUI and specific P2P OUI type. The payload of this IE consists of
so-called P2P attributes. This patch adds definitions for processing
these attributes.

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: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: send deauth only with channel context
Johannes Berg [Mon, 29 Oct 2012 08:46:31 +0000 (09:46 +0100)]
mac80211: send deauth only with channel context

When userspace asks to deauthenticate and we're just
authenticated (or still authenticating) send a deauth
frame instead of deleting the auth request.

On the other hand, if we've just disassociated and
therefore deleted all our state already, drop the
deauth request because we no longer have a channel
context to send it on.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoBluetooth: Fix parameter order of hci_get_route
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>
11 years agoBluetooth: Rename ctrl_id to remote_amp_id
Andrei Emeltchenko [Thu, 1 Nov 2012 13:37:03 +0000 (15:37 +0200)]
Bluetooth: Rename ctrl_id to remote_amp_id

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>
11 years agoBluetooth: Process Create Chan Request
Andrei Emeltchenko [Thu, 1 Nov 2012 13:37:02 +0000 (15:37 +0200)]
Bluetooth: Process Create Chan Request

Add processing L2CAP Create Chan Request. When channel is created
save associated high speed link hs_hcon.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Use l2cap_physical_cfm in phylink complete evt
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:36 +0000 (15:46 +0200)]
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.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Check for hs_hcon instead of ctrl_id
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:35 +0000 (15:46 +0200)]
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.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Disconnect logical link when deleting chan
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:34 +0000 (15:46 +0200)]
Bluetooth: Disconnect logical link when deleting chan

Disconnect logical link for high speed channel hs_hchan
associated with L2CAP channel chan.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Remove hci_conn receiving error command status
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:33 +0000 (15:46 +0200)]
Bluetooth: AMP: Remove hci_conn receiving error command status

When receiving HCI Event: Command Status for Create Physical Link
with Error code remove AMP hcon.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Process Disc Physical Link Complete evt
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:32 +0000 (15:46 +0200)]
Bluetooth: AMP: Process Disc Physical Link Complete evt

Add processing for HCI Disconnection Physical Link Complete Event.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Process Disc Logical Link
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:31 +0000 (15:46 +0200)]
Bluetooth: AMP: Process Disc Logical Link

Add processing for HCI Disconnection Logical Link Complete
Event.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Add Logical Link Create function
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:30 +0000 (15:46 +0200)]
Bluetooth: AMP: Add Logical Link Create function

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.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Derive remote and local amp id from chan struct
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:29 +0000 (15:46 +0200)]
Bluetooth: Derive remote and local amp id from chan struct

l2cap_chan already keeps information about *_amp_id.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Return correct L2CAP response type
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:28 +0000 (15:46 +0200)]
Bluetooth: Return correct L2CAP response type

Return L2CAP_CREATE_CHAN_RSP for Create Channel Request and
L2CAP_CONN_RSP for Create Connection Request.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Save hs_hchan instead of hs_hcon in loglink complete
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:27 +0000 (15:46 +0200)]
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.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: trivial: Fix braces style and remove empty line
Andrei Emeltchenko [Wed, 31 Oct 2012 13:46:26 +0000 (15:46 +0200)]
Bluetooth: trivial: Fix braces style and remove empty line

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: mgmt: Use __constant when dealing with constants
Syam Sidhardhan [Mon, 29 Oct 2012 17:07:36 +0000 (22:37 +0530)]
Bluetooth: mgmt: Use __constant when dealing with constants

__constant_cpu_to_le*() is the right go here.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove unnecessary include export.h
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.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add put(hcon) when deleting hchan
Andrei Emeltchenko [Thu, 25 Oct 2012 12:20:51 +0000 (15:20 +0300)]
Bluetooth: Add put(hcon) when deleting hchan

When refcnt reaches zero disconnect timeout will run and hci_conn
will be disconnected.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Process Logical Link complete evt
Andrei Emeltchenko [Thu, 25 Oct 2012 12:20:45 +0000 (15:20 +0300)]
Bluetooth: AMP: Process Logical Link complete evt

After receiving HCI Logical Link Complete event finish EFS
configuration by sending L2CAP Conf Response with success code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Process Physical Link Complete evt
Andrei Emeltchenko [Thu, 25 Oct 2012 12:20:44 +0000 (15:20 +0300)]
Bluetooth: AMP: Process Physical Link Complete evt

Add processing for HCI Physical Link Complete event. Upon
successful status received start L2CAP create channel process.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Use helper function sending EFS conf rsp
Andrei Emeltchenko [Thu, 25 Oct 2012 12:20:43 +0000 (15:20 +0300)]
Bluetooth: Use helper function sending EFS conf rsp

There is helper function used to send EFS Configuration Response.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: trivial: Remove unneeded assignment
Andrei Emeltchenko [Thu, 25 Oct 2012 12:20:42 +0000 (15:20 +0300)]
Bluetooth: trivial: Remove unneeded assignment

Assignment is not needed here since err is always gets value.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix sending unnecessary HCI_LE_Host_Enable
Johan Hedberg [Wed, 24 Oct 2012 21:09:53 +0000 (00:09 +0300)]
Bluetooth: Fix sending unnecessary HCI_LE_Host_Enable

This patch fixes sending an unnecessary HCI_LE_Host_Enable command if
the command has already been sent as part of the default HCI init
sequence.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix unnecessary EIR update during powering on
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.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix sending unnecessary HCI_Write_SSP_Mode command
Johan Hedberg [Wed, 24 Oct 2012 21:09:52 +0000 (00:09 +0300)]
Bluetooth: Fix sending unnecessary HCI_Write_SSP_Mode command

This patch fixes sending an unnecessary HCI_Write_SSP_Mode command if
the command has already been sent as part of the default HCI init
sequence.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix setting host feature bits for SSP
Johan Hedberg [Wed, 24 Oct 2012 21:09:51 +0000 (00:09 +0300)]
Bluetooth: Fix setting host feature bits for SSP

When we get a successful command complete for HCI_Write_SSP_Mode we need
to update the host feature bits for the hdev struct accordingly.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Disallow LE scanning and connecting in peripheral role
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.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add flag for LE GAP Peripheral role
Johan Hedberg [Wed, 24 Oct 2012 18:12:02 +0000 (21:12 +0300)]
Bluetooth: Add flag for LE GAP Peripheral role

This patch adds a flag to be used for LE GAP Peripheral role. In this
role undirected advertising will be enabled and operations not allowed
in Peripheral role (such as scanning and initiating connections) will be
disallowed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Make use feature test macros
Johan Hedberg [Wed, 24 Oct 2012 18:12:01 +0000 (21:12 +0300)]
Bluetooth: Make use feature test macros

For better code readability and avoiding simple bugs of checking the
wrong byte of the features make use of feature test macros whenever
possible.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add missing feature test macros
Johan Hedberg [Wed, 24 Oct 2012 18:12:00 +0000 (21:12 +0300)]
Bluetooth: Add missing feature test macros

This patch adds missing feature test macros needed for various use cases
and also sorts the macros according to the feature bit location in the
feature mask (for easy lookup).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix updating host feature bits for LE
Johan Hedberg [Wed, 24 Oct 2012 18:11:59 +0000 (21:11 +0300)]
Bluetooth: Fix updating host feature bits for LE

When LE has been enabled with the simultaneous BR/EDR & LE parameter set
to true we should also update the host features stored in struct hci_dev
accordingly.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: mgmt: Restrict BR/EDR settings to BR/EDR-only adapters
Johan Hedberg [Wed, 24 Oct 2012 18:11:58 +0000 (21:11 +0300)]
Bluetooth: mgmt: Restrict BR/EDR settings to BR/EDR-only adapters

This patch makes sure that settings which are specific for BR/EDR
capable adapters are not allowed for non-BR/EDR (e.g. LE-only) adapters.
Instead, a "not supported" error is returned of such a setting is
attempted to be set for a non-BR/EDR adapter.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix HCI command sending when powering on LE-only adapters
Johan Hedberg [Wed, 24 Oct 2012 18:11:57 +0000 (21:11 +0300)]
Bluetooth: Fix HCI command sending when powering on LE-only adapters

This patch makes sure that we don't send BR/EDR-only commands for
LE-only adapters when they get powered on. Doing this would just cause
command errors.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth:Replace list_for_each with list_for_each_entry() helper
Denis Kirjanov [Mon, 22 Oct 2012 13:22:01 +0000 (17:22 +0400)]
Bluetooth:Replace list_for_each with list_for_each_entry() helper

Replace list_for_each with list_for_each_entry() helper

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoiwlwifi: don't call stop_device twice
Emmanuel Grumbach [Tue, 30 Oct 2012 16:31:41 +0000 (18:31 +0200)]
iwlwifi: don't call stop_device twice

When we unregister from mac80211 it will down the device anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: handle RFKILL logic in the transport layer
Emmanuel Grumbach [Thu, 25 Oct 2012 15:25:52 +0000 (17:25 +0200)]
iwlwifi: handle RFKILL logic in the transport layer

No HCMD can be sent while RFKILL is asserted. If a SYNC
command is running while RFKILL is asserted the fw will
silently discard it. This means that the driver needs to
wake the process that sleeps on the CMD_SYNC.

Since the RFKILL interrupt is handled in the transport layer
and the code that sleeps in CMD_SYNC is also in the transport
layer, all this logic can be handled there.
This simplifies the work of the op_mode.

So the transport layer will now return -ERFKILL when a CMD
is sent and RFKILL is asserted. This will be the case even
when the CMD is SYNC. The transport layer will return
-ERFKILL straight away.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoar5523: make buffer size variable unsigned
Dan Carpenter [Tue, 30 Oct 2012 18:04:26 +0000 (21:04 +0300)]
ar5523: make buffer size variable unsigned

A negative buffer size doesn't make sense and it breaks this check in
ar5523_get_max_rxsz():

if (!ar->rxbufsz || ar->rxbufsz > AR5523_SANE_RXBUFSZ) { ...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: rtl8192de: Shorten some variable...
Larry Finger [Thu, 25 Oct 2012 18:46:31 +0000 (13:46 -0500)]
rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: rtl8192de: Shorten some variable names

The private data areas for these drivers contain some very long variable
names that cause difficulty in fitting source lines to an 80-character
limit.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192c: rtl8192ce: Add support for B-CUT version of RTL8188CE
Larry Finger [Thu, 25 Oct 2012 18:46:30 +0000 (13:46 -0500)]
rtlwifi: rtl8192c: rtl8192ce: Add support for B-CUT version of RTL8188CE

Realtek devices with designation RTL8188CE-VL have the so-called B-cut
of the wireless chip. This patch adds the special programming needed by
these devices. In addition, a variable that was static has been moved into
the private data area as it is now needed in two different routines. This
change also fixes a minor bug that would be present if a system had more
than one RTL81{88,92}CE devices. Other drivers in the rtlwifi family had
already made this change, thus the variable already exists in the private
data structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Anisse Astier <anisse@astier.eu>
Cc: Li Chaoming <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomac80211: use a counter for remain-on-channel cookie
Johannes Berg [Fri, 26 Oct 2012 14:13:06 +0000 (16:13 +0200)]
mac80211: use a counter for remain-on-channel cookie

Instead of using the pointer which can be re-used
fairly quickly due to allocator patterns and then
makes debugging difficult, maintain a counter and
use its value. Since it's a 64-bit value it can't
really wrap, but catch that case anyway since it
most likely points to a bug somewhere.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: combine status/drop reporting
Johannes Berg [Fri, 26 Oct 2012 13:53:06 +0000 (15:53 +0200)]
mac80211: combine status/drop reporting

The TX status reporting is done for both the
nl80211 report as well as the socket option.
The socket option is also reported when an
skb is dropped to guarantee that the copy in
the IDR tree is freed and status is reported
to userspace.

However, when a frame is dropped, no nl80211
status is reported. This can cause userspace
to stop making progress while waiting for a
status notification.

Combine the nl80211 and socket option status
reporting into a new function and call it in
both places -- when the status comes in from
the driver and when the skb is dropped.

While at it, also simplify the code in the
nl80211 portion a bit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211_hwsim: print per interface TX power
Johannes Berg [Wed, 24 Oct 2012 09:54:31 +0000 (11:54 +0200)]
mac80211_hwsim: print per interface TX power

Just for debugging, print the interface TX
power whenever it changes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: handle TX power per virtual interface
Johannes Berg [Wed, 24 Oct 2012 08:59:25 +0000 (10:59 +0200)]
mac80211: handle TX power per virtual interface

Even before channel contexts/multi-channel, having a
single global TX power limit was already problematic,
in particular if two managed interfaces connected to
two APs with different power constraints. The channel
context introduction completely broke this though and
in fact I had disabled TX power configuration there
for drivers using channel contexts.

Change everything to track TX power per interface so
that different user settings and different channel
maxima are treated correctly. Also continue tracking
the global TX power though for compatibility with
applications that attempt to configure the wiphy's
TX power globally.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: allow per interface TX power setting
Johannes Berg [Wed, 24 Oct 2012 08:17:18 +0000 (10:17 +0200)]
cfg80211: allow per interface TX power setting

The TX power setting is currently per wiphy (hardware
device) but with multi-channel capabilities that doesn't
make much sense any more.

Allow drivers (and mac80211) to advertise support for
per-interface TX power configuration. When the TX power
is configured for the wiphy, the wdev will be NULL and
the driver can still handle that, but when a wdev is
given the TX power can be set only for that wdev now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: move "can set channel" check
Johannes Berg [Wed, 24 Oct 2012 08:04:58 +0000 (10:04 +0200)]
nl80211: move "can set channel" check

Setting the wdev to NULL when the channel can't be
set for that interface type (to treat the channel
setting for the wiphy/monitor) currently works, but
is confusing in the code if netdev/wdev aren't both
set/unset in the same way. Move the check whether
the channel can be set to where it's needed so that
wdev and netdev are always both assigned or NULL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211_hwsim: allow using channel contexts
Johannes Berg [Fri, 27 Jul 2012 17:48:26 +0000 (19:48 +0200)]
mac80211_hwsim: allow using channel contexts

To use mac80211_hwsim for testing channel contexts it
has to support them, and for that it has to support
hw scan and hw-remain-on-channel.

Since it's pure software, the off-channel activities
are really not off-channel but listening and sending
on a second channel. Also, the multi-channel isn't
really doing TDM, it's just on both channels at the
same time.

For testing purposes, you can specify the number of
concurrent channels with a module parameter, it is
set to one by default. When set to two or more, the
userspace API for wmediumd is disabled as it has no
provisions for multi-channel yet.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'wireless-next/master' into mac80211-next
Johannes Berg [Tue, 30 Oct 2012 08:09:48 +0000 (09:09 +0100)]
Merge remote-tracking branch 'wireless-next/master' into mac80211-next

11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Mon, 29 Oct 2012 20:05:51 +0000 (16:05 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/mwifiex/cfg80211.c

11 years agossb: handle BCM43222 in pmu code.
Hauke Mehrtens [Thu, 25 Oct 2012 16:39:29 +0000 (18:39 +0200)]
ssb: handle BCM43222 in pmu code.

The BCM43222 with the chipid 43222 or 0xa8d6 in hex do not need any
special handling in the pmu code. This prevents some error messages
being shown.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: add PCI ID 0x4350
Hauke Mehrtens [Thu, 25 Oct 2012 16:39:28 +0000 (18:39 +0200)]
ssb: add PCI ID 0x4350

14e4:4350 is found on a Broadcom BCM43222.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Dump BTCOEX tuning parameters
Rajkumar Manoharan [Thu, 25 Oct 2012 11:46:54 +0000 (17:16 +0530)]
ath9k: Dump BTCOEX tuning parameters

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: validate MCI stuck after RTC wakeup
Rajkumar Manoharan [Thu, 25 Oct 2012 11:46:53 +0000 (17:16 +0530)]
ath9k_hw: validate MCI stuck after RTC wakeup

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix concurrent tx on lower tx power
Rajkumar Manoharan [Thu, 25 Oct 2012 11:46:52 +0000 (17:16 +0530)]
ath9k_hw: Fix concurrent tx on lower tx power

Whenever WLAN receives scheduling msg from BT, it reduces tx power
based on RSSI level. And then BT starts simultaneous transmission
along with WLAN. Sometimes HW MAC compares tx power that is used
prior to power reduction which is causing BT transmission to defer.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Enable hw PLL power save for AR9565
Rajkumar Manoharan [Thu, 25 Oct 2012 11:46:51 +0000 (17:16 +0530)]
ath9k_hw: Enable hw PLL power save for AR9565

This reduced the power consumption to half in full and network sleep.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Enable hw PLL power save for AR9462
Rajkumar Manoharan [Thu, 25 Oct 2012 11:41:31 +0000 (17:11 +0530)]
ath9k_hw: Enable hw PLL power save for AR9462

This reduced the power consumption to half in full and network sleep.

Cc: stable@vger.kernel.org
Cc: Paul Stewart <pstew@chromium.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoar5523: Add new driver
Pontus Fuchs [Tue, 23 Oct 2012 18:33:57 +0000 (20:33 +0200)]
ar5523: Add new driver

This driver is for the AR5523 chipset from Atheros. It was created
in 2007 by Christoph Hellwig but it was never finished. I found it a
couple of months ago and after some polishing it's working pretty
fine.

The driver was written with the FreeBSD driver (uath) as reference,
which was written with the reverse-engineered windows driver as
reference, hence the feature set is very limited. Station mode
only, no HW crypto offload.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: store IEs per virtual interface
Arend van Spriel [Mon, 22 Oct 2012 20:55:41 +0000 (13:55 -0700)]
brcmfmac: store IEs per virtual interface

For AP feature the IEs are stored in global structure. For future
functionality like P2P-GO it needs to be stored per virtual interface
so better store it in the virtual interface structure.

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>
11 years agobrcmfmac: remove unnecessary macro usage in brcmf_cfg80211_resume()
Arend van Spriel [Mon, 22 Oct 2012 20:55:40 +0000 (13:55 -0700)]
brcmfmac: remove unnecessary macro usage in brcmf_cfg80211_resume()

The macro wiphy_to_cfg() is a bit redundant as the function already
has a pointer variable to brcmf_cfg80211_info structure.

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>
11 years agobrcmfmac: add virtual interface support in brcmf_cfg80211_suspend()
Arend van Spriel [Mon, 22 Oct 2012 20:55:39 +0000 (13:55 -0700)]
brcmfmac: add virtual interface support in brcmf_cfg80211_suspend()

With multiple interfaces suspend will need to iterate over all and
bring down the link.

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>
11 years agobrcmfmac: use memset when setting a broadcast mac address
Arend van Spriel [Mon, 22 Oct 2012 20:55:38 +0000 (13:55 -0700)]
brcmfmac: use memset when setting a broadcast mac address

The driver had a global constant ether_bcast, which was copied
whenever a broadcast mac address was needed. This patch does a
memset(dest, 0xFF, ETH_ALEN) instead and consequently removes
the global ether_bcast.

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>
11 years agobrcmfmac: rename check_sys_up() to check_vif_up()
Arend van Spriel [Mon, 22 Oct 2012 20:55:37 +0000 (13:55 -0700)]
brcmfmac: rename check_sys_up() to check_vif_up()

The function now return the status for a virtual interface so
it seems better rename the function to understand what it does.

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>
11 years agobrcmfmac: remove unused enumeration wl_prof_list
Arend van Spriel [Mon, 22 Oct 2012 20:55:36 +0000 (13:55 -0700)]
brcmfmac: remove unused enumeration wl_prof_list

The enumeration wl_prof_list is no longer used so it can be safely
removed.

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>
11 years agobrcmfmac: cleanup brcmf_cfg80211_profile structure
Arend van Spriel [Mon, 22 Oct 2012 20:55:35 +0000 (13:55 -0700)]
brcmfmac: cleanup brcmf_cfg80211_profile structure

A couple of unused fields have been removed and kernel-doc info has
been added to the structure.

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>
11 years agobrcmfmac: remove debugfs functionality from wl_cfg80211.c
Arend van Spriel [Mon, 22 Oct 2012 20:55:34 +0000 (13:55 -0700)]
brcmfmac: remove debugfs functionality from wl_cfg80211.c

In wl_cfg80211.c debugfs directory was created to expose
dtim_period and beacon_interval. However, this can be easily
obtained using iw so it is removed from the driver.

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>
11 years agobrcmfmac: separate connection status from scanning status
Arend van Spriel [Mon, 22 Oct 2012 20:55:33 +0000 (13:55 -0700)]
brcmfmac: separate connection status from scanning status

The connection status is to be kept per virtual interface and
the scanning status is for device. So they need to be separated
for multiple interface support.

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>
11 years agobrcmfmac: use vif struct to check_sys_up() function
Arend van Spriel [Mon, 22 Oct 2012 20:55:32 +0000 (13:55 -0700)]
brcmfmac: use vif struct to check_sys_up() function

This checks the status that will soon be moved to virtual
interface data so preparing for that use the structure
brcmf_cfg80211_vif as parameter instead.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meulemen <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>
11 years agobrcmfmac: store profile information per virtual interface
Arend van Spriel [Mon, 22 Oct 2012 20:55:31 +0000 (13:55 -0700)]
brcmfmac: store profile information per virtual interface

The profile information applies to an interface so each virtual
interface needs it. So it is removed from brcmf_cfg80211_info
and added to brcmf_cfg80211_vif structure.

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>
11 years agobrcmfmac: introduce brcmf_cfg80211_vif structure
Arend van Spriel [Mon, 22 Oct 2012 20:55:30 +0000 (13:55 -0700)]
brcmfmac: introduce brcmf_cfg80211_vif structure

This patch introduces the brcmf_cfg80211_vif structure which is
used to keep track of multiple virtual interfaces in the driver.

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>
11 years agobrcmfmac: remove brcmf_find_bssidx() function
Arend van Spriel [Mon, 22 Oct 2012 17:36:27 +0000 (10:36 -0700)]
brcmfmac: remove brcmf_find_bssidx() function

The function brcmf_find_bssidx() is no longer used so remove
it from the driver code.

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>
11 years agobrcmfmac: change parameter list for send_key_to_dongle()
Arend van Spriel [Mon, 22 Oct 2012 17:36:26 +0000 (10:36 -0700)]
brcmfmac: change parameter list for send_key_to_dongle()

The first two parameters given to send_key_to_dongle() are redundant
so they have been 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>
11 years agobrcmfmac: use fwil for default configuration setup.
Hante Meuleman [Mon, 22 Oct 2012 17:36:25 +0000 (10:36 -0700)]
brcmfmac: use fwil for default configuration setup.

modify the setup code to use the refactored firmware interface layer.

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: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: streamline header parse code of sdio glom read
Franky Lin [Mon, 22 Oct 2012 17:36:24 +0000 (10:36 -0700)]
brcmfmac: streamline header parse code of sdio glom read

Use brcmf_sdio_hdparser to handle header of super frame and sub
frame in glomming frame read.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use struct brcmf_if as interface object for fwil functions
Arend van Spriel [Mon, 22 Oct 2012 17:36:23 +0000 (10:36 -0700)]
brcmfmac: use struct brcmf_if as interface object for fwil functions

The functions for communicating were given the net_device only because
its private data contained struct brcmf_if object. However, not all
firmware related interfaces will be associated with a net_device. To
accomodate provisioning firmware for such interfaces the struct
brcmf_if object will be passed to the fwil functions.

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>
11 years agobrcmfmac: add function converting ieee80211_channel to chanspec
Arend van Spriel [Mon, 22 Oct 2012 17:36:22 +0000 (10:36 -0700)]
brcmfmac: add function converting ieee80211_channel to chanspec

The firmware carries channel information in a different format
as the provided ieee80211_channel structure. Conversion is needed
when receiving requests from cfg80211 carrying ieee80211_channel
structures. This patch adds a utility function to do that.

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>
11 years agobrcmfmac: use bssidx from struct brcmf_if for bsscfg specific commands
Arend van Spriel [Mon, 22 Oct 2012 17:36:21 +0000 (10:36 -0700)]
brcmfmac: use bssidx from struct brcmf_if for bsscfg specific commands

The firmware interface has functions to send bsscfg specific commands
to the device. These functions currently have a bssidx parameter, but
that same information is stored in struct brcmf_if, which is in the
private data of the net_device parameter.

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>
11 years agobrcmfmac: rework driver initialization in brcmf_bus_start()
Arend van Spriel [Mon, 22 Oct 2012 17:36:20 +0000 (10:36 -0700)]
brcmfmac: rework driver initialization in brcmf_bus_start()

In brcmf_bus_start() a number of settings are sent to the device. For
this functions are used that bypass the common firmware interface.
By reordering the code in brcmf_bus_start() this bypass can be removed.

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>
11 years agobrcmfmac: extend struct brcmf_if with bssidx field
Arend van Spriel [Mon, 22 Oct 2012 17:36:19 +0000 (10:36 -0700)]
brcmfmac: extend struct brcmf_if with bssidx field

When the firmware notifies the driver about adding a new interface
it also provides an index for the bss associated with this interface.
This index will be needed for upcoming features like peer-to-peer.
By adding this index in struct brcmf_if it is easy to obtain as this
will be associated with the net_device private data.

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>
11 years agobrcmfmac: clean usb download code.
Hante Meuleman [Mon, 22 Oct 2012 17:36:18 +0000 (10:36 -0700)]
brcmfmac: clean usb download code.

reuse ioctl waiting method.

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>
11 years agobrcmfmac: remove redundant function brcmf_c_mkiovar_bsscfg
Hante Meuleman [Mon, 22 Oct 2012 17:36:17 +0000 (10:36 -0700)]
brcmfmac: remove redundant function brcmf_c_mkiovar_bsscfg

function brcmf_c_mkiovar_bsscfg became redundant with refactoring
of firmware interface layer.

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>