Commit Graph

31074 Commits (24b78d0f49b94f658e8bae707c158962535053dd)

Author SHA1 Message Date
John W. Linville ca994a36f5 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
2012-02-15 16:24:37 -05:00
Pavel Roskin 2504a6423b 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>
2012-02-15 13:56:15 -05:00
Amitkumar Karwar 6670f15b1f mwifiex: clear previous security setting during association
Driver maintains different flags for WEP, WPA, WPA2 security modes.
Appropriate flag is set using security information provided in
connect request. mwifiex_is_network_compatible() routine uses them
to check if driver's setting is compatible with AP. Association is
aborted if the routine fails.

For some corner cases, it is observed that association is failed
even for valid security information based on association history.
This patch fixes the problem by clearing previous security setting
during each association.

We should set WEP key provided in connect request as default tx key.
This missing change is also added here.

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>
2012-02-15 13:56:15 -05:00
Simon Graham c27111e5b8 rtlwifi: Modify rtl_pci_init to return 0 on success
Fixes problem where caller would think routine succeeded when it failed
leading to divide by zero panic.

Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-09 15:17:29 -05:00
John W. Linville 12325280df rtlwifi: Modify rtl_pci_init to return 0 on success
Fixes problem where caller would think routine succeeded when it failed
leading to divide by zero panic.

(This also reverts an earlier attempt, commit 42bc0c97 "rtlwifi: Return
correct failure code on error". -- JWL)

Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-09 14:49:37 -05:00
Simon Graham 42bc0c9716 rtlwifi: Return correct failure code on error
Callers of rtl_pci_init expect zero to be returned on error. Returning
the error code leads to, amongst other things, divide by zero panics
attempting to use the ring size that is set to zero.

Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 16:07:24 -05:00
Simon Graham 7f66c2f93e rtlwifi: Handle previous allocation failures when freeing device memory
Handle previous allocation failures when freeing device memory

Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:34 -05:00
Gertjan van Wingerde 77c06c2cb4 rt2x00: Correctly set txmixer_gain in RT3572 channel switching.
Align with the v2.5.0.0 Ralink RT3572 driver.

Save the EEPROM txmixer_gain values inside the rt2800 driver data structure
and use it throughout the code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:32 -05:00
Gertjan van Wingerde 58b8ae14d5 rt2x00: Fix RT3572 channel switch RFCSR 7 programming.
Align with the v2.5.0.0 Ralink RT3572 driver.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:31 -05:00
Gertjan van Wingerde 0cd461efcc rt2x00: Align RT3572 channel switch RFCSR 1 programming with Ralink driver.
Align with the v2.5.0.0 Ralink RT3572 driver.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:30 -05:00
Gertjan van Wingerde 569ffa5634 rt2x00: Fix RFCSR 12 & 13 programming on RT3572 channel switching.
Align with v2.5.0.0 Ralink RT3572 driver for 2.4GHz band channel switch.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:30 -05:00
Gertjan van Wingerde 5d137dff36 rt2x00: Use saved BBP 25 and 26 values when configuring channel on RT3572.
This brings the rt2800 channel switching code for RT3572 closer to the
v2.5.0.0 Ralink RT3572 driver.

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>
2012-02-08 15:26:29 -05:00
Gertjan van Wingerde bef453dc9c rt2x00: Update comment on freq_offset field in struct rt2x00_dev.
The comment states that the field is only used for rt61pci and rt73usb.
However, it is now used by rt2800pci and rt2800usb as well, so the
comment is not correct anymore.

Update the comment to not state any low-level drivers anymore.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08 15:26:28 -05:00
Gertjan van Wingerde 3a1c01288e rt2x00: Use struct rt2x00_dev driver data in rt2800{pci,usb}.
Start using the struct rt2x00_dev driver data in rt2800 for the calibration
data.

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>
2012-02-08 15:26:28 -05:00
Gertjan van Wingerde 1ebbc48520 rt2x00: Introduce concept of driver data in struct rt2x00_dev.
We are getting more and more fields in struct rt2x00_dev that are
specific to one or two of the low-level drivers. Instead of putting
these fields inside the main structure and thus clobbering all low-level
drivers with these fields, introduce the concept of driver data inside
struct rt2x00_dev, whose size is indicated by the low-level driver and
which can be populated by the low-level driver.

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>
2012-02-08 15:26:27 -05:00
Tomas Vanek e81a7bd555 zd1211rw: firmware needs duration_id set to zero for non-pspoll frames
Some devices (iwl5100) cannot connect to zd1211rw based AP. It appears that
zd1211 firmware messes up duration_id field if it is not set to zero by driver.

Sniffing traffic shows that zd1211 is transmitting frames with duration_id bits
14 and 15 set and other bits appearing random. Setting duration_id at driver to
zero results zd1211 outputting sane duration_id. This means that firmware is
setting correct values itself and expects duration_id to be zero in first
place.

Looking at vendor driver shows that only PSPoll frames have duration_id set by
driver, for other frames duration_id left zero.

Original bug-report and attached patch at:
  http://sourceforge.net/mailarchive/message.php?msg_id=28759111

Reported-by: Tomas Vanek <Tomas.Vanek@fbl.cz>
[modified original patch from bug-report, added check for pspoll frame]
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-07 14:43:15 -05:00
Stanislaw Gruszka 1023f3bc7b iwlegacy: remove set_hw_params callback
We do not need that callback, settings parameters can be done locally.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:14 -05:00
Stanislaw Gruszka 00ea99e1d8 iwlegacy: remove struct il_tx_info
It's just wrapper to sk_buff pointers ...

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:13 -05:00
Stanislaw Gruszka 89ef1ed2d2 iwlegacy: merge il_base_params into il_cfg
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:12 -05:00
Stanislaw Gruszka c39ae9fd50 iwlegacy: move ops out of config
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka 8300719603 iwlegacy: get rid of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka 20c47eba70 iwlegacy: remove il_setup_interface()
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:10 -05:00
Stanislaw Gruszka dee9a09eb3 iwlegacy: get rid of ctx->is_active
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:09 -05:00
Stanislaw Gruszka eb123af3d1 iwlegacy: get rid of ctx->ac_to_queue
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:08 -05:00
Stanislaw Gruszka b75b3a70a6 iwlegacy: get rid of ctx->ac_to_fifo
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:07 -05:00
Stanislaw Gruszka 1c03c4620e iwlegacy: move ht out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:07 -05:00
Stanislaw Gruszka 8d44f2bd75 iwlegacy: move qos_data out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:06 -05:00
Stanislaw Gruszka 8c9c48d5a9 iwlegacy: remove ctx interface_modes
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:05 -05:00
Stanislaw Gruszka fd6415bcfb iwlegacy: get rid of ctx->station_flags
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:04 -05:00
Stanislaw Gruszka d735f9213d iwlegacy: move wep_keys out of context
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:03 -05:00
Stanislaw Gruszka d1e14e9424 iwlegacy: get rid of mcast_queue
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:03 -05:00
Stanislaw Gruszka 6aa0c25435 iwlegacy: get rid of ctxid
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:02 -05:00
Stanislaw Gruszka 0f8b90f526 iwlegacy: get rid of *_devtype
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:01 -05:00
Stanislaw Gruszka b16db50a6d iwlegacy: move bcast_sta_id to hw_params
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:00 -05:00
Stanislaw Gruszka 8f9e564553 iwlegacy: get rid of ap_sta_id
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka d98e294231 iwlegacy: get rid of wep_key_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka b96ed60cd0 iwlegacy: get rid of qos_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:58 -05:00
Stanislaw Gruszka 5e349f0296 iwlegacy: get rid of rxon_assoc_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:57 -05:00
Stanislaw Gruszka 63d0f0c551 iwlegacy: get rid of ctx->rxon_timing_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:56 -05:00
Stanislaw Gruszka 6122d18236 iwlegacy: get rid of ctx->rxon_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:55 -05:00
Stanislaw Gruszka c8b03958d4 iwlegacy: move rxon commands out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:55 -05:00
Amitkumar Karwar caf60a6c95 mwifiex: update correct dtim_period in dump_station()
Earlier we were using dtim period extracted from scan response
buffer provided by FW in scan operation. But it is observed that
sometimes the buffer doesn't contain dtim period tlv, and wrong
value (0) was sent to user space.

After association FW will start listening to beacon frames of
connected AP and store dtim period. Therefore we can get it from
FW in dump_station() instead of using wrong value obtained in
scanning.

Redundant code after adapting new approach for dtim period is
also removed in this patch.

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>
2012-02-06 14:55:54 -05:00
Amitkumar Karwar f3c8d2591f mwifiex: cleanup in snmp_mib command preparation code
1) Remove unnecessary switch case usage.
2) Replace "X=cpu_to_le16(le16_to_cpu(X) + Y)" by "le16_add_cpu(X, Y)"
3) Declare "ul_temp" variable as u16 instead of u32 to avoid
unnecessary typecasting

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>
2012-02-06 14:55:53 -05:00
Tim Gardner 3d86b93064 rtlwifi: Fix PCI probe error path orphaned memory
Memory allocated by ieee80211_alloc_hw() will get orphaned
if any subsequent initializations fail.

Also don't pci_set_drvdata(pdev, NULL) until just before disabling
the PCI device. Functions called by rtl_deinit_core(hw) may eventually need
the context (when its actually implemented).

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: John W. Linville <linville@tuxdriver.com>
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>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:52 -05:00
Amitkumar Karwar 3dc5e17518 mwifiex: enable HT operating mode
This patch sets default adapter channel_type as HT. Hence the device
will opearate in HT mode.

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>
2012-02-06 14:55:51 -05:00
Amitkumar Karwar 477778bb0e mwifiex: fix NULL pointer dereference in set_channel()
In set_channel() callback handler, "priv" pointer is derived from
net_device. Sometimes net_device pointer coming from the stack
is NULL which causes kernel crash.
This patch fixes the problem by deriving "priv" from wiphy
when net_device pointer is NULL.

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>
2012-02-06 14:55:50 -05:00
Yogesh Ashok Powar 197a4e4e1f mwl8k: Remove BSSID from the firmware when the BSS is stopped
Using command DEL_MAC_ADDR, remove the mac address of the BSS
when it is stopped i.e the corresponding vif is removed. Without
this, the stale bss entry will still be maintained in the firmware
which causes issues when the BSS's are recreated.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:42 -05:00
Dan Carpenter 291689fcfb ath9k: cleanup a min_t() cast
If the firmware was over 2G, it would cause memory corruption and the
system would die here.  Obviously we all know the firmware isn't going
to be that large but static checkers get upset.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:42 -05:00
Larry Finger 3eda95de19 rtlwifi: Remove extra debugging message accidentally left in
In commit b0302aba81, an extra debugging
message that is spamming the logs was not deleted before submission.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:09 -05:00
Masanari Iida 5aff4e74dc rtlwifi: Fix typo in dm.c
Correct a spelling "disconnet" to "disconnect" in
drivers/net/wireless/rtlwifi/rtl8192de/dm.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:08 -05:00