Commit graph

269889 commits

Author SHA1 Message Date
John W. Linville
4713e962c5 Merge branch 'for-linville' of git://github.com/sgruszka/iwlegacy 2011-11-21 16:00:56 -05:00
Bing Zhao
e3bea1c875 mwifiex: add support for Marvell sd8797 device
This patch supports Marvell chipset 88W8797 (Avastar) with
SDIO interface.

The corresponding firmware image file is located at:
"mrvl/sd8797_uapsta.bin"

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:45:19 -05:00
Michael Büsch
7adb92faa8 p54spi: Remove FIXME in op_stop
Don't use the interruptible variant of mutex_lock(). It doesn't really
need to be interruptible. This avoids nasty error handling.

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:45:16 -05:00
Felix Fietkau
fcac4fb00e mac80211: call ieee80211_recalc_idle() after sending packets
Some drivers (e.g. ath9k) assume that it's safe to go into low-power mode
immediately after the idle state changes. To support that, mac80211 even
calls drv_flush() before that happens.
In some instances, mac80211 sent a packet right after recalculating the
idle state, this patch fixes that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:45:15 -05:00
Rick Jones
1f80c230a7 wireless: use strlcpy routine in .get_drvinfo
Convert various seemingly still compiled wireless drivers' .get_drvinfo
routines to use the preferred strlcpy() routine.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:44:50 -05:00
Patrick Kelle
6048d76384 minstrel_ht: Remove unused function parameters
Remove unused function parameters in the following functions:
minstrel_calc_rate_ewma()
minstrel_ht_calc_tp()
minstrel_aggr_check()
minstrel_ht_set_rate()

Signed-off-by: Patrick Kelle <patrick.kelle81@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:58 -05:00
Dan Carpenter
88d5346512 mac80211: memory leak in mesh_queue_preq()
We recently introduced a return here, but we need to call kfree
first.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:57 -05:00
Dan Carpenter
5e2e05de55 mac80211: use kfree_skb() instead of kfree()
sk_buff structs should be freed using kfree_skb().

This was introduced recently in 029458212 "mac80211: Save probe
response data for bss".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:57 -05:00
Helmut Schaa
a5f69d94d8 mac80211: Get rid of search loop for rate group index
Finding the group index for a specific rate is done by looping through
all groups and returning if the correct one is found. This code is
called for each tx'ed frame and thus it makes sense to reduce its
runtime.

Do this by calculating the group index by this formula based on the SGI
and HT40 flags as well as the stream number:

idx = (HT40 * 2 * MINSTREL_MAX_STREAMS) +
      (SGI * MINSTREL_MAX_STREAMS) +
      (streams - 1)

Hence, the groups are ordered by th HT40 flag first, then by the SGI
flag and afterwards by the number of used streams.

This should reduce the runtime of minstrel_ht_get_group_idx
considerable.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:57 -05:00
Helmut Schaa
b79296beeb mac80211: Check rate->idx before rate->count
The drivers are not required to fill in rate->count if rate->idx is set
to -1. Hence, we should first check rate->idx before accessing
rate->count.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:56 -05:00
Johannes Berg
a7f23f0a8f mac80211: remove crypto special case for auth frames
The shared key authentication frame that needs to be
encrypted (the third one in the shared key handshake)
is directly encrypted in ieee80211_send_auth and the
IEEE80211_TX_INTFL_DONT_ENCRYPT is set. All others
are not encrypted, so the only way to get to this is
erroneously on no-monitor AP side.

Remove the special case for authentication frames to
fix the AP shared key side when operating without
cooked monitor interfaces -- with cooked monitor the
IEEE80211_TX_INTFL_DONT_ENCRYPT also gets set, so we
never get here -- an AP never encrypts auth frames.

Without this patch, an AP operating in WEP mode with
my no-monitor patches would erroneously encrypt all
authentication frames, instead of none.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:56 -05:00
Joe Perches
8505a7e652 brcmsmac: Use current logging styles
Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use.
Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:56 -05:00
Ilan Elias
ccb290fccc NFC: Fix indentation in nci.h file
Fix indentation in nci.h file.

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:55 -05:00
Rajkumar Manoharan
8227bf4554 ath9k_hw: set btcoex weights for AR9462
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:55 -05:00
Rajkumar Manoharan
54f10b059e ath9k_hw: Cleanup btcoex wlan weights
Remove all wlan weight macros and group it together for better
understanding & readability. It makes the code reusable for
AR9462 wlan weights.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:55 -05:00
Rajkumar Manoharan
bc6d5c29af ath9k: Remove enabling btcoex from stomp type change
This patch removes btcoex_enable from stomp type change and let
it be called from callee functions that makes the code can be
reusable for MCI changes.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17 15:43:54 -05:00
John W. Linville
9c461cef0d Merge branch 'for-linville' of git://github.com/kvalo/ath6kl 2011-11-17 15:16:55 -05:00
Greg Dietsche
9b5e2f463a iwlegacy: debugfs_ops should depend on CONFIG_IWLEGACY_DEBUGFS
Only setup structs related to debugfs_ops when CONFIG_IWLEGACY_DEBUGFS is set.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:55:12 +01:00
Greg Dietsche
e3a2c77533 iwlegacy: 4965-rs: cleanup il4965_rs_sta_dbgfs_rate_scale_data_read
1) remove ret local var and return the result directly
2) remove il since it is not used

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:54:56 +01:00
Greg Dietsche
a741b99577 iwlegacy: 4965-rs: don't return rate from il4965_rs_update_rate_tbl
1) don't return rate from il4965_rs_update_rate_tbl
2) fix up il4965_rs_rate_scale_perform

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:53:45 +01:00
Greg Dietsche
3e4b065520 iwlegacy: 4965-rs: il4965_rs_alloc_sta: remove lq_sta local var
remove the lq_sta local variable and return the
result directly in il4965_rs_alloc_sta

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:53:16 +01:00
Greg Dietsche
144c0961b4 iwlegacy: 4965-rs: remove unnecessary null check for sta and lq_sta
both sta and lq_sta are guaranteed to be not null in the calling
function so we don't need to check them here.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:52:59 +01:00
Greg Dietsche
da6134d253 iwlegacy: 4965-rs: remove null check on sta in il4965_rs_tx_status
the null check on sta in il4965_rs_tx_status is not necessary

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:52:21 +01:00
Greg Dietsche
730b4c2102 iwlegacy: 4965: remove vif null check in request_scan
remove null check on vif in il4965_request_scan

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:51:15 +01:00
Stanislaw Gruszka
c63b2d01b1 iwlegacy: remove unused IL_AC_UNSET define
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 15:20:03 +01:00
Greg Dietsche
dd44eb9e13 iwlegacy: change IL_ERR to D_HT in iwl4965_rs_tl_turn_on_agg_for_tid
This message should be a debug message and not an error.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:46 +01:00
Greg Dietsche
53611e0526 iwlegacy: change IL_WARN to D_HT in il4965_tx_agg_start
This message should be a debug message and not a warning.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:44 +01:00
Stanislaw Gruszka
1722f8e12a iwlegacy: checkpatch.pl fixes
Fix most checkpatch.pl ERRORs and some WARNINGs.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:01 +01:00
Stanislaw Gruszka
e7392364fc iwlegacy: indentions and whitespaces
Process iwlegacy source files using:

indent -npro -l500 -nhnl
indent -npro -kr -i8 -ts8 -sob -l80 -nbbo -ss -ncs -cp1 -il0 -psl

Plus manual compilation fixes.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:45:59 +01:00
Stanislaw Gruszka
f02579e3a8 iwlegacy: merge iwl-debug.h into common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:25:21 +01:00
Stanislaw Gruszka
f19ab370a7 iwlegacy: rename iwl-debug.c to debug.c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:24:36 +01:00
Stanislaw Gruszka
eac3b21277 iwlegacy: merge iwl-fh.h into 4965.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:21:11 +01:00
Stanislaw Gruszka
9a95b37015 iwlegacy: use FH49_ prefix in 4965 code
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:39 +01:00
Stanislaw Gruszka
53143a1809 iwlegacy: use FH39_ prefix in 3945 code
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:33 +01:00
Stanislaw Gruszka
e8c39d4e62 iwlegacy: rename iwl-prph.h to prph.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:27 +01:00
Stanislaw Gruszka
47ef694dd4 iwlegacy: merge iwl-{eeprom,led}.h into common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:23 +01:00
Stanislaw Gruszka
99412002a0 iwlegacy: merge iwl-power.h into common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:19 +01:00
Stanislaw Gruszka
3fbbf9a808 iwlegacy: merge iwl-legacy-rs.h into common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:16 +01:00
Stanislaw Gruszka
f44cfaf330 iwlegacy: remove iwl-helpers.h
This file was already merged into common.h

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:13 +01:00
Stanislaw Gruszka
e94a4099ad iwlegacy: merge common header files
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:09 +01:00
Stanislaw Gruszka
98613be06e iwlegacy: rename iwl-core.h to common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:19:34 +01:00
Stanislaw Gruszka
77375bb01c iwlegacy: rename iwl-csr.h to csr.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:12:12 +01:00
Stanislaw Gruszka
e53aac4247 iwlegacy: move IL_MASK
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:12:06 +01:00
Stanislaw Gruszka
6278ddab9f iwlegacy: remove il_ieee80211_get_hw_conf
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:12:00 +01:00
Stanislaw Gruszka
d4459a99c4 iwlegacy: rename iwl-commands.h to commands.h
On the way remove also not needed iwl-fh.h include.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:51:26 +01:00
Stanislaw Gruszka
7f8e122380 iwlegacy: rename module name
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:42:04 +01:00
Stanislaw Gruszka
0cdc21363c iwlegacy: merge common .c files
Merge iwl-{tx,rx,sta,scan,power,eeprom,led,hcmd}.c into common.c .

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:40:15 +01:00
Stanislaw Gruszka
4ed47911a2 iwlegacy: rename iwl-core.c to common.c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:18:51 +01:00
Stanislaw Gruszka
d2dfb33ec9 iwlegacy: rename other handlers
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:16:38 +01:00
Stanislaw Gruszka
6e9848b496 iwlegacy: s/rx_reply/hdl/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:12:28 +01:00