Commit graph

361769 commits

Author SHA1 Message Date
John W. Linville
bef086e08e Merge branch 'for-john' of git://x-git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 2013-04-12 13:20:51 -04:00
Samuel Ortiz
be055b2f89 NFC: RFKILL support
All NFC devices will now get proper RFKILL support as long as they provide
some dev_up and dev_down hooks. Rfkilling an NFC device will bring it down
while it is left to userspace to bring it back up when being rfkill unblocked.
This is very similar to what Bluetooth does.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-12 16:54:45 +02:00
Samuel Ortiz
44b3decb41 rfkill: Add NFC to the list of supported radios
And return the proper string for it.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-12 16:54:38 +02:00
Claudio Takahasi
93796fa6f2 Bluetooth: Reject SCO when hci connection timeouts
This patch sends Reject Synchronous Connection Request Command when
hci_conn_timeout is triggered, and the SCO connection is in BT_CONNECT2
state. It prevents inconsistency if the remote host doesn't implement
properly the timeout for the connection request, and it removes the
connection reference left when the socket is closed for incoming SCO
connections.

[ 2650.129080] sco_sock_release: sock ffff8801ca417400, sk ffff88020c408800
[ 2650.129092] sco_sock_clear_timer: sock ffff88020c408800 state 6
[ 2650.129101] __sco_sock_close: sk ffff88020c408800 state 6 socket
	ffff8801ca417400
[ 2650.129108] sco_chan_del: sk ffff88020c408800, conn ffff8801c650ea20,
	err 104
[ 2650.129114] hci_conn_put: hcon ffff88020c40a800 orig refcnt 1
[ 2650.129128] sco_sock_kill: sk ffff88020c408800 state 9
[ 2650.129135] sco_sock_destruct: sk ffff88020c408800
[ 2650.138468] hci_conn_timeout: hcon ffff88020c40a800 state BT_CONNECT2

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:18 -03:00
Claudio Takahasi
baf4325197 Bluetooth: Remove unneeded parameter
This patch removes the status parameter of the l2cap_conn_add function.
The parameter 'status' is always 0.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:18 -03:00
Claudio Takahasi
92f185c89f Bluetooth: Minor coding style fix
This patch removes unneeded initialization and empty line.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:17 -03:00
Claudio Takahasi
c10cc5a9d4 Bluetooth: Use GFP_KERNEL in sco_conn_add
This patch changes the memory allocation flags in the sco_conn_add
function, replacing the type to GFP_KERNEL. This function is executed
in process context and it is not called inside an atomic section.

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:17 -03:00
Claudio Takahasi
ea323c1198 Bluetooth: Fix SCO connection reference
This patch fixes decrementing SCO connection reference right after
stablishing the SCO connection with defer setup enabled. The dump below
shows a disconnection command with handle 0, the connection is still in
BT_CONNECT2 state and there isn't a handle associated with it.

< HCI Command: Accept Synchronous Connection (0x01|0x0029) plen 21
  bdaddr 78:47:1D:B3:72:6C
> HCI Event: Command Status (0x0f) plen 4
  Accept Synchronous Connection (0x01|0x0029) status 0x00 ncmd 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
  handle 0 reason 0x13
  Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
  Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
  status 0x00 handle 46 bdaddr 78:47:1D:B3:72:6C
  type eSCO
  Air mode: CVSD
< SCO data: handle 46 flags 0x00 dlen 48

Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:16 -03:00
David Herrmann
76a68ba0ae Bluetooth: rename hci_conn_put to hci_conn_drop
We use _get() and _put() for device ref-counting in the kernel. However,
hci_conn_put() is _not_ used for ref-counting, hence, rename it to
hci_conn_drop() so we can later fix ref-counting and introduce
hci_conn_put().

hci_conn_hold() and hci_conn_put() are currently used to manage how long a
connection should be held alive. When the last user drops the connection,
we spawn a delayed work that performs the disconnect. Obviously, this has
nothing to do with ref-counting for the _object_ but rather for the
keep-alive of the connection.

But we really _need_ proper ref-counting for the _object_ to allow
connection-users like rfcomm-tty, HIDP or others.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:15 -03:00
Marcel Holtmann
9f8f962c85 Bluetooth: Use separate function for BCM92035 vendor setup
Trying to squeeze every single vendor setup routine into the same function
and have it assigned all the time is actually a bad idea. Especially since
the core can handle the absence of a setup routine perfectly fine.

To make this a lot simpler for future additions of vendor setup code,
split the BCM92035 setup into its own function and only assign it when
this specific device has been detected.

Doing it like this has the nice side benefit that we do not have to keep
a copy of the driver_info around.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-04-11 16:34:10 -03:00
Samuel Ortiz
60d9edd50b NFC: pn533: Turn radio on and off when bringing the device up and down
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:11 +02:00
Samuel Ortiz
7757dc8a3e NFC: Prevent polling when device is down
Some devices turn radio on whenever they're asked to start a poll.
To prevent that from happening, we just don't call into the driver
start_poll hook when the NFC device is down.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:10 +02:00
Marina Makienko
7c5a54fb86 NFC: pn533: Add missing usb_put_dev
Add missing usb_put_dev on failure path in pn533_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Marina Makienko <makienko@ispras.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:10 +02:00
Samuel Ortiz
6d2cd978e5 NFC: llcp: Terminate connection when receiving a DISC on (0,0)
According to the LLCP specs, we must terminate the LLCP link when receiving
a DISC with both ssap and dsap set to 0.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:09 +02:00
Samuel Ortiz
c470e319b4 NFC: llcp: Remove local_cleanup last argument
local_cleanup is always called with device set to false as it means the
local LLCP is going away. So no need to pass this switch as an argument.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:09 +02:00
Samuel Ortiz
b436a13deb NFC: llcp: Only keep raw sockets alive when the LLCP local leaves
When the MAC goes down, connected and connection less sockets should be
notified, but raw sockets should be kept alive.
They will get notified only when the physical devices goes away.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:09 +02:00
Waldemar Rymarkiewicz
495af72e14 NFC: pn533: Increase version number
Major features added in 0.2 version:

* frame ops added to support wider set of devices
* support of ACS ACR122U

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:08 +02:00
Waldemar Rymarkiewicz
96aac226a4 NFC: pn533: Remove unused pn533_cmd_complete_t
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:08 +02:00
Waldemar Rymarkiewicz
10cff29af6 NFC: pn533: Add pn533_abort_cmd procedure
pn533_abort_cmd() aborts last command sent to the controller
and cancels already requested urb.

As ACR122U does not support any mechanism (as ACK for standard
PN533) which aborts last command this cannot be issued for this
device. Otherwise, acr122u will behave in an unstable way.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:07 +02:00
Waldemar Rymarkiewicz
53cf48399a NFC: pn533: Add support for ACS ACR122U reader
ACS ACR122U is an USB NFC reader, PC/SC and CCID compilant, based
on NXP PN532 chip.

Internally, it's build of MCU, PN532 and an antenna. MCU makes the
device CCID and PC/SC compilant and provide USB connection.

In this achitecture, a host cannot talk directly to PN532 and must
rely on MCU. Luckily, MCU exposes pseud-APDU through PC/SC Escape
mechanism which let the host to transmit standard PN532 commands
directly to PN532 chip with some limitations.

The frame roughly looks like:

    CCID header    |          APDU header           |    PN532 header
(pc_to_rdr_escape) |  (pseudo apdu Direct Tramsmit) | (len, TFI, cmd, params)

Accordign to limitations, ACR122U does't provide any mechanism to
abort last issued command.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:07 +02:00
Waldemar Rymarkiewicz
58520373d8 NFC: pn533: Add protocol type for frame ops
As not all devices require ACK confirmation of every request sent to the
controller, differentiate two protocol types.

First one, request-ack-response and the second one request-response type.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:06 +02:00
Waldemar Rymarkiewicz
f87bc9fb62 NFC: pn533: Move wq_in_error to cmd context
Rename 'wq_in_error' field to more relevant 'status'
and move it to cmd context struct.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:06 +02:00
Waldemar Rymarkiewicz
d5590bba37 NFC: pn533: Re-group fields in struct pn533
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:05 +02:00
Waldemar Rymarkiewicz
c79490e1b5 NFC: pn533: Avoid function declarations
Reorder code to avoid functions declaration.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:05 +02:00
Waldemar Rymarkiewicz
ddf19d206f NFC: pn533: Simplify __pn533_send_frame_async
In all cases (send_cmd_async, send_data_async and send_sync)
pn533_send_async_complete() handles all responses internally,
so there is no need to pass this as a callback.

Cmd context is passed to __pn533_send_frame_async in all the
cases as well. It's already kept in struct pn533 which is
available all the time the device is attached. So we can make
use of it instead.

Therefore, cmd_complete and cmd_complete_arg are no needed any more.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:04 +02:00
Waldemar Rymarkiewicz
140ef7f6b0 NFC: pn533: Fix incorrect kfree of complete args
We must free 'cmd_complete_mi_arg' and not 'cmd_complete_arg'
when getting send error handling fragmented response.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:04 +02:00
Waldemar Rymarkiewicz
4b2a953276 NFC: pn533: Remove redundant cmd_ prefix in the struct
'cmd->code' looks better then 'cmd->cmd_code'

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:03 +02:00
Waldemar Rymarkiewicz
2c206fb7fe NFC: pn533: Keep cmd context in pn533 struct
Keep cmd context in pn533 struct instead of only cmd code.
The context already includes cmd_code.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:03 +02:00
Waldemar Rymarkiewicz
4231604b3e NFC: pn533: Optimise issued cmd context tracking
Use struct pn533_cmd instead of pn533_send_async_complete_arg
to track the context of the issued cmd.

This way pn533_send_async_complete_arg struct is no needed
anymore. Just move issuer complete callback to pn533_cmd struct.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:02 +02:00
Waldemar Rymarkiewicz
0ce1fbdd60 NFC: pn533: Fix memleak while scheduling next cmd
In case of error from __pn533_send_frame_async() while sending
next cmd from the queue (cmd_wq), cmd->req, cmd->resp and
cmd->arg pointers won't be freed.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:02 +02:00
Waldemar Rymarkiewicz
f75c291361 NFC: pn533: Rename pn533_fw_reset appropriately
Define explicitely it is Pasori specific reset command.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:01 +02:00
Waldemar Rymarkiewicz
e70b96e95b NFC: pn533: Update copyrights note
Remove duplicated authors info from the header as well.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:01 +02:00
Waldemar Rymarkiewicz
95cb9e1023 NFC: pn533: Fix div by zero while stopping polling
Depends on timing division by zero can happen when user stops
polling.

pn533_stop_poll() resets modulation counter on stop_poll, but
meanwhile we get response for last poll request and try, despite
of stop poll request, to schedule next modulation for polling.

Log message:
[345.922515] pn533 1-1.3:1.0: pn533_stop_poll
[345.928314] pn533 1-1.3:1.0: pn533_send_ack
[345.932769] pn533 1-1.3:1.0: Received a frame.
[345.937438] PN533 RX: 00 00 ff 03 fd d5 4b 00 e0 00
[345.942840] pn533 1-1.3:1.0: pn533_poll_complete
[345.947753] pn533 1-1.3:1.0: pn533_start_poll_complete
[345.953186] Division by zero in kernel.
[345.957244] [<c001b38c>] (unwind_backtrace+0x0/0xf0)
[345.965698] [<c0260e78>] (Ldiv0+0x8/0x10)
[345.974060] [<c0260e60>] (__aeabi_idivmod+0x8/0x18)
[345.983978] [<c02e0064>] (pn533_poll_complete+0x3c0/0x500)
[345.994903] [<c02df690>] (pn533_send_async_complete+0x7c/0xc0)
[346.005828] [<c02e028c>] (pn533_wq_cmd_complete+0x1c/0x34)
[346.016113] [<c005d134>] (process_one_work+0x1ac/0x57c)
[346.025848] [<c005d85c>] (worker_thread+0x168/0x42c)
[346.034576] [<c00620c0>] (kthread+0xa4/0xb0)

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:00 +02:00
Waldemar Rymarkiewicz
a45e1c8d17 NFC: pn533: Print out response status bits in hex
For better debugging as the codes are defined in hex in the spec.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:00 +02:00
Waldemar Rymarkiewicz
63123108f4 NFC: pn533: Reword all std frame logic funct
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:29:00 +02:00
Thierry Escande
064f370c5f NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parameters
Useful for LLCP validation tests.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:59 +02:00
Thierry Escande
abd18d4330 NFC: llcp: Reset RW, LTO, and MIU remote parameters when link goes down
This resets remote parameters in both local and socket llcp structures when the
link goes down. That way, nfc_llcp_getsockopt won't return values corresponding
to the previous link parameters.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:59 +02:00
Thierry Escande
66cbfa10f3 NFC: llcp: Use localy stored remote_miu value if not set at socket level
If remote_miu value is not set in the socket (i.e. connection-less socket) the
value stored in the local is used.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:58 +02:00
Thierry Escande
098dafcfb4 NFC: llcp: Aggregated frames support
This adds support for AGF PDUs. For each PDU contained in the AGF, a new sk_buff
is allocated and dispatched to its corresponding handler.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:58 +02:00
Olivier Guiter
0b23d666a8 NFC: llcp: Fix zero octets length SDU handling
LLCP Validation test #2 (Connection-less information transfer) send a
service data unit of zero octets length. This is now handled correctly.

Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:57 +02:00
Samuel Ortiz
00e856db49 NFC: llcp: Fall back to local values when getting socket options
If a socket option has not been set by the user, fall back to the LLCP
local ones.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:57 +02:00
Samuel Ortiz
5eef666975 NFC: llcp: Socket miux is a big endian field
The MIUX must be transmitted in big endian and as such we have to convert
it properly.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:56 +02:00
Samuel Ortiz
e279f84f30 NFC: pn533: Use dynamic debug for pn533 hex dumps
Those can be very verbose and we only want them when debugging pn533.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11 16:28:56 +02:00
Karl Beldan
5253ffb8c9 mac80211: always pick a basic rate to tx RTS/CTS for pre-HT rates
When the 1st rate control entry is a pre-HT rate we want to set
rts_cts_rate_idx "as the fastest basic rate that is not faster than the
data rate"(code comments).
But in case some bss allowed rate indexes are lower than the lowest bss
basic rate, if the rate control selects a rate among the formers for its
1st rate control entry, rts_cts_rate_idx remains 0 and is not a basic
rate index.
This commit sets rts_cts_rate_idx to the lowest bss basic rate index in
this situation.

Note that the code assumes that lowest indexes == lowest bitrates.

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-11 12:08:20 +02:00
Thomas Pedersen
2419ea14bb mac80211: fix ieee80211_queue_stopped()
Johannes Berg notes mac80211 drivers which use
ieee80211_queue_stopped() really only want to know if they
previously requested a queue stop.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-11 12:08:06 +02:00
Johannes Berg
7b119dc06d mac80211: fix cfg80211 interaction on auth/assoc request
If authentication (or association with FT) is requested by
userspace, mac80211 currently doesn't tell cfg80211 that it
disconnected from the AP. That leaves inconsistent state:
cfg80211 thinks it's connected while mac80211 thinks it's
not. Typically this won't last long, as soon as mac80211
reports the new association to cfg80211 the old one goes
away. If, however, the new authentication or association
doesn't succeed, then cfg80211 will forever think the old
one still exists and will refuse attempts to authenticate
or associate with the AP it thinks it's connected to.

Anders reported that this leads to it taking a very long
time to reconnect to a network, or never even succeeding.
I tested this with an AP hacked to never respond to auth
frames, and one that works, and with just those two the
system never recovers because one won't work and cfg80211
thinks it's connected to the other so refuses connections
to it.

To fix this, simply make mac80211 tell cfg80211 when it is
no longer connected to the old AP, while authenticating or
associating to a new one.

Cc: stable@vger.kernel.org
Reported-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10 21:38:36 +02:00
Marek Puzyniak
0ca54f6c5f mac80211: provide SSID in IBSS mode
Some drivers need SSID in AP and IBSS mode. AP SSID is provided
through BSS_CHANGED_SSID notification. There was no easy way to
do the same for IBSS. In IBSS mode SSID is known but was not
stored in BSS configuration. Extend the AP-mode functionality
to also work in IBSS mode.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10 20:24:18 +02:00
Johannes Berg
a21a4d3e8a mac80211: always advertise STBC/MCSes even if no AP support
Advertise STBC capabilities and MCS rates even if the AP
doesn't support them. This has always been the right thing
to do, but used to be problematic with some APs. Now WFA
testing requires this so re-enable it, problematic APs
would then presumably not pass the test and be fixed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10 20:24:17 +02:00
Marek Puzyniak
0eabccd940 mac80211: clear SSID when stopping AP
When AP interface is stopped ssid_len in the BSS configuration
isn't cleared which can confuse drivers when switching modes.
Set the length to zero when stopping the AP interface.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10 20:24:16 +02:00
Simon Wunderlich
e47468518b mac80211: fix recalc_radar hwconf sync problem
local->hw.conf maybe not be synced when recalcing whether radar is
enabled, sometimes leaving radar enabled even if it's not neccesary
anymore.

Fix this by:
 * setting radar_enabled when creating the chanctx
 * turning radar_enabled off before destroying the last channel context

Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10 20:24:16 +02:00