Commit graph

269627 commits

Author SHA1 Message Date
Kalle Valo ebf29c95cf 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>
2011-11-11 12:50:57 +02:00
Rishi Panjwani 8fffd9e5ec 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>
2011-11-11 12:50:57 +02:00
Jouni Malinen 171693292e 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>
2011-11-11 12:50:57 +02:00
Sam Leffler 17380859a8 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>
2011-11-11 12:50:57 +02:00
Kalle Valo bef26a7fca 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>
2011-11-11 12:50:56 +02:00
Jouni Malinen 837cb97e5b 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>
2011-11-11 12:50:56 +02:00
Jouni Malinen ff0b007573 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>
2011-11-11 12:50:56 +02:00
Jouni Malinen 1261875f7a 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>
2011-11-11 12:50:56 +02:00
Jouni Malinen 4b28a80dd6 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>
2011-11-11 12:50:56 +02:00
Jouni Malinen e8091281f5 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>
2011-11-11 12:50:56 +02:00
Kevin Fang 6981ffdc2f 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>
2011-11-11 12:50:56 +02:00
Kalle Valo ad3f78b99e 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>
2011-11-11 12:50:56 +02:00
Kalle Valo 2e1cb23c5e 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>
2011-11-11 12:50:55 +02:00
Kalle Valo 533cbbb686 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>
2011-11-11 12:50:55 +02:00
Kalle Valo 8e8ddb2b8d ath6kl: move htc_hif to hif.c
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11 12:50:55 +02:00
Kalle Valo b4be8959c2 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>
2011-11-11 12:50:55 +02:00
Kalle Valo cbf49a6fff ath6kl: fix struct host_app_area endian handling
It was missing endian annotation.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11 12:50:55 +02:00
Kalle Valo a7f0c58b89 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>
2011-11-11 12:50:55 +02:00
Chilam Ng aa6cffc1a2 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>
2011-11-11 12:50:55 +02:00
Vasanthakumar Thiagarajan 4533d901a4 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>
2011-11-11 12:50:55 +02:00
Vasanthakumar Thiagarajan 99f54299b9 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan b8d5d5ff03 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan 4159cc935a 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan 861dd058f4 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan 151bd30bdf 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan 1555f7339d 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>
2011-11-11 12:50:54 +02:00
Vasanthakumar Thiagarajan f1f9217926 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>
2011-11-11 12:50:54 +02:00
Dan Carpenter 1eb54c8a0f 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>
2011-11-09 16:14:13 -05:00
Amitkumar Karwar 7d7ab02204 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>
2011-11-09 16:14:13 -05:00
Dan Carpenter fa161cb7aa 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>
2011-11-09 16:14:12 -05:00
Dan Carpenter fba6fe6347 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>
2011-11-09 16:14:11 -05:00
Julia Lawall 1bac92cac1 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>
2011-11-09 16:14:10 -05:00
Julia Lawall 61e3f32c11 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>
2011-11-09 16:14:10 -05:00
Johannes Berg a729cff8ad 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>
2011-11-09 16:14:09 -05:00
Johannes Berg 1f074bd8eb 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>
2011-11-09 16:14:08 -05:00
Helmut Schaa e412156266 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>
2011-11-09 16:14:07 -05:00
Franky Lin 99ba15cd75 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>
2011-11-09 16:14:06 -05:00
Franky Lin 61213be4cc 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>
2011-11-09 16:14:06 -05:00
Franky Lin e12afb6c5d 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>
2011-11-09 16:14:05 -05:00
Franky Lin a8a6c04586 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>
2011-11-09 16:14:04 -05:00
Franky Lin 2bc78e10d8 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>
2011-11-09 16:14:03 -05:00
Franky Lin 454d2a8816 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>
2011-11-09 16:14:03 -05:00
Franky Lin d8f64a425b 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>
2011-11-09 16:14:02 -05:00
Franky Lin a97e4fc5ae 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>
2011-11-09 16:14:01 -05:00
Franky Lin 98ce903519 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>
2011-11-09 16:14:00 -05:00
Franky Lin 960908dcea 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>
2011-11-09 16:14:00 -05:00
Franky Lin 966414da2d 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>
2011-11-09 16:13:59 -05:00
Franky Lin 2d4a9af172 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>
2011-11-09 16:13:58 -05:00
Franky Lin 5b45e54e77 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>
2011-11-09 16:13:57 -05:00
Franky Lin e63ac6b888 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>
2011-11-09 16:13:56 -05:00