Kalle Valo [Thu, 13 Oct 2011 12:21:53 +0000 (15:21 +0300)]
ath6kl: add debug level for hif
That way we htc level debug messages can be removed from hif files. Also
add few new messages and remove useless debug message about using
synchrous irq processing (we don't support anything else).
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 13 Oct 2011 12:21:45 +0000 (15:21 +0300)]
ath6kl: don't dump full htc packets
It's currently possible to dump full sdio packets, so dumping htc packets
is not strictly needed. So remove it, we can always add it back if
there ever comes a need for that.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 13 Oct 2011 12:21:37 +0000 (15:21 +0300)]
ath6kl: cleanup htc debug messages
Unify debug message format and other minor changes.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 13 Oct 2011 12:21:15 +0000 (15:21 +0300)]
ath6kl: merge htc debug levels
It's not really necessary to have separate debug levels for htc tx and rx
so combine them.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Rishi Panjwani [Sat, 15 Oct 2011 00:48:07 +0000 (17:48 -0700)]
ath6kl: Implement support for QOS-enable and QOS-disable from userspace
In order to allow user space based QOS control we use the available debugfs
infrastructure. With this feature, user can make changes to qos parameters,
thereby allowing creation and deletion of user defined priority streams and
features like uapsd. This feature has been added for testing purposes.
All 21 parameters for the create_qos command are mandatory in the correct
order. They have to be written to the create_qos file in
the ath6kl debug directory. These parameters(in order) are:
1)user priority
2)direction
3)traffic class
4)traffic type
5)voice PS capability
6)min service intvl
7)max service intvl
8)inactivity intvl
9)suspension intvl
10)serv start time
11)tsid
12)nominal msdu
13)max msdu
14)min data rate
15)mean data rate
16)peak data rate
17)max burst size
18)delay bound
19)min phy rate
20)surplus bw allowance
21)medium time
To create a qos stream:
echo "6 2 3 1 1 9999999 9999999 9999999 7777777 0 6 45000 200
56789000
56789000 5678900 0 0 9999999 20000 0" > create_qos
delete_qos requires 2 parameters:
1)traffic class
2)tsid
To delete a qos stream:
echo "3 1" > delete_qos
kvalo: minor commit log cleanup
Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 19:08:21 +0000 (22:08 +0300)]
ath6kl: Fix endpoint_stats debugfs buffer length calculation
The previous version did not really make much sense and the theoretical
maximum length would be a bit longer. Calculate the length more
accurately. In addition, there is no need to clear the buffer, so use
kmalloc instead of kzalloc. For bonus points, add the forgotten
cred_rpt_from_other value to the file.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Sam Leffler [Thu, 13 Oct 2011 10:20:32 +0000 (13:20 +0300)]
ath6kl: unbreak suspend
Add missing {}'s that caused ath6kl_sdio_suspend to always return -EINVAL
causing suspend to be aborted.
kvalo: I broke this in commit
f7325b85e ("ath6kl: add sdio debug messages")
Signed-off-by: Sam Leffler <sleffler@chromium.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 12 Oct 2011 06:58:28 +0000 (09:58 +0300)]
ath6kl: fix firmware start address for ar6003 hw2.0
Sangwook found out that commit
639d0b89 ("ath6kl: read firmware start
address from hardware") broke firmware boot on ar6003 hw2.0 as it seems
it's not posible to automatically query the address from hardware. So
we need to hardcode the address for hw2.0.
Reported-by: Sangwook Lee <sangwook.lee@linaro.org>
Tested-by: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 14:31:57 +0000 (17:31 +0300)]
ath6kl: Allow CCKM AKM and KRK to be configured
Use vendor-specific suite selectors to allow CCKM to be configured.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 14:31:56 +0000 (17:31 +0300)]
ath6kl: Add debugfs control for keepalive and disconnection timeout
The new debugfs files keepalive and disconnect_timeout can be used to
fetch the current values and to change the values for keepalive and
disconnect event timeout (both in seconds).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 14:31:55 +0000 (17:31 +0300)]
ath6kl: Add debugfs files for roaming control
Roaming mode can be changed by writing roam mode (default, bssbias, or
lock) to roam_mode. Forced roam can be requested by writing the BSSID
into force_roam.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 14:31:54 +0000 (17:31 +0300)]
ath6kl: Add debugfs file for target roam table
The new roam_table debugfs file can be used to display the current
roam table from the target.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Jouni Malinen [Tue, 11 Oct 2011 14:31:53 +0000 (17:31 +0300)]
ath6kl: Add endpoint_stats debugfs file
This file can be used to fetch endpoint statistics counters and
to clear them by writing 0 to it.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kevin Fang [Fri, 7 Oct 2011 00:51:19 +0000 (08:51 +0800)]
ath6kl: Add WSC IE on the associate message
For some WPS test items, such as item "5.1.14"
STAUT must include the WSC IE in the 802.11 Association Request frame.
Therefore, add the corresponding IE in association message.
Signed-off-by: Kevin Fang <kevin.fang@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 6 Oct 2011 11:32:32 +0000 (14:32 +0300)]
ath6kl: fix null skb dereference in ath6kl_rx()
smatch found that skb might be null in some cases in ath6kl_rx():
ath6kl/txrx.c +1252 ath6kl_rx(222) error: potential null derefence 'skb'.
This will happen when ath6kl is in AP mode and two clients send traffic
to each other.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:49 +0000 (12:23 +0300)]
ath6kl: move remaining content from htc_hif.h to hif.h
Now htc_hif.h can be removed.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:42 +0000 (12:23 +0300)]
ath6kl: remove unused values from htc_hif.h
Also remove some cache line optimisation. It was using hardcoded values
which is wrong.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:33 +0000 (12:23 +0300)]
ath6kl: move htc_hif to hif.c
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:25 +0000 (12:23 +0300)]
ath6kl: return error block size is not power of 2
Currently only a warning is emitted but no error is returned.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:17 +0000 (12:23 +0300)]
ath6kl: fix struct host_app_area endian handling
It was missing endian annotation.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Wed, 5 Oct 2011 09:23:05 +0000 (12:23 +0300)]
ath6kl: remove unused parameters from struct wmi
There's no use for these, at least right now, so better to remove them.
If some of them are ever needed, we can always add them back.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Chilam Ng [Wed, 5 Oct 2011 07:12:52 +0000 (10:12 +0300)]
ath6kl: make sure WLAN power save is enabled during suspend
Power save is enabled during ath6kl init. But when user space disables power
save, the system will go into suspend with power save disabled. The ath6kl
driver will now explicitly enable power save prior to entering suspend and
restore its previous setting upon resume
Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Mon, 3 Oct 2011 11:56:27 +0000 (17:26 +0530)]
ath6kl: Minor cleanup in msg_look_ahead parameter in ath6kl_htc_rxmsg_pending_handler()
It is just a four byte information of the received message
from ath6kl_htc_rxmsg_pending_handler(). Remove unnecessary
array representaion.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Mon, 3 Oct 2011 11:56:26 +0000 (17:26 +0530)]
ath6kl: Avoid processing failed rx packets
It is not necessary to process an htc_packet which is allocated for rx
but failed in sdio rx. Though it does not fix any real issue, it does
not make much sense to process the failed frame.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Mon, 3 Oct 2011 11:58:25 +0000 (17:28 +0530)]
ath6kl: Fix htc_packet leak in ath6kl_htc_rx_fetch()
It is found during the code review. As the leak would happen only
in failure case, the imapct is not easily visible.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Mon, 3 Oct 2011 11:58:07 +0000 (17:28 +0530)]
ath6kl: Fix htc_packet leak in ath6kl_htc_rx_process_packets()
Packet is not reclaimed when ath6kl_htc_rx_process_hdr() fails.
Fix this by deferring the packet deletion from comp_pktq till
ath6kl_htc_rx_process_hdr() returns success. This bug is found
in code review, impact is not easily visible as the leak happens
only in failure cases.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Fri, 30 Sep 2011 16:16:59 +0000 (21:46 +0530)]
ath6kl: Claim sdio function only at appropriate places
There are places where tx_complete callbacks are called with
claiming the sdio function. It is not necessary to hold the
sdio func for longer. This may even affect the host side power
save, if it is supported by the controller.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Fri, 30 Sep 2011 13:48:43 +0000 (19:18 +0530)]
ath6kl: Replace spin_lock_irqsave with spin_lock_bh
It is not necessary to use spinlock primitive to
protect data which is accessed in hard irq context as
nothing is running in hard irq with this driver. The
spinlock primitive meant to protect data in softirq
context is more appropriate.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Fri, 30 Sep 2011 13:48:42 +0000 (19:18 +0530)]
ath6kl: Fix sparse warning "symbol 'conn' shadows an earlier one"
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Sat, 1 Oct 2011 10:42:36 +0000 (16:12 +0530)]
ath6kl: Enable force foreground scan in connected state
This was disabled beacause there was a network stall
issue when scan is issued. This issue does not happen
with the new firmware (3.1.1.609), enable it back.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Dan Carpenter [Tue, 8 Nov 2011 03:31:47 +0000 (19:31 -0800)]
mwifiex: prevent corruption instead of just warning
Probably we never hit this condition, but in case we do, we may as
well put a return here instead of just printing a warning message and
then corrupting memory. The caller doesn't check the return code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Tue, 8 Nov 2011 03:31:46 +0000 (19:31 -0800)]
mwifiex: enable SDIO multiport aggregation
By default SDIO multiport aggregation is disabled. It's useful to
get good throughput results. This patch enables it.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Tue, 8 Nov 2011 03:31:45 +0000 (19:31 -0800)]
mwifiex: remove an unneeded NULL check
We dereference adapter in the error handling code so this needed to
be fixed. This function is always called like:
adapter->if_ops.host_to_card(adapter, ...);
so adapter can never be NULL and I've removed the NULL check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Tue, 8 Nov 2011 03:31:44 +0000 (19:31 -0800)]
mwifiex: remove unneeded kfree(NULL);
The previous if statement means this that pointer is NULL so there
is no need to free it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Sun, 6 Nov 2011 13:26:49 +0000 (14:26 +0100)]
net/rfkill/core.c: use kstrtoul, etc
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Sun, 6 Nov 2011 13:26:48 +0000 (14:26 +0100)]
net/mac80211/debugfs.c: use kstrtoul, etc
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 6 Nov 2011 13:13:34 +0000 (14:13 +0100)]
mac80211: implement wifi TX status
Implement the socket wifi TX status error
queue reflection in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 6 Nov 2011 13:13:33 +0000 (14:13 +0100)]
nl80211: advertise socket TX status capability
The new wifi socket TX capability should be
supported by wifi drivers, let them advertise
whether they do or not.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sat, 5 Nov 2011 13:15:24 +0000 (14:15 +0100)]
mac80211: Also report the STA's TDLS flag via nl80211
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:42 +0000 (22:23 +0100)]
brcm80211: fmac: optimize chip core info management
Prepare for adding backplane interconnect type support
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:41 +0000 (22:23 +0100)]
brcm80211: fmac: replace private SB macros with ssb_regs version
Use SSB macros in order to clean up brcmfmac code
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:40 +0000 (22:23 +0100)]
brcm80211: fmac: move chip drive strength related code to sdio_chip.c
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:39 +0000 (22:23 +0100)]
brcm80211: fmac: move chip detach function to sdio_chip.c
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:38 +0000 (22:23 +0100)]
brcm80211: fmac: move chip reset core function to sdio_chip.c
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:37 +0000 (22:23 +0100)]
brcm80211: fmac: abstract chip core revision function
Prepare for adding backplane interconnect type support
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:36 +0000 (22:23 +0100)]
brcm80211: fmac: abstract chip iscoreup function
Prepare for adding backplane interconnect type support
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:35 +0000 (22:23 +0100)]
brcm80211: fmac: chip attach code flow clean up
Merged brcmf_sdbrcm_chip_attach into brcmf_sdio_chip_attach
for better readability.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:34 +0000 (22:23 +0100)]
brcm80211: fmac: remove duplicate regiter set in chip attach path
Same register writes have been done in brcmf_sdbrcm_probe_init
which is earlier in the same code path.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:33 +0000 (22:23 +0100)]
brcm80211: fmac: move dongle gpio reset code to chip attach function
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:32 +0000 (22:23 +0100)]
brcm80211: fmac: disable dongle arm core in bus core setup function
This will provide a better code flow that fits the logic
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:31 +0000 (22:23 +0100)]
brcm80211: fmac: move core disable function to sdio_chip.c
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:30 +0000 (22:23 +0100)]
brcm80211: fmac: abstract chip buscore setup function
This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:29 +0000 (22:23 +0100)]
brcm80211: fmac: move bus core prep code to sdio_chip.c
This patch is part of abstracting chip backplane handle code
series.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:28 +0000 (22:23 +0100)]
brcm80211: fmac: move chip recognition function to sdio_chip.c
Currently backplane handle code is scatterd around dhd_sdio.c which
is not good for maintenance and adding new backplane interconnect
type support. This patch and the follow up patches are going to
abstract all chip backplane control code specific for sdio bus
into this new sdio_chip.c
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Fri, 4 Nov 2011 21:23:27 +0000 (22:23 +0100)]
brcm80211: fmac: remove unnecessary 4329 chip specific code
4329 with chiprev 0 can not be found on any product. The code can
be removed.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:21 +0000 (11:18 +0100)]
cfg80211/mac80211: allow management TX to not wait for ACK
For probe responses it can be useful to not wait for ACK to
avoid retransmissions if the station that sent the probe is
already on the next channel, so allow userspace to request
not caring about the ACK with a new nl80211 flag.
Since mac80211 needs to be updated for the new function
prototype anyway implement it right away -- it's just a
few lines of code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:20 +0000 (11:18 +0100)]
mac80211: send unexpected 4addr event
Implement the cfg80211 notification but only send
one event per associated station to avoid having
tons of events if the station thinks it should be
allowed to use 4addr frames but it isn't.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:19 +0000 (11:18 +0100)]
cfg80211: add event for unexpected 4addr frames
The frames are used by AP/STA WDS mode, and hostapd
needs to know when such a frame was received to set
up the VLAN appropriately to allow using it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:18 +0000 (11:18 +0100)]
mac80211: report OBSS beacons
If there's an interface in AP mode, OBSS beacons
are needed by hostapd/wpa_s to implement logic to
enable/disable protection etc. Report the frames
and set the capability flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:17 +0000 (11:18 +0100)]
cfg80211: allow registering to beacons
Add the ability to register to received beacon frames
to allow implementing OLBC logic in userspace. The
registration is per wiphy since there's no point in
receiving the same frame multiple times.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:16 +0000 (11:18 +0100)]
mac80211: support client probe
Support probing clients with null data frames
in AP mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:15 +0000 (11:18 +0100)]
nl80211: add API to probe a client
When the AP SME in hostapd is used it wants to
probe the clients when they have been idle for
some time. Add explicit API to support this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 7 Nov 2011 11:39:33 +0000 (12:39 +0100)]
nl80211: advertise device AP SME
Add the ability to advertise that the device
contains the AP SME and what features it can
support. There are currently no features in
the bitmap -- probe response offload will be
advertised by a few patches Arik is working
on now (who took over from Guy Eilam) and a
device with AP SME will typically implement
and require response offload.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:13 +0000 (11:18 +0100)]
mac80211: support spurious class3 event
Add support for the spurious class3 frame event
to mac80211 to enable AP w/o monitor mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:12 +0000 (11:18 +0100)]
nl80211: allow subscribing to unexpected class3 frames
To implement AP mode without monitor interfaces we
need to be able to send a deauth to stations that
send frames without being associated. Enable this
by adding a new nl80211 event for such frames that
an application can subscribe to.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:11 +0000 (11:18 +0100)]
mac80211: add support for control port protocol in AP mode
This will allow us to support dynamic WEP with 802.1X
properly in mac80211 by not encrypting outgoing and
accepting unencrypted incoming frames.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 4 Nov 2011 10:18:10 +0000 (11:18 +0100)]
mac80211: add helper to free TX skb
Drivers that need to drop a frame before it
can be transmitted will usually simply free
that frame. This is currently fine, but in
the future it'll be needed to tell mac80211
about this case, so add a new routine that
frees a TX skb.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Fri, 4 Nov 2011 04:11:13 +0000 (21:11 -0700)]
mac80211: simplify mesh frame queue mapping and QoS
We only need to set the skb queue twice:
1. by the netdev, on local TX.
2. when forwarding a mesh frame.
We only need to set the qos header twice:
1. by mac80211, on local TX.
2. when putting a frame on the mpath->frame_queue
We also don't need the RA in order to set the proper queue mapping since
all mesh STAs are QoS, indicate this and do it once when the frame is
received. Also fixes an issue where the QoS header and queue mapping was not
set for unicast forwarded frames.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 4 Nov 2011 04:11:12 +0000 (21:11 -0700)]
mac80211: check if frame is really part of this BA
There was an an implicit assumption that any QoS data frame received
from a STA/TID with an active BA session was sent to this vif as part of
a BA. This is not true if IFF_PROMISC is enabled and the frame was
destined for a different peer, for example. Don't treat these frames as
part of a BA from the sending STA.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Fri, 4 Nov 2011 04:11:11 +0000 (21:11 -0700)]
mac80211: QoS multicast frames have No Ack policy
Previously QoS multicast frames had the Normal Acknowledgment QoS
control bits set. This would cause broadcast frames to be discarded by
peers with which we have a BA session, since their sequence number would
fall outside the allowed range. Set No Ack QoS control bits on multicast
QoS frames and filter these in de-aggregation code.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
v2: Use proper QoS Ack Policy ctl field mask (Christian)
v3: Clean up conditional (Johannes)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Fri, 4 Nov 2011 04:11:10 +0000 (21:11 -0700)]
mac80211: Avoid filling up mesh preq queue with redundant requests
Don't accept redundant PREQs for a given destination. This fixes a
problem under high load:
kernel: [20386.250913] mesh_queue_preq: 235 callbacks suppressed
kernel: [20386.253335] Mesh HWMP (mesh0): PREQ node queue full
kernel: [20386.253352] Mesh HWMP (mesh0): PREQ node queue full
(...)
The 802.11s protocol has a provision to limit the rate of path requests
(PREQs) are transmitted (dot11MeshHWMPpreqMinInterval) but there was no
limit on the rate at which PREQs were being queued up. There is a valid
reason for queuing PREQs: this way we can even out PREQ bursts. But
queueing multiple PREQs for the same destination is useless.
Reported-by: Pedro Larbig <pedro.larbig@carhs.de>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Thu, 3 Nov 2011 18:33:13 +0000 (11:33 -0700)]
ath9k: Improve debugfs printout for stations.
Add interface address so it can be mapped to a local
interface. Add max-ampdu and mpdu-density.
Print out the tid->baw_size
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 3 Nov 2011 13:41:13 +0000 (14:41 +0100)]
mac80211: verify virtual interfaces in driver API
The driver is never informed about monitor or
AP_VLAN interfaces, so whenever we pass those
to it later this is a bug. Verify we don't as
there are some cases where this could happen.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 9 Nov 2011 09:15:42 +0000 (10:15 +0100)]
net: add wireless TX status socket option
The 802.1X EAPOL handshake hostapd does requires
knowing whether the frame was ack'ed by the peer.
Currently, we fudge this pretty badly by not even
transmitting the frame as a normal data frame but
injecting it with radiotap and getting the status
out of radiotap monitor as well. This is rather
complex, confuses users (mon.wlan0 presence) and
doesn't work with all hardware.
To get rid of that hack, introduce a real wifi TX
status option for data frame transmissions.
This works similar to the existing TX timestamping
in that it reflects the SKB back to the socket's
error queue with a SCM_WIFI_STATUS cmsg that has
an int indicating ACK status (0/1).
Since it is possible that at some point we will
want to have TX timestamping and wifi status in a
single errqueue SKB (there's little point in not
doing that), redefine SO_EE_ORIGIN_TIMESTAMPING
to SO_EE_ORIGIN_TXSTATUS which can collect more
than just the timestamp; keep the old constant
as an alias of course. Currently the internal APIs
don't make that possible, but it wouldn't be hard
to split them up in a way that makes it possible.
Thanks to Neil Horman for helping me figure out
the functions that add the control messages.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 3 Nov 2011 09:40:47 +0000 (10:40 +0100)]
mac80211: simplify ieee80211_work_work
Since local->tmp_channel is always NULL in one branch, some code paths
will newer be taken in that branch, so remove them.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 3 Nov 2011 09:40:46 +0000 (10:40 +0100)]
mac80211: remove useless brackets in ieee80211_cfg_on_oper_channel
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 3 Nov 2011 09:40:45 +0000 (10:40 +0100)]
mac80211: remove uneeded scan_chan variable
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 3 Nov 2011 08:59:39 +0000 (09:59 +0100)]
mac80211: preserve EOSP in QoS header
Janusz reported that the EOSP bit in mac80211 was
getting cleared all the time. I had not found this
since I tested uAPSD with a device that always set
the bit itself. Preserve the bit when building the
QoS header.
Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Tested-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 2 Nov 2011 21:36:31 +0000 (23:36 +0200)]
nl80211: Increase maximum NL80211_ATTR_KEY_SEQ length to 16
WPI-SMS4 uses 16-octet PN field, so we need to allow longer key
sequence values to be configured.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 2 Nov 2011 21:34:56 +0000 (23:34 +0200)]
ieee80211: Define cipher suite selector for WPI-SMS4
This value is used for WPI-SMS4 in ISO/IEC JTC 1 N 9880.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Tue, 1 Nov 2011 13:16:55 +0000 (15:16 +0200)]
mac80211: set BSS_CHANGED_IDLE on vif reconfig
The vif might be busy while reconfiguring
(e.g. associated), so indicate BSS_CHANGED_IDLE as well.
Reported-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislav Yakovlev [Sun, 30 Oct 2011 06:47:50 +0000 (02:47 -0400)]
ipw2x00: remove unused function libipw_ratelimit_debug.
Looks like no one uses it.
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 27 Oct 2011 14:31:50 +0000 (17:31 +0300)]
ath9k: Advertise support for TDLS
Based on a quick test, TDLS seemed to be working fine with ath9k, so
let's start advertising support for this in the driver.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Fri, 28 Oct 2011 11:47:56 +0000 (12:47 +0100)]
orinoco: release BSS structures returned by cfg80211_inform_bss()
The pointer returned by cfg80211_inform_bss is a referenced
struct. The orinoco driver does not need to keep the struct, so
we just release it.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Fri, 28 Oct 2011 05:05:58 +0000 (08:05 +0300)]
rndis_wlan: release BSS structures returned by cfg80211_inform_bss()
Patch fixes rndis_wlan to release referenced BSS structure returned by
cfg80211_inform_bss().
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 27 Oct 2011 12:45:02 +0000 (14:45 +0200)]
cfg80211: annotate cfg80211_inform_bss
This function returns a referenced BSS struct
(or NULL), annotate with __must_check. It seems
that a lot of drivers get this completely wrong
and leak all BSS structs as a result.
Reported-by: Adam Mikuta <Adam.Mikuta@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Fri, 14 Oct 2011 22:14:49 +0000 (00:14 +0200)]
mac80211: handle HT PHY BSS membership selector value correctly
802.11n-2009 extends the supported rates element with a
magic value which can be used to prevent legacy stations
from joining the BSS.
However, this magic value is not a rate like the others
and the magic can simply be ignored/skipped at this late
stage.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>---
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 9 Nov 2011 20:25:18 +0000 (15:25 -0500)]
wireless: cleanup brcm80211 bits in drivers/net/wireless/Makefile
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 9 Nov 2011 19:54:33 +0000 (14:54 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next
Conflicts:
net/bluetooth/l2cap_sock.c
net/bluetooth/mgmt.c
John W. Linville [Wed, 9 Nov 2011 19:49:23 +0000 (14:49 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless
Johan Hedberg [Wed, 9 Nov 2011 11:58:57 +0000 (13:58 +0200)]
Bluetooth: Remove redundant hci_dev comparisons in mgmt lookups
Now that pending commands are hci_dev specific there's no need to check
whether a command matches hci_dev when iterating through them.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Wed, 9 Nov 2011 11:58:56 +0000 (13:58 +0200)]
Bluetooth: Fix consistency with u16 integer type in mgmt pending_cmd
For consistency the integer type should be u16 and not __u16.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 8 Nov 2011 23:44:22 +0000 (01:44 +0200)]
Bluetooth: Fix cancel_delayed_work_sync usage with locks
The cancel_delayed_work_sync function should not be used if we hold any
locks. Luckily all places where this is the case it is also safe to use
the non-sync version.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 8 Nov 2011 18:40:16 +0000 (20:40 +0200)]
Bluetooth: Add missing hci_dev locking when calling mgmt functions
Now that the pending commands are within struct hci_dev we can properly
control access to them throught the hci_dev locking mechanism.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 8 Nov 2011 18:40:15 +0000 (20:40 +0200)]
Bluetooth: Move pending management command list into struct hci_dev
This patch moves the pending management command list (previously global
to mgmt.c) into struct hci_dev. This makes it possible to do proper
locking when accessing it (through the existing hci_dev locks) and
thereby avoid race conditions.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 8 Nov 2011 18:40:14 +0000 (20:40 +0200)]
Bluetooth: Pass full hci_dev struct to mgmt callbacks
The current global pending command list in mgmt.c is racy. Possibly the
simplest way to fix it is to have per-hci dev lists instead of a global
one (all commands that need a pending struct are hci_dev specific).
This way the list can be protected using the already existing per-hci
dev lock. To enable this refactoring the first thing that needs to be
done is to ensure that the mgmt functions have access to the hci_dev
struct (instead of just the dev id).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Thomas Pedersen [Wed, 26 Oct 2011 21:47:29 +0000 (14:47 -0700)]
mac80211: allow frame aggregation for mesh
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Wed, 26 Oct 2011 21:47:28 +0000 (14:47 -0700)]
mac80211: set HT capabilities for mesh peer
Set peer's HT capabilities, and disallow peering if we're on a different
channel type.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Wed, 26 Oct 2011 21:47:27 +0000 (14:47 -0700)]
mac80211: add HT IEs to mesh frames
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Ashok Nagarajan <anagar6@uic.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alexander Simon [Wed, 26 Oct 2011 21:47:26 +0000 (14:47 -0700)]
mac80211: Add HT helper functions
Some refactoring for IBSS HT.
Move HT info and capability IEs building code into separate functions.
Add function to get the channel type from an HT info IE.
Signed-off-by: Alexander Simon <an.alexsimon@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>