]> git.openfabrics.org - ~shefty/rdma-dev.git/log
~shefty/rdma-dev.git
12 years agoath9k: Remove AR9462 v1.0 support
Sujith Manoharan [Wed, 22 Feb 2012 07:10:03 +0000 (12:40 +0530)]
ath9k: Remove AR9462 v1.0 support

v1.0 chips are not available in the market.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix associated vs. idle race
Johannes Berg [Mon, 20 Feb 2012 13:19:58 +0000 (14:19 +0100)]
mac80211: fix associated vs. idle race

Eliad reports that if a scan finishes in the
middle of processing associated (however it
happens), the interface can go idle. This is
because we set assoc_data to NULL before we
set associated. Change the order so any idle
check will find either one of them.

Doing this requires duplicating the TX sync
processing, but I already have a patch to
delete that completely and will submit that
as soon as my driver changes to no longer
require it are submitted.

Reported-by: Eliad Peller <eliad@wizery.com>
Tested-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: clean up asm/unaligned.h inclusion
Johannes Berg [Mon, 20 Feb 2012 10:38:41 +0000 (11:38 +0100)]
mac80211: clean up asm/unaligned.h inclusion

Some files implicitly get this via mesh.h
which itself doesn't need it, so move the
inclusion into the right files. Some other
files don't need it at all but include it,
so remove it from there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove redundant monitor_work enqueueing
Eliad Peller [Sun, 19 Feb 2012 13:26:10 +0000 (15:26 +0200)]
mac80211: remove redundant monitor_work enqueueing

ieee80211_restart_sta_timer() takes care for enqueueing
monitor_work if needed, so no need to do it again.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't queue monitor work for HW_CONNECTION_MONITOR
Eliad Peller [Sun, 19 Feb 2012 13:26:09 +0000 (15:26 +0200)]
mac80211: don't queue monitor work for HW_CONNECTION_MONITOR

Devices that monitor the connection in the hw don't need
the monitor work in the driver.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: Fix typo in mac80211_hwsim.c
Masanari Iida [Fri, 17 Feb 2012 14:04:10 +0000 (23:04 +0900)]
wireless: Fix typo in mac80211_hwsim.c

Correct spelling "occured" to "occurred" in
drivers/net/wireless/mac80211_hwsim.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add RT5372 chipset support
John Li [Fri, 17 Feb 2012 09:33:06 +0000 (17:33 +0800)]
rt2x00:Add RT5372 chipset support

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: avoid useless cast from (struct ath_rateset *) to (u8 *) and back
Pavel Roskin [Fri, 17 Feb 2012 03:14:45 +0000 (22:14 -0500)]
ath9k: avoid useless cast from (struct ath_rateset *) to (u8 *) and back

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Fix breakage in debug functions when built as a module
Larry Finger [Thu, 16 Feb 2012 18:14:36 +0000 (12:14 -0600)]
rtlwifi: Fix breakage in debug functions when built as a module

Since commit 481b9606, it has not been possible to invoke debugging
with any rtlwifi driver built as a module.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add VCO recalibration
John Li [Thu, 16 Feb 2012 13:40:57 +0000 (21:40 +0800)]
rt2x00:Add VCO recalibration

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix descriptor length for AR9462
Sujith Manoharan [Thu, 16 Feb 2012 06:23:00 +0000 (11:53 +0530)]
ath9k: Fix descriptor length for AR9462

Change the descriptor length to 24 and explicitly
set the control field 23 to zero. Not doing so would
result in dropping of frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix programming SYNTH4 for AR9462
Sujith Manoharan [Thu, 16 Feb 2012 06:22:50 +0000 (11:52 +0530)]
ath9k: Fix programming SYNTH4 for AR9462

The LONG_SHIFT_SELECT offset is different for AR9462 from
the other chip families. Fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Initialize NF values properly
Sujith Manoharan [Thu, 16 Feb 2012 06:22:44 +0000 (11:52 +0530)]
ath9k: Initialize NF values properly

Using AR_SREV_* macros for setting up the chip-specific NF
values will make adding support for new chips hard. Use separate
macros for each chip. Currently, AR9462 has the same value for
all NF limits.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove unused initvals
Sujith Manoharan [Thu, 16 Feb 2012 06:22:35 +0000 (11:52 +0530)]
ath9k: Remove unused initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix phyerr debug statistics
Sujith Manoharan [Thu, 16 Feb 2012 06:22:25 +0000 (11:52 +0530)]
ath9k: Fix phyerr debug statistics

Validate the phyerr value against the max. size of the
statistics array properly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Prettify recv debugfs file output
Sujith Manoharan [Thu, 16 Feb 2012 06:21:23 +0000 (11:51 +0530)]
ath9k: Prettify recv debugfs file output

Dumping the RSSI information in the middle of error
statistics is a bit misleading. Move them to the end.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add a debugfs file to display reset statistics
Sujith Manoharan [Thu, 16 Feb 2012 06:21:11 +0000 (11:51 +0530)]
ath9k: Add a debugfs file to display reset statistics

Location: <debugfs_path>/ieee80211/phy#/ath9k/reset

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Merge wiphy and misc debugfs files
Sujith Manoharan [Thu, 16 Feb 2012 06:21:02 +0000 (11:51 +0530)]
ath9k: Merge wiphy and misc debugfs files

This patch merges the 'wiphy' and 'misc' debugfs files
and consolidates the information.

Information about the current channel and other HT parameters
can be obtained from both mac80211 and iw. Remove such
redundant data.

The reset statistics have been removed, they will be re-added in
a subsequent patch (in a new debugfs file).

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove unnecessary variable initialization
Sujith Manoharan [Thu, 16 Feb 2012 06:20:55 +0000 (11:50 +0530)]
ath9k: Remove unnecessary variable initialization

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove duplicate initvals
Felix Fietkau [Wed, 15 Feb 2012 20:53:16 +0000 (21:53 +0100)]
ath9k_hw: remove duplicate initvals

Comparing SHA1 checksums of the initval tables has shown that there are many
tables that are 100% identical.

iniBank{0,1,2,3,7} and iniBB_RfGain are shared by AR5416, AR913x, AR9160
iniBank6 is shared between AR5416 and AR9160
iniBank6TPC is shared between AR913x and AR9160

iniPcieSerdes is the same for all AR9002 based devices

The CCK FIR coefficients are shared between AR9271 and AR9287

Getting rid of those duplicates saves about 7.5k uncompressed (on MIPS).

For AR9003 and later there are some duplicates as well, but I've decided to
leave them in for now, as the initvals for those chips are still actively
maintained by QCA.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add support for D-Link DWA-127 to rt2800usb.
Gertjan van Wingerde [Sat, 11 Feb 2012 20:58:09 +0000 (21:58 +0100)]
rt2x00: Add support for D-Link DWA-127 to rt2800usb.

This is an RT3070 based device.

Cc: <stable@vger.kernel.org>
Reported-by: Mikhail Kryshen <mikhail@kryshen.net>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 27 Feb 2012 18:30:45 +0000 (13:30 -0500)]
Merge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi

12 years agoath9k: remove unnecessary PS wrappers
Mohammed Shafi Shajakhan [Tue, 14 Feb 2012 13:09:19 +0000 (18:39 +0530)]
ath9k: remove unnecessary PS wrappers

ath_set_channel is called from ath9k_config which already has proper
PS wrappers

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove obsolete comments
Mohammed Shafi Shajakhan [Tue, 14 Feb 2012 13:09:18 +0000 (18:39 +0530)]
ath9k: remove obsolete comments

the corresponding code/logic was removed in
"ath9k: rework power state handling"

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k:Remove __raw_read and __raw_write
Jonathan Bither [Tue, 14 Feb 2012 02:47:45 +0000 (21:47 -0500)]
ath5k:Remove __raw_read and __raw_write

By swithing from our __raw_read and __raw_write functions to ioread32 and iowrite32,
benchmarks on my desk with iperf went from 11MBps to 18.1MBps using the AHB bus
on an EnGenius ECB3500 running OpenWRT.

Signed-off-by: Jonathan Bither <jonbither@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: restructure AP/GO mode API
Johannes Berg [Mon, 13 Feb 2012 14:17:18 +0000 (15:17 +0100)]
cfg80211: restructure AP/GO mode API

The AP/GO mode API isn't very clearly defined, it
has "set beacon" and "new beacon" etc.

Modify the API to the following:
 * start AP -- all settings
 * change beacon -- new beacon data
 * stop AP -- stop AP mode operation

This also reflects in the nl80211 API, rename
the commands there correspondingly (but keep
the old names for compatibility.)

Overall, this makes it much clearer what's going
on in the API.

Kalle developed the ath6kl changes, I created
the rest of the patch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove il_is_rfkill_hw
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:31 +0000 (11:23 +0100)]
iwlegacy: remove il_is_rfkill_hw

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: s/il_txq_mem/il_free_txq_mem/g
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:30 +0000 (11:23 +0100)]
iwlegacy: s/il_txq_mem/il_free_txq_mem/g

Previous name was confusing.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: s/S_RF_KILL_HW/S_RFKILL/g
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:29 +0000 (11:23 +0100)]
iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: small queue initializations cleanup
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:28 +0000 (11:23 +0100)]
iwlegacy: small queue initializations cleanup

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP
Stanislaw Gruszka [Tue, 14 Feb 2012 07:50:42 +0000 (08:50 +0100)]
iwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: small il4965_set_hw_ready cleanup
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:26 +0000 (11:23 +0100)]
iwlegacy: small il4965_set_hw_ready cleanup

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: check correct il_poll_bit error value
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:25 +0000 (11:23 +0100)]
iwlegacy: check correct il_poll_bit error value

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: do not grab nic access if rfkill
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:24 +0000 (11:23 +0100)]
iwlegacy: do not grab nic access if rfkill

If rfkill is on il_grab_nic_access() fail and we can not write to the
various registers during stop procedure. Write to those registers
unconditionally instead.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwleagcy: fix ident code damage
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:23 +0000 (11:23 +0100)]
iwleagcy: fix ident code damage

Using ident is not always good.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwleagcy: remove old comments
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:22 +0000 (11:23 +0100)]
iwleagcy: remove old comments

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: improve mac operation debuggability a bit
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:21 +0000 (11:23 +0100)]
iwlegacy: improve mac operation debuggability a bit

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: get rid of tx/rx traffic log
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:20 +0000 (11:23 +0100)]
iwlegacy: get rid of tx/rx traffic log

The same data can be gathered using monitor mode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge all ops structures into one
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:19 +0000 (11:23 +0100)]
iwlegacy: merge all ops structures into one

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge il_lib_ops into il_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:18 +0000 (11:23 +0100)]
iwlegacy: merge il_lib_ops into il_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove il_apm_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:17 +0000 (11:23 +0100)]
iwlegacy: remove il_apm_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: merge eeprom_ops into lib_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:16 +0000 (11:23 +0100)]
iwlegacy: merge eeprom_ops into lib_ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove temp_ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:15 +0000 (11:23 +0100)]
iwlegacy: remove temp_ops

Remove unneeded structure and cleanup temperature calibration routines
a bit.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: move debugfs_ops to il_priv
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:14 +0000 (11:23 +0100)]
iwlegacy: move debugfs_ops to il_priv

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: gather all 4965 handlers in one place
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:13 +0000 (11:23 +0100)]
iwlegacy: gather all 4965 handlers in one place

Handers belongs logically into 4965-mac.c file.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: regulatory_bands is not an ops
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:12 +0000 (11:23 +0100)]
iwlegacy: regulatory_bands is not an ops

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: use writeb,writel,readl directly
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:11 +0000 (11:23 +0100)]
iwlegacy: use writeb,writel,readl directly

That change will save us some CPU cycles at run time. Having
port-based I/O seems to be not possible for PCIe devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: cleanup/fix memory barriers
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:10 +0000 (11:23 +0100)]
iwlegacy: cleanup/fix memory barriers

wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().

What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiowb() is just
defined as compiler barrier. As iwlegacy devices are most likely
not used on anything other than x86, this is not so important
fix.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: always check if got h/w access before write
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:09 +0000 (11:23 +0100)]
iwlegacy: always check if got h/w access before write

Before we write to the device register always check if
_il_grap_nic_access() was successful.

Change type return type _il_grap_nic_access() to bool, and
add likely()/unlikely() statements.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: dump stack when fail to gain access to the device
Stanislaw Gruszka [Mon, 13 Feb 2012 10:23:08 +0000 (11:23 +0100)]
iwlegacy: dump stack when fail to gain access to the device

Print dump stack when the device is not responding. This should give
some more clue about the reason of failure. Also change the message we
print, since "MAC in deep sleep" is kinda confusing.

On the way add unlikely(), as fail to gain NIC access is hmm ...
unlikely.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192se firmware load can overflow target buffer
Tim Gardner [Fri, 10 Feb 2012 00:19:52 +0000 (18:19 -0600)]
rtlwifi: rtl8192se firmware load can overflow target buffer

Define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE which represents the
maximimum possible firmware file size. Use it in the definition
of the buffer which receives the firmware file data.

Set RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE closer to the actual size of
the firmware file, e.g., 90000 (down from hard coded 164000). The current
size of rtlwifi/rtl8192sefw.bin is 88856.

Set max_fw_size to RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE for the size limit
check. Fix the error case where max_fw_size is not cleared if the size
limit check fails.

Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: make sdio firmware filename specific
Arend van Spriel [Thu, 9 Feb 2012 20:09:09 +0000 (21:09 +0100)]
brcm80211: fmac: make sdio firmware filename specific

The sdio driver part uses firmware name brcmfmac.bin. With addition
of usb this name is too generic. This patch renames the filename
to brcmfmac-sdio.bin.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: add USB support for bcm43235/6/8 chipsets
Arend van Spriel [Thu, 9 Feb 2012 20:09:08 +0000 (21:09 +0100)]
brcm80211: fmac: add USB support for bcm43235/6/8 chipsets

This patch extends the use of the brcmfmac driver with support for
chipsets with a USB host interface. The first chipsets supported are
the bcm43235, bcm43236, and bcm43238 for which firmware has been
submitted.

This driver change has been successfully built for x86, x86_64,
ppc64, arm_le, and mips_be.

It has been tested successfully on x86 and x86_64.

Cc: M. Lambert <lambertm@westman.wave.ca>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()
Arend van Spriel [Thu, 9 Feb 2012 20:09:07 +0000 (21:09 +0100)]
brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()

This function is executed within irq context. The call spin_unlock_irq
does enable interrupts which is not desired in the irq context. This patch
replaces them using the spin_loc_irqsave and spin_unlock_irqrestore
functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: change allocation flag in brcmf_enq_event() function
Arend van Spriel [Thu, 9 Feb 2012 20:09:06 +0000 (21:09 +0100)]
brcm80211: fmac: change allocation flag in brcmf_enq_event() function

As the function is called from atomic context it should not do the
kzalloc call with GFP_KERNEL.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: update bus state in common driver part
Arend van Spriel [Thu, 9 Feb 2012 20:09:05 +0000 (21:09 +0100)]
brcm80211: fmac: update bus state in common driver part

The bus state is updated in the sdio bus init function, but it is
better to do it when the brcmf_bus_start() function is completed
successfully. The brcmf_netdev_open() function will return -EAGAIN
until the state is updated instead of calling brcmf_bus_start() to
avoid reentering that function.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true
Arend van Spriel [Thu, 9 Feb 2012 20:09:04 +0000 (21:09 +0100)]
brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true

The function brcmf_sdbrcm_bus_init() always returned success except for
firmware download failure. However, also when enabling SDIO function 2
is failing the function should return failure. This patch fixes that.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: move module entry points to dhd_linux.c
Arend van Spriel [Thu, 9 Feb 2012 20:09:03 +0000 (21:09 +0100)]
brcm80211: fmac: move module entry points to dhd_linux.c

The module_init/exit functions are moved to dhd_linux.c to prepare
for supporting multiple host interface types.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: use specific types in struct brcmf_bus
Arend van Spriel [Thu, 9 Feb 2012 20:09:02 +0000 (21:09 +0100)]
brcm80211: fmac: use specific types in struct brcmf_bus

The fields bus_priv and drvr are defined as void pointer. It is
preferred to have specific types for compiler type checking. To
prepare for other bus types the bus_priv field is defined as a
union containing the sdio bus private structure reference.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: make sure cancel_work_sync only called after INIT_WORK
Franky Lin [Thu, 9 Feb 2012 20:09:01 +0000 (21:09 +0100)]
brcm80211: fmac: make sure cancel_work_sync only called after INIT_WORK

INIT_WORK only gets called after brcmf_proto_attach returns
success. This dependency should be annotated in brcmf_detach to
avoid any error.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
12 years agobrcm80211: fmac: resolve smatch issues in brcmfmac code
Arend van Spriel [Thu, 9 Feb 2012 20:09:00 +0000 (21:09 +0100)]
brcm80211: fmac: resolve smatch issues in brcmfmac code

This patch resolves the following smatch issues:

wl_cfg80211.c +1377 brcmf_cfg80211_connect(65) warn: min_t truncates
here '(sme->ssid_len)' (4294967295 vs 9223372036854775807)
dhd_sdio.c +1275 brcmf_sdbrcm_rxglom(156) warn: min_t truncates here
'(pfirst->len)' (2147483647 vs 4294967295)
dhd_sdio.c +1457 brcmf_sdbrcm_rxglom(338) warn: min_t truncates here
'(pfirst->len)' (2147483647 vs 4294967295)
bcmsdh_sdmmc.c +300 brcmf_sdioh_request_buffer(10) warn: variable
dereferenced before check 'pkt' (see line 295)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove smatch warnings from brcmsmac code
Arend van Spriel [Thu, 9 Feb 2012 20:08:59 +0000 (21:08 +0100)]
brcm80211: smac: remove smatch warnings from brcmsmac code

The patch fixes following smatch warnings:

main.c +2902 brcms_b_read_objmem(11) info: ignoring unreachable code.
mac80211_if.c +1146 brcms_suspend(8) error: we previously assumed 'wl'
could be null (see line 1145)
srom.c +641 _initvars_srom_pci(16) error: potential null dereference
'entry'.  (kzalloc returns null)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: fix endless retry of A-MPDU transmissions
Arend van Spriel [Thu, 9 Feb 2012 20:08:58 +0000 (21:08 +0100)]
brcm80211: smac: fix endless retry of A-MPDU transmissions

The A-MPDU code checked against a retry limit, but it was using
the wrong variable to do so. This patch fixes this to assure
proper retry mechanism.

This problem had a side-effect causing the mac80211 flush callback
to remain waiting forever as well. That side effect has been fixed
by commit by Stanislaw Gruszka:

commit f96b08a7e6f69c0f0a576554df3df5b1b519c479
Date:   Tue Jan 17 12:38:50 2012 +0100

    brcmsmac: fix tx queue flush infinite loop

    Reference:
    https://bugzilla.kernel.org/show_bug.cgi?id=42576

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove redundant assignments from txpwrctrl_pwr_setup_nphy
Arend van Spriel [Thu, 9 Feb 2012 20:08:57 +0000 (21:08 +0100)]
brcm80211: smac: remove redundant assignments from txpwrctrl_pwr_setup_nphy

The function wlc_phy_txpwrctrl_pwr_setup_nphy() does assign a local
variable target_pwr_qtrdbm in several code paths, but in the end all
code paths are coming to an assignment of that variable which does
override all previous. So those early and redundant assignments have
been removed.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: fix unintended fallthru in wlc_phy_radio_init_2057()
Arend van Spriel [Thu, 9 Feb 2012 20:08:56 +0000 (21:08 +0100)]
brcm80211: smac: fix unintended fallthru in wlc_phy_radio_init_2057()

The radio initialization for 2057 rev 5 was using the incorrect
register table for the initialization. This patch fixes that.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: update the maintainers listed for brcm80211 drivers
Arend van Spriel [Thu, 9 Feb 2012 20:08:55 +0000 (21:08 +0100)]
brcm80211: update the maintainers listed for brcm80211 drivers

Henry Ptasinski is not working on the brcm80211 driver so taking
his name/email out of the MAINTAINERS file.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoCorrecting typos in rtlwifi/base.c
Tristan Pourcelot [Thu, 9 Feb 2012 13:48:09 +0000 (14:48 +0100)]
Correcting typos in rtlwifi/base.c

This patch correct some typos in a comment.

Signed-off-by: Tristan Pourcelot <tristan.pourcelot@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192c-common: rtl8192se: rtl8192de: Simplify if statements
Larry Finger [Thu, 9 Feb 2012 02:56:52 +0000 (20:56 -0600)]
rtlwifi: rtl8192c-common: rtl8192se: rtl8192de: Simplify if statements

Devendra Naga <devendra.aaru@gmail.com> submitted a patch for rtl8192c_common
to change the tests in _rtl92c_store_pwrIndex_diffrate_offset(). This patch
improves on those changes and applies similar modifications to drivers rtl8192se
and rtl8192de.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add debug message for new chipset
John Li [Wed, 8 Feb 2012 13:25:24 +0000 (21:25 +0800)]
rt2x00:Add debug message for new chipset

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Fix typo
John Li [Wed, 8 Feb 2012 13:19:01 +0000 (21:19 +0800)]
rt2x00:Fix typo

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi/rtl8192c: in _rtl92c_phy_calculate_bit_shift remove comparing bitmask against 1
Devendra.Naga [Tue, 31 Jan 2012 07:11:03 +0000 (02:11 -0500)]
rtlwifi/rtl8192c: in _rtl92c_phy_calculate_bit_shift remove comparing bitmask against 1

in _rtl92c_phy_calculate_bit_shift everytime the right shifted bitmask
is AND with 1 and compared against 1. i.e.
       if ((bitmask >> i) & 0x1 == 1)
               break;
which in the if condition is anyway becomes a 1 or 0.

Signed-off-by: Devendra.Naga <devendra.aaru@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Wed, 22 Feb 2012 19:44:50 +0000 (14:44 -0500)]
Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx

12 years agoiwlwifi: enable receiving beacons when not associated
Meenakshi Venkataraman [Wed, 8 Feb 2012 20:04:41 +0000 (12:04 -0800)]
iwlwifi: enable receiving beacons when not associated

If the firmware implements beacon filtering,
beacons are filtered when not associated. This causes
association failures on channels marked passive.

Enabling this flag indicates to the firmware to allow
the beacons to pass through when not associated only.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove un-necessary return
Wey-Yi Guy [Wed, 8 Feb 2012 23:57:39 +0000 (15:57 -0800)]
iwlwifi: remove un-necessary return

Already return 0, change to void

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: SRAM size moves from hw_params to cfg
Emmanuel Grumbach [Tue, 7 Feb 2012 10:56:26 +0000 (12:56 +0200)]
iwlwifi: SRAM size moves from hw_params to cfg

This will allow to set the hw_params after we fetch the uCode.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: save ucode capabilities in iwl_fw
Don Fry [Tue, 7 Feb 2012 01:06:07 +0000 (17:06 -0800)]
iwlwifi: save ucode capabilities in iwl_fw

The capabilities parsed from the ucode file are never saved.  Save
them in the iwl_fw structure.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: changes args to iwl_nic for firmware operations
Don Fry [Tue, 7 Feb 2012 22:21:32 +0000 (14:21 -0800)]
iwlwifi: changes args to iwl_nic for firmware operations

Remove the references to iwl_priv from the firmware request and
parsing routines.  They are generic to the nic.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: the transport knows its state
Emmanuel Grumbach [Mon, 6 Feb 2012 12:30:54 +0000 (14:30 +0200)]
iwlwifi: the transport knows its state

This allows to handle races such as Tx packets on their way to be
sent although the transport has been stopped already.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move event and err pointers to iwl_nic
Don Fry [Tue, 7 Feb 2012 22:03:55 +0000 (14:03 -0800)]
iwlwifi: move event and err pointers to iwl_nic

Move the ucode offset pointers to the iwl_nic as they are nic related.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: document the transport layer
Emmanuel Grumbach [Mon, 6 Feb 2012 14:41:58 +0000 (16:41 +0200)]
iwlwifi: document the transport layer

Fix a few typos in the existing comments too.
Enforce the comments with might_sleep.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: send testmode hcmd reply with rx header
Amit Beka [Wed, 8 Feb 2012 08:01:35 +0000 (10:01 +0200)]
iwlwifi: send testmode hcmd reply with rx header

When a host command is sent through testmode, the whole
reply (including rx header) is returned to the user, and not
only the payload of the rx.
Before this commit the length was buggy - the reply contained 4 bytes
after the end of the payload.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: fixes to testmode indirect access
Amit Beka [Sun, 5 Feb 2012 22:40:47 +0000 (00:40 +0200)]
iwlwifi: fixes to testmode indirect access

Fixed casting of buffer addressing, and added size to
the read method, like in __iwl_read_prph.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: use enhance_sensitivity from iwl_fw
Emmanuel Grumbach [Tue, 7 Feb 2012 08:55:46 +0000 (10:55 +0200)]
iwlwifi: use enhance_sensitivity from iwl_fw

Remove another dependency between the nic layer and the iwl_priv
struct.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: iwl_set_hw_params returns always 0
Emmanuel Grumbach [Fri, 17 Feb 2012 18:52:03 +0000 (10:52 -0800)]
iwlwifi: iwl_set_hw_params returns always 0

Remove the return value.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill iwl_down and s/__iwl_down/iwl_down
Emmanuel Grumbach [Fri, 17 Feb 2012 18:34:53 +0000 (10:34 -0800)]
iwlwifi: kill iwl_down and s/__iwl_down/iwl_down

iwl_down was just a wrapper around __iwl_down which was called from
one place only. Replace it to direct call to iwl_down. Add lockdep
warning in iwl_down to ensure it was called with the mutex held.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: change args to ucode routines
Don Fry [Tue, 7 Feb 2012 00:37:46 +0000 (16:37 -0800)]
iwlwifi: change args to ucode routines

Change the prameters to the ucode (de)allocate routines to iwl_nic as
they are not transport operations.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: Move ucode pointers to iwl_fw
Don Fry [Tue, 7 Feb 2012 23:00:12 +0000 (15:00 -0800)]
iwlwifi: Move ucode pointers to iwl_fw

The ucode image is a ucode related thing not a transport one.  Move them.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move firmware_loading_complete to iwl_nic
Don Fry [Tue, 7 Feb 2012 00:00:14 +0000 (16:00 -0800)]
iwlwifi: move firmware_loading_complete to iwl_nic

Move firmware_loading_complete from iwl_priv to iwl_nic and rename it
to more accurately reflect what it does.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move firmware_name to iwl_nic
Don Fry [Mon, 6 Feb 2012 23:57:40 +0000 (15:57 -0800)]
iwlwifi: move firmware_name to iwl_nic

Delete firmware_name from iwl_priv and use iwl_nic instead.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move fw_index from iwl_priv to iwl_nic
Don Fry [Mon, 6 Feb 2012 23:54:31 +0000 (15:54 -0800)]
iwlwifi: move fw_index from iwl_priv to iwl_nic

Delete fw_index from iwl_priv and use iwl_nic instead.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move ucode_ver to iwl_nic
Don Fry [Mon, 6 Feb 2012 23:51:15 +0000 (15:51 -0800)]
iwlwifi: move ucode_ver to iwl_nic

Delete ucode_ver from iwl_priv and use iwl_nic instead.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: create iwl_nic structure
Don Fry [Tue, 7 Feb 2012 22:45:58 +0000 (14:45 -0800)]
iwlwifi: create iwl_nic structure

Create iwl_nic structure and link it together.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: give PCIe its own lock
Johannes Berg [Sun, 5 Feb 2012 21:55:11 +0000 (13:55 -0800)]
iwlwifi: give PCIe its own lock

Instead of using a global lock, the PCIe transport
can use an own lock for its IRQ. This will make it
possible to not disable IRQs for the shared lock.
The lock is currently used throughout the code but
this can be improved even further by splitting up
the locking for the queues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move workqueue to priv
Johannes Berg [Fri, 17 Feb 2012 18:07:44 +0000 (10:07 -0800)]
iwlwifi: move workqueue to priv

In order to separate the different parts of the
driver better, we are reducing the shared data.
This moves the workqueue to "priv", and removes
it from the transport. To do this, simply use
schedule_work() in the transport.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: trace debug messages
Johannes Berg [Wed, 1 Feb 2012 05:08:37 +0000 (21:08 -0800)]
iwlwifi: trace debug messages

Make iwlwifi record all debug messages into
tracing, even if debug_level is not enabled.
Due to the lack of APIs, the debug messages
are now recorded up to a max length of 100,
the only one above that is the RXON which is
not needed if you trace the commands as well
as it only dumps the command contents.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: added reply data to testmode HCMD send
Amit Beka [Tue, 31 Jan 2012 13:30:39 +0000 (15:30 +0200)]
iwlwifi: added reply data to testmode HCMD send

The testmode command for host command send now replies
with a nl80211 message and the response it recieved from
the device.

This does not change the API directly, but adds a reply
to the testmode call.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: testmode new indirect RW API
Amit Beka [Wed, 25 Jan 2012 11:30:27 +0000 (13:30 +0200)]
iwlwifi: testmode new indirect RW API

Replaced the old SRAM and periphery indirect access functions
with a unified indirect memory access functions. These include
new IWL_TM_CMDs for buffer read/write/dump which replace the
SRAM read/dump commands, but the API for IWL_TM_CMD_INDIRECT_REG
read/write will now not be supported (returns error).

This also handles writing to periphery registers in 1-3 bytes.

Requires the corresponding patch in the library for the API change.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: log as error when error detected
Wey-Yi Guy [Fri, 3 Feb 2012 21:06:57 +0000 (13:06 -0800)]
iwlwifi: log as error when error detected

A lot of error conditions in testmode log as IWL_DEBUG_INFO which is not
logged by default. Change it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 15 Feb 2012 21:24:37 +0000 (16:24 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
net/mac80211/debugfs_sta.c
net/mac80211/sta_info.h

12 years agoath9k: stop on rates with idx -1 in ath9k rate control's .tx_status
Pavel Roskin [Sat, 11 Feb 2012 15:01:53 +0000 (10:01 -0500)]
ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status

Rate control algorithms are supposed to stop processing when they
encounter a rate with the index -1.  Checking for rate->count not being
zero is not enough.

Allowing a rate with negative index leads to memory corruption in
ath_debug_stat_rc().

One consequence of the bug is discussed at
https://bugzilla.redhat.com/show_bug.cgi?id=768639

Signed-off-by: Pavel Roskin <proski@gnu.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>