Commit graph

11590 commits

Author SHA1 Message Date
Marek Lindner f3d4505de5 ath9k: remove eeprom txgain override for minor version < 19
ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the
minor version is not 19 or above with a value of 0.
ar9002_hw_init_mode_gain_regs() relies on this information to
determine whether this is a high power wifi card or not. The override
caused the driver to always use the 'normal' power tables even for
high power devices if their minor version was not high enough. Thus
leading to reduced power output.

This isn't needed for the AR9285; the check originated with the
AR9280 setup code which requires the EEPROM version check.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Adrian Chadd <adrian@freebsd.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-12 13:45:02 -04:00
Gery Kahn 6f07b72ada wl12xx: fixes for hw_pg_ver and chip id reporting
Fix the value of PG version for 128x at sysfs, remove write permissions
from PG version (hw_pg_ver) in sysfs and add remove files
(hw_pg_ver,bt_coex_state) from sysfs while freeing hardware.
New macro names for register Fuse_data_2_1 depend on architecture.
Propagate chip id through wiphy in PLT mode which still not work of
a bug in ethtool.

Signed-off-by: Gery Kahn <geryk@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-12 09:22:49 +03:00
Shahar Levi 0a1d3abcc4 wl12xx: Add support to RX packets payload alignment
In case of QoS packets the packet payload isn't aligned to
4 bytes. In that case the mac80211 layer take care of that
via memmove() in ieee80211_deliver_skb().
Add support of copy packets from aggregation buffer to the
skbs with packet payload aligned care. In case of QoS packets
copy the packets in offset of 2 bytes guarantee payload aligned
to 4 bytes.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-12 09:22:49 +03:00
Mohammed Shafi Shajakhan 6a6767b046 ath9k: remove obselete comments
the comments are obselete as the virtual wiphy support was removed from
the driver

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-10 14:07:43 -04:00
Mohammed Shafi Shajakhan 32359e30a6 ath9k: optimize rate control statistics
for the ease of debugging, we display only the rate control statistics
for currently operating mode and bandwidth

Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-10 14:07:43 -04:00
Mohammed Shafi Shajakhan 9f3a35df3d ath9k_htc: minor clean-up
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-10 14:07:42 -04:00
Jouni Malinen 281ed297ff mac80211_hwsim: Fix RX status reporting for HT
RX_FLAG_HT must be included when reporting MCS rates. Without
this, mac80211 ended up dropping any frame sent at MCS index 12
or higher and that resulted in oddly random looking errors in
mac80211_hwsim tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-10 14:07:41 -04:00
John W. Linville 20adc1aecc Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath6kl 2011-08-10 13:51:19 -04:00
Kalle Valo ad226ec22b ath6kl: fix function name conflicts with ath9k
Stephen reported that compilation fails if both ath6kl and ath9k are
compiled in:

drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_start':
(.opd+0x600): multiple definition of `htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e40): first defined here
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_stop':
(.text+0x7b40): multiple definition of `.htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67b34): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_start':
(.text+0x7d18): multiple definition of `.htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67ba0): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_stop':
(.opd+0x5e8): multiple definition of `htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e28): first defined here

To fix this add ath6kl prefix to all public functions in htc.c.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-10 10:07:53 +03:00
John W. Linville 392e741939 Merge branch 'ath6kl-next' of master.kernel.org:/pub/scm/linux/kernel/git/kvalo/ath6kl 2011-08-09 16:02:26 -04:00
Larry Finger 53dd4b9329 b43: Remove EXPERIMENTAL designation from LP PHY selection
Since kernel 3.0, the problems with controlling b43 devices that have
low-power (LP) PHYs have been fixed and the EXPERIMENTAL designation
can be fixed.

This patch also fixes a typo as the device supports 802.11b communications.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:10 -04:00
Dan Carpenter 8888fb4d26 libertas: remove some dead code in if_spi_prog_helper_firmware()
We always hit the goto and skip the printk().  The original code does
the right thing even though it looks messy.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:09 -04:00
Helmut Schaa abc1199411 rt2x00: Fix PCI interrupt processing race on SMP systems
When toggle_irq is called for PCI devices to disable device interrupts
it used tasklet_disable to wait for a possibly running tasklet to finish.
However, on SMP systems the tasklet might still be scheduled on another CPU.
Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
before returning from toggle_irq.

Furthermore, it was possible that a tasklet reenabled its interrupt even
though interrupts have been disabled already. Fix this by checking the
DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
during tasklet processing.

While at it also enable/kill the TBTT and PRETBTT tasklets in the
toggle_irq callback and only use tasklet_kill in stop_queue to wait
for a currently scheduled beacon update before returning.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:08 -04:00
Larry Finger c3ccb3341e rtlwifi: Remove raw read/write routines from header
Now that the driver no longer uses the raw r/w routines, remove their definitions.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:08 -04:00
Larry Finger 886e14b65a rtlwifi: Eliminate raw reads and writes from PCIe portion
The PCIe driver used raw reads and writes on the PCIe hardware.
As all of these are only affecting the configuration space, all of
then can be converted to pci_{read,write}_config_XX calls.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:07 -04:00
Rajkumar Manoharan e8fe733684 ath9k: Use atomic reference count for interrupt ops
Let us enable/disable interrupts based on reference count.
By doing this we can ensure that interrupts are never be
enabled in the middle of tasklet processing. Instead of
addressing corner cases like "ath9k: avoid enabling interrupts
while processing rx", this approach handles it in generic manner.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:06 -04:00
Rajkumar Manoharan a844adfd7b ath9k_hw: Fix incorrect spur_freq_sd for AR9003
Spur frequency was incorrectly computed with 10Mhz offset
which could cause the filter would not notch out the spur
and also this could improve rx sensitivity in HT40.

Cc: Madhan Jaganathan <madhanj@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:06 -04:00
Rajkumar Manoharan b037b69326 ath9k: do not enable interrupt on set interrupt mask
At preset set_interrupt also enables interrupt after changing
mask. This is not necessary in all cases and also sometime it
breaks the assumption that interrupt was disabled. So let us
enable the interrupt explicity if it was disabled earlier.
This could also avoid unnecessary register ops and also helps
the follow up patch to have global ref count for interrupts ops.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:05 -04:00
Alex Hacker 8d7763b433 ath9k_hw: use register name in place of magic value
Signed-off-by: Alex Hacker <hacker@epn.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:04 -04:00
Amitkumar Karwar 5674fbb773 mwifiex: print driver version information
Add code to display driver version information in dmesg after
loading the driver successfully.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:03 -04:00
Daniel Drake 7e1f79a1f5 libertas: implement if_sdio runtime power management
The SDIO card is now fully powered down when the network interface is
brought down.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:03 -04:00
Daniel Drake d2e7b3425c libertas: disable functionality when interface is down
Modify the driver so that it does not function when the interface is
down, in preparation for runtime power management.

No commands can be run while the interface is down, so the ndo_dev_stop
routine now directly does all necessary work (including asking the device
to disconnect from the network and disabling multicast functionality)
directly.

power_save and power_restore hooks are added meaning that card drivers
can take steps to turn the device off when the interface is down.

The MAC address can now only be changed when all interfaces are down;
the new address will be programmed when an interface gets brought up.
This matches mac80211 behaviour.

Also, some small cleanups/simplifications were made in the surrounding
device handling logic.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:02 -04:00
Rajkumar Manoharan f74b9d365d ath9k_hw: Update AR9003 high_power tx gain table
The high_power tx gain table is changed to match the low_ob_db tx gain
table for both 5G and 2G.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:00 -04:00
Rajkumar Manoharan d116eb707c ath9k_hw: Update the radio parameters related to high_power
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:51:59 -04:00
Rajkumar Manoharan cca1fe1aed ath9k_hw: Optimize rx descriptor processing for AR9003
No need to process RxDone and ds_info status again in case
valid rx status is given.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:51:58 -04:00
Rajkumar Manoharan 0f9dc29821 ath9k: Remove virtual wiphy specific frame type
This patch cleanups virtual wiphy specific frametype structure

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:38 -04:00
Rajkumar Manoharan 3f4c4bdd9d ath9k: Dump modal eeprom header
Debugfs file location:
<debugfs_mnt>/ieee80211/phy#/ath9k/modal_eeprom

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:38 -04:00
Rajkumar Manoharan 580f010f1b ath9k: Dump base eeprom header
Debugfs file location:
<debugfs_mnt>/ieee80211/phy#/ath9k/base_eeprom

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:38 -04:00
Rajkumar Manoharan 1b37d3e61a ath9k_hw: Add dump_eeprom support for eeprom_def
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:38 -04:00
Rajkumar Manoharan 49c99520f3 ath9k_hw: Add dump_eeprom support for AR9287
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:37 -04:00
Rajkumar Manoharan 4f011a2e37 ath9k_hw: Add dump_eeprom support for eeprom_4k
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:37 -04:00
Rajkumar Manoharan 2652620201 ath9k_hw: Add dump_eeprom support for AR9003
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:37 -04:00
Hauke Mehrtens c027ed4cea b43: add core rev 17 used on bcma SoC.
This ieee80211 core was found on a Netgear wndr3400.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:42:36 -04:00
Raja Mani 197035737e ath6kl: Release the memory allocated for the firmware
Nowhere the firmware memory is freed, free it during
the device destroy process.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:24 +03:00
Raja Mani 9aa603578f ath6kl: Fix crash during the connection process
Sometimes, the network manager is failing to connect to the AP due
to the below kernel crash message. The reason behind this,
after issuing the connect command to the chip, the chip is sending
disconnect event and then immediately one connect event to the host
in some random cases.

The host driver resets all states (including cfg80211 state machine)
when it receives disconnect event from the chip. But, still the host
driver reports the next received connect event to cfg80211, at that time
cfg80211 SME state would have been in IDLE state, which was causing
the below kernel crash.

Now, host driver's sme state machine is checked every time before
delivering connect event to cfg80211

  WARNING: at net/wireless/sme.c:517 cfg80211_connect_result+0x10d/0x120()
  [..]
  Call Trace:
  [<c0145732>] warn_slowpath_common+0x72/0xa0
  [<c05d676d>] ? cfg80211_connect_result+0x10d/0x120
  [<c05d676d>] ? cfg80211_connect_result+0x10d/0x120
  [<c0145782>] warn_slowpath_null+0x22/0x30
  [<c05d676d>] cfg80211_connect_result+0x10d/0x120
  [<f83ff497>] ath6kl_cfg80211_connect_event+0x427/0x4f0 [ath6kl]
  [<c035d26a>] ? put_dec+0x2a/0xa0
  [<c035d645>] ? number+0x365/0x380
  [<c0154675>] ? mod_timer+0x135/0x260
  [<c035e00e>] ? format_decode+0x2fe/0x370
  [<c01263c8>] ? default_spin_lock_flags+0x8/0x10
  [<c05fd91f>] ? _raw_spin_lock_irqsave+0x2f/0x50
  [<c0146032>] ? console_unlock+0x172/0x1c0
  [<f8402659>] ath6kl_connect_event+0x89/0x400 [ath6kl]
  [<f840826e>] ath6kl_wmi_control_rx+0x98e/0x1d60 [ath6kl]
  [<c01335b5>] ? __wake_up+0x45/0x60
  [<f84053aa>] ath6kl_rx+0x56a/0x770 [ath6kl]
  [<c04d0242>] ? mmc_release_host+0x22/0x40
  [<c04d9329>] ? sdio_release_host+0x19/0x30
  [<f840a27a>] ? ath6kl_sdio_read_write_sync+0x7a/0xc0 [ath6kl]
  [<f83f82b1>] do_rx_completion+0x41/0x50 [ath6kl]
  [<f83faa6a>] htc_rxmsg_pending_handler+0x6ba/0xbd0 [ath6kl]
  [<f8404bb0>] ? ath6kl_tx_data_cleanup+0x30/0x30 [ath6kl]
  [<f840a1c0>] ? ath6kl_sdio_irq_handler+0x30/0x70 [ath6kl]
  [<f83f7cd5>] ath6kldev_intr_bh_handler+0x2a5/0x630 [ath6kl]
  [<f840a1c0>] ath6kl_sdio_irq_handler+0x30/0x70 [ath6kl]
  [<c04d97c7>] sdio_irq_thread+0xc7/0x2d0
  [<c013aeb0>] ? default_wake_function+0x10/0x20
  [<c012fc98>] ? __wake_up_common+0x48/0x70
  [<c04d9700>] ? sdio_claim_irq+0x200/0x200
  [<c0163854>] kthread+0x74/0x80
  [<c01637e0>] ? kthread_worker_fn+0x160/0x160
  [<c0604c06>] kernel_thread_helper+0x6/0x10

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:24 +03:00
Vasanthakumar Thiagarajan 91db35dae5 ath6kl: Cleanup void * in ath6kl_cfg80211_scan_node()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:24 +03:00
Vasanthakumar Thiagarajan 8a8bc5a440 ath6kl: Use ath6kl_cfg80211_scan_node() directly instead of function pointer
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:24 +03:00
Vasanthakumar Thiagarajan 77fccc78a0 ath6kl: Remove ath6kl_wmi_iterate_nodes()
Use wlan_iterate_nodes() directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 39dd3fcba2 ath6kl: Pass only the needed scan_table to ath6kl_wmi_iterate_nodes()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 852bd9d995 ath6kl: Move initialization/deinitialization of scan_table to appropriate functions
By having scan_table in struct ath6kl, it makes sense to move initialization
to ath6kl_init() and deinitialization to ath6kl_destroy().

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 9d0c6bcf46 ath6kl: Cleanup parameters of wlan_node_table_init()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 46ff8d5978 ath6kl: Remove ath6kl_wmi_get_current_bssid()
Use the bssid from ath6kl directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 70df051688 ath6kl: Remove bssid from struct wmi
This is nothing but bssid of struct ath6kl.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan e4c7ffcb95 ath6kl: Cleanup parameters for wlan_refresh_inactive_nodes()
And remove the reference to wmi in ath6kl_node_table.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:23 +03:00
Vasanthakumar Thiagarajan 7c3075e9ea ath6kl: Move scan table from wmi to ath6kl
It does not need to be in wmi

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Vasanthakumar Thiagarajan 2865785e96 ath6kl: Cleanup void *parent_dev in struct wmi
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Kalle Valo 37ca633507 ath6kl: change aggreation timeout message from an error to a debug message
When I connect to my Linksys WT610N AP supporting 11n I see a lot of
aggreation timeout errors:

[  408.885053] ath6kl: aggr timeout (st 3109 end 3140)
[  463.872108] ath6kl: aggr timeout (st 3671 end 3702)
[  495.010060] ath6kl: aggr timeout (st 3983 end 4014)
[  503.604047] ath6kl: aggr timeout (st 4065 end 0)
[  518.963047] ath6kl: aggr timeout (st 141 end 172)
[  525.014066] ath6kl: aggr timeout (st 205 end 236)
[  573.957051] ath6kl: aggr timeout (st 701 end 732)
[  585.019067] ath6kl: aggr timeout (st 816 end 847)

But still the connection seems to work. To not clutter the logs change
the error message to a debug message. But add a fixme comment so that
this will be investigated.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Kalle Valo f96efb5cb1 ath6kl: remove dependency to wireless extensions
ath6kl Kconfig still had dependencies to wext, remove those as they are
not needed anymore.

Now ath6kl should not have any wext code left. Time to have a beer and
celebrate this.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Kalle Valo 6fd1eacec1 ath6kl: fix crash when interface is closed but scan is ongoing
When ath6kl module was removed while a scan was ongoing the driver would
crash in ath6kl_cfg80211_scan_complete_event().

Fix the function not to iterate nodes when the scan is aborted. The nodes
are already freed when the module is being unloaded. This patch removes the
null check entirely as the wmi structure is not accessed anymore during
module unload.

Also fix a bug where the status was checked as a bitfield with '&' operator.
But it's not a bitfield, just a regular error code.

This is a port of my patch from ath6kl staging with the same title.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Kalle Valo cf104c2a20 ath6kl: fix atomicity in ath6kl_cfg80211_scan_node()
ath6kl_cfg80211_scan_node() was calling cfg80211_inform_bss_frame()
with CFP_KERNEL but the function is executed with a spin lock taken.
This is wrong and the function must use GFP_ATOMIC instead.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Kalle Valo b2c76bbe00 ath6kl: don't force foreground scan when connected
In my setup data transfer stalls when there's data transmission during
scan. After some testing I found out that using background scan
when connected to makes the problem go away. This is more like
a workaround than a proper fix, but as the stall is so severe the
workaround is justified.

With a dual band card this increases scan time when connected from
1.9s to 4.4s. When not connected the scan time is not affected and
is the same 1.9s.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Raja Mani 575b5f34aa ath6kl: Use bit field macros to maintain wlan enabled and disabled status
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:22 +03:00
Raja Mani c8790cbaea ath6kl: Avoid two memset to clear src and desr mac addr variable memory in ath6kl_wmi_dot11_hdr_remove()
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Raja Mani 5ba3ee48f2 ath6kl: Rearrange the variable and the value position in IF condition
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Raja Mani 2588f554f0 ath6kl: Print bad trailer data only when htc fails to parse trailer info
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan 58d92abc74 ath6kl: Remove unused struct ath6kl_async_reg_io_buffer
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan fcb820589f ath6kl: Move chk_irq_status_cnt from ath6kl_device to htc_target
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan 7520ceb724 ath6kl: Bypass reading irq status based on chk_irq_status_cnt
This is a regression.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan 50745af7eb ath6kl: Move scatter information from ath6kl_device to htc_target
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan 5be8824f28 ath6kl: Move block_sz and block_mask from ath6kl_device to htc_target
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:21 +03:00
Vasanthakumar Thiagarajan 3b2f5e5145 ath6kl: Move bundle size from ath6kl_device to htc_target
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan df45f7f927 ath6kl: Remove callback msg_pending() and used the function directly
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan 23b7840a1b ath6kl: Minor cleanup in ath6kldev_submit_scat_req()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan ca06cadb73 ath6kl: Remove ath6kldev_setup_msg_bndl()
Use appropriate hif function directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan 348a8fbce7 ath6kl: Merge scatter rw request functions into one
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan da220695f0 ath6kl: Refactor ath6kl_sdio_read_write_sync()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan 4a005c3ed0 ath6kl: Moe virt_scat from hif_dev_scat_sup_info to hif_scatter_req
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan cfeab10b11 ath6kl: Merge scatter gather setup functions for two method
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:20 +03:00
Vasanthakumar Thiagarajan 18a0f93e53 ath6kl: Move down scatter enable and cleanup functions
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan ac2bba019b ath6kl: Cleanup ath6kl_sdio_cleanup_scatter()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan def85c00c9 ath6kl: Cleanup ath6kl_sdio_enable_scatter()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan 3df505add2 ath6kl: Refactor refactor ath6kl_sdio_setup_scat_resource()
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan e041c7f9af ath6kl: Remove endpoint reference from hif_scatter_req
Endpoint id ffrom htc_packet can be used instead.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan 7c565b6f8c ath6kl: Remove useless flags in hif_scatter_req
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan d4df78904d ath6kl: Remove struct hif_scatter_req_priv
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan c630d18a5e ath6kl: Move ath6kl_sdio_async_rw_scatter() down to other hif_ops functions
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:19 +03:00
Vasanthakumar Thiagarajan f74a7361b8 ath6kl: cleanup callbacks for different scatter gather method
Define a hook in ath6kl_hif_ops for hif scatter gather mechanism.
When virtual scatter gather is used, call the respective function
directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09 19:45:18 +03:00
Kalle Valo bdcd817079 Add ath6kl cleaned up driver
Last May we started working on cleaning up ath6kl driver which is
currently in staging. The work has happened in a separate
ath6kl-cleanup tree:

http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary

After over 1100 (!) patches we have now reached a state where I would
like to start discussing about pushing the driver to the wireless
trees and replacing the staging driver.

The driver is now a lot smaller and looks like a proper Linux driver.
The size of the driver (measured with simple wc -l) dropped from 49
kLOC to 18 kLOC and the number of the .c and .h files dropped from 107
to 22. Most importantly the number of subdirectories reduced from 26
to zero :)

There are two remaining checkpatch warnings in the driver which we
decided to omit for now:

drivers/net/wireless/ath/ath6kl/debug.c:31:
  WARNING: printk() should include KERN_ facility level
drivers/net/wireless/ath/ath6kl/sdio.c:527:
  WARNING: msleep < 20ms can sleep for up to 20ms;
  see Documentation/timers/timers-howto.txt

The driver has endian annotations for all the hardware specific
structures and there are no sparse errors. Unfortunately I don't have
any big endian hardware to test that right now.

We have been testing the driver both on x86 and arm platforms. The
code is also compiled with sparc and parisc cross compilers.

Notable missing features compared to the current staging driver are:

o HCI over SDIO support
o nl80211 testmode
o firmware logging
o suspend support

Testmode, firmware logging and suspend support will be added soon. HCI
over SDIO support will be more difficult as the HCI driver needs to
share code with the wifi driver. This is something we need to research
more.

Also I want to point out the changes I did for signed endian support.
As I wasn't able to find any support for signed endian annotations I
decided to follow what NTFS has done and added my own. Grep for sle16
and sle32, especially from wmi.h.

Various people have been working on the cleanup, the hall of
fame based on number of patches is:

   543  Vasanthakumar Thiagarajan
   403  Raja Mani
   252  Kalle Valo
    16  Vivek Natarajan
    12  Suraj Sumangala
     3  Joe Perches
     2  Jouni Malinen

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Suraj Sumangala <surajs@qca.qualcomm.com>
Signed-off-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-08-09 19:45:18 +03:00
Felix Fietkau f749b94679 ath9k: use the new channel noise value for signal strength and survey info
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:20 -04:00
Felix Fietkau f23fba49b3 ath9k_hw: calculate a much better approximation of channel noise
Currently ath9k presents the internal calibrated noise floor as channel
noise measurement, however this results in highly chip specific values
that are only useful as relative measurements but do not resemble any
real channel noise values.

In order to give a much better approximation of the real channel noise,
add the difference between the measured noise floor and the nominal
chip specific noise floor to the default minimum channel noise value,
which is currently used to calculate the signal strength from the RSSI
value. This may not be 100% accurate, but it's much better than what's
there before.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:19 -04:00
Daniel Drake dfb72c4fda libertas_usb: program OLPC EC wakeup mask for wake-on-WLAN
OLPC power management code has recently gone upstream. This piece
completes the puzzle for libertas_usb, which now programs the OLPC EC
for wlan wakeups when they have been requested.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:18 -04:00
Felix Fietkau 9c204b46c7 ath9k_hw: do not limit initial tx power to 20 dbm
When testing for tx power, bypass the default limits.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:17 -04:00
Felix Fietkau 071bfefd68 ath9k_hw: fix calculated runtime tx power limit
Use the previously calculated maximum of all rates instead of just the one
from the lowest rate of the selected PHY mode.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:16 -04:00
Felix Fietkau e832bf1032 ath9k_hw: remove the tx power index offset
It is always 0

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:15 -04:00
Pavel Roskin bb1f3ad969 ath5k: remove last references to "softc"
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:14 -04:00
Pavel Roskin 931be260ed ath5k: clean up base.h and its use
Remove unnecessary includes from base.h.  Add includes to other files as
necessary.  Don't include base.h unless needed.

Move declarations for functions in base.c from ath5k.h to base.h.

Use a better named define to protect base.h against double inclusion.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:14 -04:00
Pavel Roskin d601d9cace ath: fix spelling of Grenada
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:13 -04:00
Pavel Roskin aea05140d3 orinoco_cs: be more careful when matching cards with ID 0x0156:0x0002
Without CONFIG_HERMES_PRISM, only match cards that have "Version 01.01"
as the third product ID.  Those have Agere firmware.

With CONFIG_HERMES_PRISM, match all 0x0156:0x0002 cards.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:12 -04:00
Pavel Roskin fb3d93616a hostap_cs: support cards with "Version 01.02" as third product ID
Cards with numeric ID 0x0156:0x0002 and third ID "Version 01.02" can be
assumed to have Intersil firmware.  Cards with Agere firmware use
"Version 01.01".

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:11 -04:00
Pavel Roskin ea7a03cff3 b43legacy: report core number
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:10 -04:00
Pavel Roskin 191d6a8cc2 b43legacy: remove 64-bit DMA support
Devices supported by b43legacy don't support 64-bit DMA.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:08 -04:00
Wey-Yi Guy ae7f9a740b iwlagn: support v2 of enhanced sensitivity table
Add support for v2 of enhanced sensitivity table for 2000 series products

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:07 -04:00
Wey-Yi Guy e7515ba154 iwlagn: change default sensitivity value for 5000 and 6000 series
Update the default sensitivity value for both 5000 and 6000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:06 -04:00
Johannes Berg c6baf7fb40 iwlagn: support new P2P implementation
The previous P2P implementation turned out to
not work well and new uCode capabilities were
added to support P2P. Modify the driver to
take advantage of those, and also discover P2P
support automatically based on a uCode flag
instead of having a Kconfig symbol for P2P.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:04 -04:00
Johannes Berg 4d2a5d0ecd iwlagn: move context init after firmware loading
The availability of contexts depends on the
firmware capabilities. Currently only the
presence of the second context depends on it,
but soon P2P support will also be different.
Move the context initialisation code to the
firmware-dependent setup before registering
with mac80211 to make it easier to handle.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:04 -04:00
Johannes Berg ca9a460569 iwlagn: bump firmware API for some devices
We're working on improvements for the firmware
for some devices, and need to bump the API for
those since they won't be backward compatible
completely (the earlier patch reserving queue
10 for P2P).

Bump the API version to 6 for those devices
but don't warn users of version 5 yet.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:03 -04:00
Johannes Berg 5d7969bf2b iwlagn: separate firmware version warning
We sometimes need to support new firmware API for
a while before we can publish them since testing
them fully takes a long time. We could keep all
the new code private, but that causes plenty of
problems and sometimes we can give a pre-release
version of firmware to people who need to test.
However, when we just bump the API version, the
driver will warn everybody that their firmware is
outdated, when in fact it isn't. (Currently our
case for this doesn't really change the API but
bumping the API version is necessary because the
firmware isn't fully backward compatible)

In order to handle this in the future, add a new
"api_ok" version; only below this will the driver
warn that the uCode is too old.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:02 -04:00
Wey-Yi Guy 306584c038 iwlagn: Remove ht40 support from 5.2GHz for _bgn devices
For _bgn device, remove ht40 support for 5.2GHz, it is probably ok since
the "band" is not support but just feel strange.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:02 -04:00
Wey-Yi Guy 946572b294 iwlagn: default smps mode for 1000 series device
1000 series are 1x2 devices, the old default using static smps which only
use single antenna for rx, set the default to dynamic smps.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:01 -04:00
Johannes Berg 72c04ce016 iwlagn: reserve queue 10 for TX during scan dwell
New uCode images will use queue 10 for TX
during scan (for P2P offchannel operation
scan). We'll bump the API version of those,
but before we need to reserve queue 10 and
stop using it for aggregation.

To simplify the code, always reserve it,
we could continue using it on older uCode
images but that'd be rather complicated.
Also, we'll set it up to map to the right
FIFO as needed later, but as we don't use
the queue now that doesn't hurt.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:04:00 -04:00
Pavel Roskin 32c254645f ath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value
When checking for the band, use channel->band.

Change ath5k_hw_nic_wakeup() and ath5k_channel_ok() to take
ieee80211_channel.  Change ath5k_hw_radio_revision() to take
ieee80211_band.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:03:59 -04:00
Pavel Roskin 8d44a823c8 ath5k: remove most references to XR
XR is a proprietary feature of the chipset.  It's not supported and
should not be supported.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:03:59 -04:00
Pavel Roskin 2972cc1895 ath5k: remove unused and write-only structures and fields
struct ath5k_avg_val is unused.

In struct ath5k_hw, lladdr, ah_radar and ah_mac_revision are write-only,
rxbufsize is unused, ah_phy is write-only and referenced by unused
macros.

In struct ath5k_vif, lladdr is write-only.

Remove AR5K_TUNE_RADAR_ALERT, which has no effect.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:03:58 -04:00
Pavel Roskin eb93e89182 ath9k: remove all references to subsysid, it's never used
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 16:03:51 -04:00
Sergei Shtylyov 581c9c4f71 ath9k: use pci_dev->subsystem_device
The driver reads PCI subsystem ID from the PCI configuration register while it's
already stored by the PCI subsystem in the 'subsystem_device' field of 'struct
pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:29:22 -04:00
Bing Zhao 26aaa4a0e9 mwifiex: remove redundant variable scan_table_idx
mwifiex_get_bss_info() routine updates variable 'info->scan_table_idx'
but it is never used.

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-08-08 14:29:20 -04:00
Daniel Drake 8e92f2acac libertas_usb: use USB interface as parent device
Currently, "udevadm info -a -p /sys/class/net/wlan0" doesn't mention
the usb8xxx or libertas driver anywhere. This makes writing udev rules
a bit uncomfortable.

Using the USB interface as the parent device corrects the hierarchy.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:31 -04:00
Daniel Drake 49fee69204 libertas: link mesh device to wiphy
The mesh device is now exposed as an interface of the wiphy.
This exposes the mesh device to the cfg80211 interface, allowing
mesh channel selection to be reimplemented, and available to
NetworkManager as it was before.

Some header tweaking was needed in order to implement lbs_mesh_activated().

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:31 -04:00
Bing Zhao 67a50035b3 mwifiex: remove wireless.h inclusion and fix resulting bugs
replace IW_MAX_AP & IW_CUSTOM_MAX with local definitions
and remove usage of struct iw_statistics.

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:28 -04:00
Johannes Berg bb9b08af06 mwifiex: add wext include
In trying to remove the wext includes from mac80211
and cfg80211 I found that mwifiex currently uses
them. This is wrong, it shouldn't, but to not break
it completely include wext there.

Please remove this and fix all the resulting bugs.

Cc: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:25 -04:00
Johannes Berg 9090e167d0 wl1251: remove wext dependencies
This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:21 -04:00
Johannes Berg 3b40c04071 wl12xx: remove wext dependencies
This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:19 -04:00
Johannes Berg 029111e1c6 rndis_wlan: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:18 -04:00
Johannes Berg 6cff689e74 b43legacy: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:17 -04:00
Johannes Berg 9a5a133df3 b43: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:16 -04:00
Johannes Berg 2ee33f378d ath5k: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:26:15 -04:00
Johannes Berg e2a772fe47 iwlegacy: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:25:05 -04:00
Johannes Berg 29a34f92b5 iwlagn: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:25:02 -04:00
Johannes Berg 262eb9b223 cfg80211: split wext compatibility to separate header
A lot of drivers erroneously use wext constants
and don't notice since cfg80211.h includes them.
Make this more split up so drivers needing wext
compatibility from cfg80211 need to explicitly
include that from cfg80211-wext.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08 14:24:59 -04:00
John W. Linville a5d5a91477 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2011-08-03 09:18:21 -04:00
Wey-Yi Guy f352910822 iwlagn: 5000 do not support idle mode
5000 series has issue supporting power save idle mode:

commit	9dc2153315

iwlwifi: always support idle mode for agn devices

For agn devices, always support idle mode which help power
consumption in idle unassociated state.

the above changes cause 5000 become not stable when power management is "on"

http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2312

Cc: stable@kernel.org #2.6.39, #3.0.0
Reported-by: Devin J Pohly <djpohly+iwl@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-02 13:50:56 -04:00
Stanislaw Gruszka 00898a4726 rt2x00: fix usage of NULL queue
We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug
was introduced by commit 62fe778412
"rt2x00: Fix stuck queue in tx failure case" .

Cc: stable@kernel.org # 3.0+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-02 13:48:14 -04:00
Helmut Schaa 449f94eadc rt2x00: Fix compilation without CONFIG_RT2X00_LIB_CRYPTO
This was introduced by commit
77b5621bac (rt2x00: Don't use queue entry
as parameter when creating TX descriptor.)

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-02 13:48:14 -04:00
Emmanuel Grumbach cc1a93e68f iwlagn: sysfs couldn't find the priv pointer
This bug has been introduced by:
d593411084
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Mon Jul 11 10:48:51 2011 +0300

    iwlagn: simplify the bus architecture

Revert part of the buggy patch: dev_get_drvdata will now return
iwl_priv as it did before the patch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-02 13:46:43 -04:00
Stanislaw Gruszka b52398b6e4 rt2x00: rt2800: fix zeroing skb structure
We should clear skb->data not skb itself. Bug was introduced by:
commit 0b8004aa12 "rt2x00: Properly
reserve room for descriptors in skbs".

Cc: stable@kernel.org # 2.6.36+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.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>
2011-08-01 13:46:48 -04:00
Larry Finger b6b67df3f2 rtlwifi: Fix kernel oops on ARM SOC
This driver uses information from the self member of the pci_bus struct to
get information regarding the bridge to which the PCIe device is attached.
Unfortunately, this member is not established on all architectures, which
leads to a kernel oops.

Skipping the entire block that uses the self member to determine the bridge
vendor will only affect RTL8192DE devices as that driver sets the ASPM support
flag differently when the bridge vendor is Intel. If the self member is
available, there is no functional change.

This patch fixes Bugzilla No. 40212.

Reported-by: Hubert Liao <liao.hubertt@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [back to 2.6.38]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01 13:46:47 -04:00
Stanislaw Gruszka d4930086bd ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabled
We receive many bug reports about system hang during suspend/resume
when ath9k driver is in use. Adrian Chadd remarked that this problem
happens on systems that have ASPM disabled.

To do not hit the bug, skip doing ->config_pci_powersave magic if PCIe
downstream port device, which ath9k device is connected to, has ASPM
disabled.

Bug was introduced by:

commit 53bc7aa08b
Author: Vivek Natarajan <vnatarajan@atheros.com>
Date:   Mon Apr 5 14:48:04 2010 +0530

    ath9k: Add support for newer AR9285 chipsets.

Patch should address:
https://bugzilla.kernel.org/show_bug.cgi?id=37462
https://bugzilla.kernel.org/show_bug.cgi?id=37082
https://bugzilla.redhat.com/show_bug.cgi?id=697157

however I did not receive confirmation about that, except from Camilo
Mesias, whose system stops hang regularly with this patch (but still
hangs from time to time, but this is probably some other bug).

Tested-by: Camilo Mesias <camilo@mesias.co.uk>
Cc: stable@kernel.org # 2.6.35+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01 13:46:46 -04:00
Stanislaw Gruszka 17e859a899 iwlegacy: set tx power after rxon_assoc
If settings of tx power was deferred during scan or changing channel we
have to setup them during commit rxon. Fix problem on 3945 (4965 already
has this fix).

Optimize code to apply tx settings only when tx power was actually
changed.

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01 13:46:45 -04:00
Felix Fietkau c1227340ca ath9k: initialize tx chainmask before testing channel tx power values
With an uninitialized chainmask, the per-channel power will only contain
the power limits for a single chain instead of the combined tx power.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01 13:46:44 -04:00
Linus Torvalds d5eab9152a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
  tg3: Remove 5719 jumbo frames and TSO blocks
  tg3: Break larger frags into 4k chunks for 5719
  tg3: Add tx BD budgeting code
  tg3: Consolidate code that calls tg3_tx_set_bd()
  tg3: Add partial fragment unmapping code
  tg3: Generalize tg3_skb_error_unmap()
  tg3: Remove short DMA check for 1st fragment
  tg3: Simplify tx bd assignments
  tg3: Reintroduce tg3_tx_ring_info
  ASIX: Use only 11 bits of header for data size
  ASIX: Simplify condition in rx_fixup()
  Fix cdc-phonet build
  bonding: reduce noise during init
  bonding: fix string comparison errors
  net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
  net: add IFF_SKB_TX_SHARED flag to priv_flags
  net: sock_sendmsg_nosec() is static
  forcedeth: fix vlans
  gianfar: fix bug caused by 87c288c6e9
  gro: Only reset frag0 when skb can be pulled
  ...
2011-07-28 05:58:19 -07:00
Neil Horman 550fd08c2c net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Karsten Keil <isdn@linux-pingi.de>
CC: "David S. Miller" <davem@davemloft.net>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Patrick McHardy <kaber@trash.net>
CC: Krzysztof Halasa <khc@pm.waw.pl>
CC: "John W. Linville" <linville@tuxdriver.com>
CC: Greg Kroah-Hartman <gregkh@suse.de>
CC: Marcel Holtmann <marcel@holtmann.org>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-27 22:39:30 -07:00
David S. Miller b49179c071 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-07-27 22:18:47 -07:00
Arun Sharma 60063497a9 atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-26 16:49:47 -07:00
John W. Linville e5036c2575 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-07-26 17:05:55 -04:00
Pavel Roskin e61b52d130 b43: fix invalid memory access in b43_ssb_remove()
wldev is freed in b43_one_core_detach() and should not be accessed after
that call.  Keep wldev->dev in a local variable.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-26 16:27:31 -04:00
Rafał Miłecki 6f89062a66 b43: bcma: drop BROKEN
We've fixed the last issue with BCMA support which caused memory
corruption on loading and unloading b43. Support for BCMA in b43 was
tested with 14e4:4353, 14e4:4357, 14e4:4727 and 14e4:4331. First two
cards (BCM43224 and BCM43225) are supported.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-26 16:27:31 -04:00
Rafał Miłecki f76f424353 b43: bus: fix memory corruption when setting driver's data
Fixes bug described in:
https://bugzilla.kernel.org/show_bug.cgi?id=39172

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-26 16:27:30 -04:00
Linus Torvalds d3ec4844d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)
2011-07-25 13:56:39 -07:00
David S. Miller 2629313398 iwlwifi: Fix build with CONFIG_PM disabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-24 13:09:32 -07:00
John W. Linville 41bf37117b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-07-22 17:51:16 -04:00
Rafał Miłecki 8c95b74d8d b43legacy: dma: cache translation (routing bits)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 10:47:10 -04:00
Pavel Roskin bb78c71d6c ath5k: use get_unaligned_le32() in ath5k_write_pwr_to_pdadc_table()
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:16 -04:00
Pavel Roskin c5f3f45c49 ath5k: remove ath5k_hw_get_capability(), don't use VEOL on AR5210
There are only two capabilities we need, and both are trivial to find.

ath5k_hw_hasbssidmask() is true on AR5212, but not on AR5210 or AR5211.

ath5k_hw_hasveol() is true on AR5211 and AR5212, but not on AR5210,
according to the HAL source.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:15 -04:00
Pavel Roskin fabba04806 ath5k: merge ath5k_{init, deinit}_hw() with their thin wrappers
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:14 -04:00
Rafał Miłecki 24aad3f4c8 b43: (un)initialize driver on the BCMA bus
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:14 -04:00
Rafał Miłecki eb90e9e85c b43: bcma: get DMA translation bits
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:13 -04:00
Rafał Miłecki a9770a815d ssb: return correct translation bit for 64-bit DMA
Remove b43's workarounds at the same time. Other users of
ssb_dma_translation do not support any 64-bit DMA devices, so they are
not affected.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:12 -04:00
Rafał Miłecki 78c1ee7e61 b43: disable parity check on BCMA devices
Analyze of MMIO dumps from BCM43224, BCM43225, BCM4313 and BCM4331 has
shown that wl disables parity check for all that cards. This is required
for receiving any packets from the hardware.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-22 09:51:11 -04:00
Joe Perches 292b11926f rtlwifi: Convert printks to pr_<level>
Use the current logging styles.
Add pr_fmt where appropriate.
Remove now unnecessary prefixes from printks.
Convert hard coded prefix to __func__.
Add a missing "\n" to a format.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:05 -04:00
Felix Fietkau 6054069a03 ath9k_hw: validate and fix broken eeprom chainmask settings
Some devices (e.g. Ubiquiti AirRouter) ship with broken EEPROM chainmask
data, which breaks the initial calibration after a hardware reset.
To fix this, mask the eeprom chainmask with the chainmask of the chip,
and use the chip chainmask if the result is zero.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:04 -04:00
Amitkumar Karwar a049093600 mwifiex: disable auto deep sleep before unloading the driver
Since the auto deep sleep mode has been enabled at driver init time
we should disable it at driver unloading to shutdown the function
gracefully.

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-07-21 14:52:04 -04:00
Amitkumar Karwar df3b124bdb mwifiex: check SDIO multi-port aggregation buffer room correctly
We should consider current packet length also while checking
Tx aggregation buffer room.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:03 -04:00
Amitkumar Karwar 4e3c44207f mwifiex: put multicast/broadcast packets to the same RA
For ad-hoc mode, RA is created for each peer connected. In case of
multicast traffic new RA will be created for each multicast
address. While processing Tx packets we have to go through this
RA list. We can avoid some RA nodes by sharing same RA for both
multicast and broadcast packets.

Therefore "memset(0xff)" is used to treat multicast packet as broadcast
one while choosing RA.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:02 -04:00
Emmanuel Grumbach 1e89cbac16 iwlagn: probe would crash with DEBUG_SHIRQ
This is since my patch:

    iwlagn: introduce transport layer and implement rx_init

The IRQ is requested before the locks are initialized, hence the crash.
Initialize the tasklet before we request the IRQ on the way.

Reported-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:41:07 -07:00
Wey-Yi Guy d62b39e105 iwlagn: remove "disable otp refresh" W/A
Remove the "disable otp refresh" work-around, not needed anymore.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:32:38 -07:00
Johannes Berg e1b1c0875d iwlagn: rename iwlagn_set_dynamic_key
We now have iwlagn_set_dynamic_key() and
iwl_set_dynamic_key() which is confusing,
rename the former to iwlagn_send_sta_key()
to better reflect what it does -- it only
sends a command and doesn't change driver
state.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:32:03 -07:00
Johannes Berg bbb05cb55a iwlagn: track beacon interval sent to device
Sometimes, when mac80211 changes the beacon
interval or when it isn't yet set in mac80211
before association, the uCode will sysassert
because we send it confusing RXON timing vs.
PAN parameters. To fix this, track the last
beacon interval sent to the device and use
that in PAN parameter calculations.

This fixes a bug during P2P group formation
as a client (and possibly association to a
regular AP) while connected to another AP.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:54 -07:00
Wey-Yi Guy 21489ec2f1 iwlagn: write iq invert register for 105/135 device
For 105/135 series of devices, we need to do I/Q invert just like 2000
series devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:39 -07:00
Johannes Berg c8ac61cf6e iwlagn: implement WoWLAN
Implement WoWLAN support in iwlagn. The device
supports a number of wakeup triggers and can do
GTK rekeying when asleep (if HW crypto is used).
Unfortunately, we need to disconnect from the AP
after resume since we can't yet get all the info
out of the wowlan uCode to stay connected safely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:31 -07:00
Johannes Berg 5a3d9882b8 iwlagn: rewrite HW crypto
As I just discovered while doing WoWLAN, HW crypto
is done wrong for GTKs: they should be programmed
for the AP station ID (in the managed mode case)
and the HW can actually deal with multiple group
keys per station as well (which is useful in IBSS
RSN but that I've chosen not to use this).

To fix all this, modify the way keys are sent to
the device and key offsets are allocated. After
these changes, key offsets are stored into the
hw_key_idx which we can then track for the key
lifetime, not relying on our sta_cmd array. WEP
default keys get special treatment, of course.

Additionally, since I had the API for it, we can
now pre-fill TKIP phase 1 keys for RX now that we
can obtain the P1K from mac80211, a capability I
had added for WoWLAN initially.

Finally, some keys simply don't need to be added
into the device's key cache -- a key that won't
be used for RX is only needed in the TX header,
so "pretend" to have accepted any key without
adding it into the device -- no need to use up
key space there for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:25 -07:00
Johannes Berg 0bfe9895d4 iwlagn: remove forgotten debugfs function
It seems that due to merge issues between different
trees or so this function prototype wasn't removed
when it should have been, do it now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:10 -07:00
Wey-Yi Guy 898ed67be0 iwlagn: remove un-necessary "_agn"
After driver split, extra _agn in priv structure is no needed, remove it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:01 -07:00
Johannes Berg a920bffb88 iwlagn: remove keyinfo cache
iwlagn keeps a copy of key stuff internally but
never actually uses it, so remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:30:53 -07:00
Wey-Yi Guy c10e2c102f iwlagn: testmode fixed rate available for testmode only
Move tm_fixed_rate inside CONFIG_IWLWIFI_DEVICE_SVTOOL and only
available when the option is enable.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:30:36 -07:00
Emmanuel Grumbach b09b296ddd iwlagn: add comment to warn about WoWLAN in resume / suspend flows
WoWLAN may need the NIC even after suspend. One should not do anything to the
NIC in the bus level, since one cannot check whether WoWLAN is enabled or not.
Same for resume.

Add a simple comment to the code to warn about this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:30:27 -07:00
Emmanuel Grumbach c1c81401de iwlagn: iwl_bus holds drv_data as void * instead of iwl_priv
The price to pay is the access to the log system. Therefore logs from bus layer
are sent by dev_printk instead of IWL_XXXX.

Rename bus->priv to bus->drv_data to make the separation even clearer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:30:07 -07:00
Emmanuel Grumbach d593411084 iwlagn: simplify the bus architecture
Call iwl_probe with a ready iwl_bus struct. This means that the bus layer
assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to
iwl_probe.

The device specific struct is allocated together with the common iwl_bus struct
by the bus specific layer. The pointer to the aggregate struct is passed to the
upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus.
The private data given to the PCI subsystem is now iwl_bus and not iwl_priv.

Provide bus_* inliners on the way in order  to simplify the syntax.

Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the
external of the bus layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:55 -07:00
Emmanuel Grumbach 41c5054266 iwlagn: transport layer receives struct iwl_trans*
It still holds a pointer to iwl_priv. But hopefully this will disappear at some point.
Also add the multiple inclusion protection to iwl-trans.h that was forgotten.
Move iwl-trans structures to iwl-trans.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:48 -07:00
Emmanuel Grumbach 0286cee0d2 iwlagn: move iwl_prepare_card_hw to the transport layer
This function is really related to the transport layer - move it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:35 -07:00
Emmanuel Grumbach 392f8b789a iwlagn: move more functions from the start flow to the transport layer
Basically all the nic_init flow should be in the transport layer.
iwl_prepare_card_hw will move to the transport too in a separate patch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:22 -07:00
Emmanuel Grumbach 48d42c4269 iwlagn: SCD configuration for AMPDU moves to transport layer
All the configurations of the HW for AMPDU are now in the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:12 -07:00
Wey-Yi Guy 2e27799621 iwlagn: radio sensor offset in le16 format
For temperature offset calibration, send radio sensor offset in le16 format

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:29:03 -07:00
Wey-Yi Guy ad3f71244c iwlagn: define valid init calibration mask
Use the valid calibration mask for init calibration

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:28:51 -07:00
Wey-Yi Guy a21321c154 iwlagn: remove legacy calibration command
IWL_PHY_CALIBRATE_DIFF_GAIN_CMD is for legacy device, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:28:35 -07:00
Wey-Yi Guy df2a4dc802 iwlagn: set correct calibration flag
Set calibration config flag for complete notification

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:28:24 -07:00
Emmanuel Grumbach 6bd4dba3d2 iwlagn: kill iwlagn_setup_deferred_work
Since iwlagn_setup_deferred_work is always called, fold it into
iwl_setup_deferred_work. BT related works are setup by the new
bt_setup_deferred_work lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21 07:28:03 -07:00
Emmanuel Grumbach 8d30119346 iwlagn: kill iwlagn_rx_handler_setup
Since iwlagn_rx_handler_setup is always called, fold it into
iwl_rx_handler_setup. BT related handlers are setup by the new
bt_rx_handler_setup lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21 07:27:55 -07:00
Emmanuel Grumbach 56d90f4c8a iwlagn: add kick_nic API to transport layer
kick_nic means to remove the RESET bit from the embedded CPU

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21 07:27:45 -07:00
Phil Carmody 497888cf69 treewide: fix potentially dangerous trailing ';' in #defined values/expressions
All these are instances of
  #define NAME value;
or
  #define NAME(params_opt) value;

These of course fail to build when used in contexts like
  if(foo $OP NAME)
  while(bar $OP NAME)
and may silently generate the wrong code in contexts such as
  foo = NAME + 1;    /* foo = value; + 1; */
  bar = NAME - 1;    /* bar = value; - 1; */
  baz = NAME & quux; /* baz = value; & quux; */

Reported on comp.lang.c,
Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
Initial analysis of the dangers provided by Keith Thompson in that thread.

There are many more instances of more complicated macros having unnecessary
trailing semicolons, but this pile seems to be all of the cases of simple
values suffering from the problem. (Thus things that are likely to be found
in one of the contexts above, more complicated ones aren't.)

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-21 14:10:00 +02:00
Daniel Drake d931998669 libertas: only enable mesh when interface is active
Previously, the mesh was running whenever the appropriate hardware
and firmware was present.

Now we only run the mesh when the interface is running.

Also simplifies interface management a little.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:41 -04:00
Daniel Drake 3db4f98938 libertas: mesh: misc cleanup
Remove unused blindlist code.

Mark a few items const and static where possible. Involved some
code re-ordering, but no code changes.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:40 -04:00
Andy Shevchenko 037b559a16 wireless: mwifiex: print hw address via %pM
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:40 -04:00
Andy Shevchenko 8f895026e8 wireless: ath9k: use %pM to print MAC
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: ath9k-devel@lists.ath9k.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:39 -04:00
Andy Shevchenko 1d15b5f2d3 wireless: rtlwifi: throw away MAC_FMT and use %pM instead
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:38 -04:00
Pavel Roskin 70126f6105 carl9170: fix sparse warnings enabled by CONFIG_SPARSE_RCU_POINTER
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:37 -04:00
Pavel Roskin e0d687bd9d ath5k: merge ath5k_hw and ath5k_softc
Both ath5k_hw and ath5k_softc represent one instance of the hardware.
This duplication is historical and is not needed anymore.

Keep the name "ath5k_hw" for the merged structure and "ah" for the
variable pointing to it.  "ath5k_hw" is shorter than "ath5k_softc", more
descriptive and more widely used.

Put the combined structure to ath5k.h where the old ath5k_softc used to
be. Move some code from base.h to ath5k.h as needed.

Remove memory allocation for struct ath5k_hw and the corresponding error
handling.  Merge iobase and ah_iobase fields.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:33 -04:00
Rafał Miłecki 491735929b b43: bcma: implement full core reset
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 17:03:12 -04:00
Rafał Miłecki 2729df2555 b43: correctly display longer chipsets ids
Some of the newer Broadcom chipsets have longe names like BCM43224,
BCM43225, etc. However Broadcom decided to keep using u16 for storing
them. Use %X or %d depending on chip_id value to avoid BCMA8D8, etc.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:50:01 -04:00
Rafał Miłecki 0b5dd734d3 b43: HT-PHY: fix masks in radio ctl
Old masks were causing ugly, delayed lock ups.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:57 -04:00
Rafał Miłecki 40c6226967 b43: bcma: read info about supported bands
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:56 -04:00
Rafał Miłecki 124cc11175 b43: bcma: define 80211 core specific IO status bits
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:55 -04:00
Rafał Miłecki b473bc1767 b43: HT-PHY: fix typo in 0x2059 radio init
Following operation was incorrectly translated:
 radio_read(0x0011) -> 0xffff
radio_write(0x0011) <- 0xfff7

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:52 -04:00
Rafał Miłecki 49ac26fa5b b43: HT-PHY: find channel entry with regs data
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:51 -04:00
Rafał Miłecki 315a685f26 b43: HT-PHY: switch to channel after enabling radio
Also change the default channel to 11. This is the first channel closed
driver switches to.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 16:49:50 -04:00
Rafał Miłecki 3667787410 b43: use agent R/W ops for BCMA_IOCTL
BCMA_IOCTL is register in agent (AKA wrapper) core, we need to use
special R/W ops for it.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19 15:43:40 -04:00
Rajkumar Manoharan 02c5172c31 ath9k: Fix some smatch warnings
drivers/net/wireless/ath/ath9k/hif_usb.c +135 hif_usb_mgmt_cb(6) warn:
variable dereferenced before check 'cmd'
drivers/net/wireless/ath/ath9k/btcoex.c +77 ath9k_hw_init_btcoex_hw(38)
error: buffer overflow 'ah->hw_gen_timers.gen_timer_index' 32 <=
2009813776

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18 14:29:46 -04:00
Rajkumar Manoharan 5479de6e87 ath9k: Fix sparse warnings
drivers/net/wireless/ath/ath9k/init.c:199:21: warning: context imbalance
in 'ath9k_reg_rmw' - different lock contexts for basic block
drivers/net/wireless/ath/ath9k/xmit.c:1175:31: warning: context
imbalance in 'ath_drain_txq_list' - unexpected unlock
drivers/net/wireless/ath/ath9k/xmit.c:2047:23: warning: context
imbalance in 'ath_tx_process_buffer' - unexpected unlock
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3041:24: warning: cast to
restricted __le32

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18 14:29:45 -04:00
Rafał Miłecki 0901edb758 b43: bus: drop inline from SSB functions
We use all that functions by pointers only. This forces compiler to
create additional duplicated functions that are not inline.
Noticed by Michael in similar bcma code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18 14:29:44 -04:00
Christian Lamparter 5829656728 carl9170: set beacon xmit power to the max
Harshal Chhaya discovered during network tests, that
several of his clients dropped-off the network. The
captured packets shows that the beacons sent by the
AP are at a much lower power than the other data
packets.

The reason for this mishap: The driver never updated
the beacon phy register, so all beacons were always
sent at the lowest power.

Reference: http://marc.info/?l=linux-wireless&m=131067225105801
Reported-by: Harshal Chhaya <harshal@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18 14:29:44 -04:00
Christian Lamparter 943c33996f carl9170: move beacon_update into tx.c
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18 14:29:43 -04:00