dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

9520 Commits

Author SHA1 Message Date
Christian Lamparter c9e57f0fdc carl9170: add missing return-value check
This patch adds a forgotten bail-out path.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:12 -05:00
Bob Copeland bb007554fe ath5k: fix cycle counter inconsistent locking
ath5k_reset is called from process context and takes the cc_lock
with plain spin_lock(), but cc_lock can also be taken from tasklets
in softirq context.  Thus we need to at least use spin_lock_bh.

This fixes the following lockdep warning:

[   19.967874] sky2 0000:01:00.0: eth0: enabling interface
[   19.982761] ieee80211 phy0: device now idle
[   20.904809] NET: Registered protocol family 17
[   21.243857] ieee80211 phy0: device no longer idle - scanning
[   21.404343]
[   21.404346] =================================
[   21.404450] [ INFO: inconsistent lock state ]
[   21.404518] 2.6.37-rc7-wl+ #242
[   21.404582] ---------------------------------
[   21.404650] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[   21.404721] kworker/u:4/982 [HC0[0]:SC1[3]:HE1:SE0] takes:
[   21.404792]  (&(&common->cc_lock)->rlock){+.?...}, at: [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011] {SOFTIRQ-ON-W} state was registered at:
[   21.405011]   [<c105cadd>] __lock_acquire+0x62f/0x13c1
[   21.405011]   [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]   [<c12c978d>] _raw_spin_lock+0x45/0x72
[   21.405011]   [<f8111533>] ath5k_reset+0x2c0/0x349 [ath5k]
[   21.405011]   [<f8111a7a>] ath5k_start+0xb8/0x139 [ath5k]
[   21.405011]   [<f849c714>] ieee80211_do_open+0x13f/0x819 [mac80211]
[   21.405011]   [<f849ce51>] ieee80211_open+0x63/0x66 [mac80211]
[   21.405011]   [<c1258b2e>] __dev_open+0x8d/0xb6
[   21.405011]   [<c1255c64>] __dev_change_flags+0x9d/0x114
[   21.405011]   [<c1258a75>] dev_change_flags+0x18/0x44
[   21.405011]   [<c1262990>] do_setlink+0x23f/0x521
[   21.405011]   [<c1262d58>] rtnl_setlink+0xe6/0xea
[   21.405011]   [<c126347c>] rtnetlink_rcv_msg+0x18a/0x1a0
[   21.405011]   [<c126d5f0>] netlink_rcv_skb+0x35/0x7b
[   21.405011]   [<c12632eb>] rtnetlink_rcv+0x20/0x27
[   21.405011]   [<c126d370>] netlink_unicast+0x1bb/0x21e
[   21.405011]   [<c126db21>] netlink_sendmsg+0x23b/0x288
[   21.405011]   [<c124823c>] sock_sendmsg+0xac/0xc4
[   21.405011]   [<c1248680>] sys_sendmsg+0x152/0x1a2
[   21.405011]   [<c1249b0d>] sys_socketcall+0x214/0x275
[   21.405011]   [<c10029d0>] sysenter_do_call+0x12/0x36
[   21.405011] irq event stamp: 138032
[   21.405011] hardirqs last  enabled at (138032): [<c12ca252>] _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011] hardirqs last disabled at (138031): [<c12c98cc>] _raw_spin_lock_irqsave+0x18/0x7e
[   21.405011] softirqs last  enabled at (138024): [<f84a570e>] ieee80211_tx_skb+0x47/0x49 [mac80211]
[   21.405011] softirqs last disabled at (138027): [<c100452b>] do_softirq+0x63/0xb4
[   21.405011]
[   21.405011] other info that might help us debug this:
[   21.405011] 3 locks held by kworker/u:4/982:
[   21.405011]  #0:  (name){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #1:  ((&(&local->scan_work)->work)){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
[   21.405011]  #2:  (&local->mtx){+.+.+.}, at: [<f84920fb>] ieee80211_scan_work+0x32/0x4a4 [mac80211]
[   21.405011]
[   21.405011] stack backtrace:
[   21.405011] Pid: 982, comm: kworker/u:4 Not tainted 2.6.37-rc7-wl+ #242
[   21.405011] Call Trace:
[   21.405011]  [<c12c6e68>] ? printk+0x1d/0x25
[   21.405011]  [<c105a742>] print_usage_bug+0x181/0x18b
[   21.405011]  [<c105b196>] ? check_usage_forwards+0x0/0xb6
[   21.405011]  [<c105a9ec>] mark_lock+0x2a0/0x4aa
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c105ca68>] __lock_acquire+0x5ba/0x13c1
[   21.405011]  [<c1059eed>] ? trace_hardirqs_off_caller+0x18/0x8d
[   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
[   21.405011]  [<c1050411>] ? local_clock+0x2c/0x4f
[   21.405011]  [<c1059e00>] ? save_trace+0x2/0xa0
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<c12ca252>] ? _raw_spin_unlock_irqrestore+0x3b/0x5e
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105d944>] lock_acquire+0xd5/0xf1
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c12c9b1a>] _raw_spin_lock_bh+0x4a/0x77
[   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
[   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
[   21.405011]  [<f8113496>] ath5k_tasklet_ani+0x1d/0x27 [ath5k]
[   21.405011]  [<c1037304>] tasklet_action+0x96/0x137
[   21.405011]  [<c10379b5>] __do_softirq+0xde/0x1c3
[   21.405011]  [<c10b0cef>] ? arch_get_unmapped_area_topdown+0x3b/0x127
[   21.405011]  [<c10378d7>] ? __do_softirq+0x0/0x1c3
[   21.405011]  <IRQ>  [<c1036dee>] ? irq_exit+0x3d/0x49
[   21.405011]  [<c1003b4f>] ? do_IRQ+0x98/0xac
[   21.405011]  [<c1002eee>] ? common_interrupt+0x2e/0x34
[   21.405011]  [<c103007b>] ? sys_unshare+0x57/0x226
[   21.405011]  [<c1047fee>] ? queue_delayed_work+0x1/0x27
[   21.405011]  [<f84a83a0>] ? ieee80211_queue_delayed_work+0x2e/0x33 [mac80211]
[   21.405011]  [<f8492528>] ? ieee80211_scan_work+0x45f/0x4a4 [mac80211]
[   21.405011]  [<c104620e>] ? process_one_work+0x26e/0x41b
[   21.405011]  [<c1046158>] ? process_one_work+0x1b8/0x41b
[   21.405011]  [<f84920c9>] ? ieee80211_scan_work+0x0/0x4a4 [mac80211]
[   21.405011]  [<c10466b6>] ? worker_thread+0x18a/0x2a5
[   21.405011]  [<c12ca25e>] ? _raw_spin_unlock_irqrestore+0x47/0x5e
[   21.405011]  [<c104652c>] ? worker_thread+0x0/0x2a5
[   21.405011]  [<c104abe7>] ? kthread+0x67/0x6c
[   21.405011]  [<c104ab80>] ? kthread+0x0/0x6c
[   21.405011]  [<c1002efa>] ? kernel_thread_helper+0x6/0x10

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:12 -05:00
Brian Prodoehl 44cefead80 ath9k: fix spur mitigation no-spur case for AR9002
For the AR9002, the spur frequency read from the EEPROM is mangled
before being compared against AR_NO_SPUR.  This results in the driver
trying to set up the spur mitigation for bogus spurs, rather than
cleanly breaking out.

Signed-off-by: Brian Prodoehl <bprodoehl@nomadio.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:12 -05:00
Akinobu Mita ad9082adfc airo: use simple_write_to_buffer
Simplify write file operation for /proc files by using
simple_write_to_buffer().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:12 -05:00
Senthil Balasubramanian 52671e43db ath9k: spin_lock_bh is not required within tasklet context.
Disabling BH is not required while running from a tasklet context
and so replace spin_lock_bh with just spin_lock.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:11 -05:00
Stanislaw Gruszka cd017f25e3 iwlagn: fix scan tx antenna setting on 5Ghz band
Looks that we do not set correctly antennas when scanning
on 5Ghz band and when bluetooth is enabled, because
priv->cfg->scan_tx_antennas[band] is only defined for
IEEE80211_BAND_2GHZ.

To fix we check band before limiting antennas to first one.
This allow to remove hard coded cfg->scan_tx_antennas[band].

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:11 -05:00
Bruno Randolf cd2c548652 ath5k: Move mac80211 functions into new file
Move mac80211 functions into new file mac80211-ops.c to have a better
separation and to make base.c smaller.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:35:11 -05:00
Stanislaw Gruszka 554d1d027b iwlagn: enable only rfkill interrupt when device is down
Since commit 6cd0b1cb87 "iwlagn: fix
hw-rfkill while the interface is down", we enable interrupts when
device is not ready to receive them. However hardware, when it is in
some inconsistent state, can generate other than rfkill interrupts
and crash the system. I can reproduce crash with "kernel BUG at
drivers/net/wireless/iwlwifi/iwl-agn.c:1010!" message, when forcing
firmware restarts.

To fix only enable rfkill interrupt when down device and after probe.
I checked patch on laptop with 5100 device, rfkill change is still
passed to user space when device is down.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-04 14:15:08 -05:00
Justin P. Mattock 62e45c14fb wireless: comment typo fix diable -> disable.
The below patch fixes a typo "diable" to "disable". Please let me know if this
is correct or not.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-03 16:05:53 +01:00
Stefan Weil e8a8b252fb Fix spelling mistakes in comments
milisecond -> millisecond
 meassge -> message

Cc: Kalle Valo <kvalo@adurom.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-03 13:51:58 +01:00
David S. Miller 17f7f4d9fc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/ipv4/fib_frontend.c
2010-12-26 22:37:05 -08:00
Linus Torvalds d7c1255a3a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  ipv4: dont create routes on down devices
  epic100: hamachi: yellowfin: Fix skb allocation size
  sundance: Fix oopses with corrupted skb_shared_info
  Revert "ipv4: Allow configuring subnets as local addresses"
  USB: mcs7830: return negative if auto negotiate fails
  irda: prevent integer underflow in IRLMP_ENUMDEVICES
  tcp: fix listening_get_next()
  atl1c: Do not use legacy PCI power management
  mac80211: fix mesh forwarding
  MAINTAINERS: email address change
  net: Fix range checks in tcf_valid_offset().
  net_sched: sch_sfq: fix allot handling
  hostap: remove netif_stop_queue from init
  mac80211/rt2x00: add ieee80211_tx_status_ni()
  typhoon: memory corruption in typhoon_get_drvinfo()
  net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
  net_sched: always clone skbs
  ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
  netlink: fix gcc -Wconversion compilation warning
  asix: add USB ID for Logitec LAN-GTJ U2A
  ...
2010-12-26 12:06:56 -08:00
Wey-Yi Guy 003ea98195 iwlwifi: remove reference to Gen2
The correct name should be used for the newer devices, remove
reference to Gen2

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-26 10:09:02 -08:00
Johannes Berg bdb84fec61 iwlagn: fix FH error
# iw wlan0 interface add moni0 type monitor flags control
# ip link set moni0 up

causes a continuous spew of FH_ERROR from the
device. Fix this by not setting the CTL2HOST
filter by itself -- CTL + promisc works fine.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-26 10:08:48 -08:00
Wey-Yi Guy e88735d711 iwlwifi: remove extra string
For "led_mode" module parameters, string "led_mode" is duplicated twice,
remove one.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-26 10:01:04 -08:00
Jon Mason 1d3c16a818 PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in
having it return any value.  Also, a large majority of the callers do
not check the return code of pci_restore_state.  Make the
pci_restore_state a void return and avoid the overhead.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-12-23 12:53:09 -08:00
David S. Miller b7e03ec9a6 Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-12-22 17:34:40 -08:00
Chaoming Li 5c4bc1ce91 rtlwifi: Fix large packet issue
An RX buffer is set to 9100 bytes to receive 8K AMSDU; however, an skb
of this size fails in the kernel.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:45:52 -05:00
Mohammed Shafi Shajakhan db7ec38d8e ath9k: Reset keycache on resume
It looks like some hardware registers are left into undefined state
after suspend/resume. At minimum, this can cause odd issues related to
key cache and hardware trying to encrypt/decrypt frames unexpectedly.
This seems to happen even when there is no keys configured, i.e., hardware
can end up touching TX frames just based of invalid key cache context
even if the driver is not asking a specific entry to be used. In
addition, RX can likely be affected. This patch fixes this issue.

Signed-off-by: Jouni Malinen <Jouni.Malinen@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:44:22 -05:00
Larry Finger e6d8a817d0 rtlwifi: rtl8192ce: Fix driver problem when radio switch off at module load
If the radio enable switch is off when the driver is loaded, it is not
possible to get radio output until the driver is unloaded and reloaded
with the switch on.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Jussi Kivilinna 40d70dd122 rndis_wlan: add support for set_power_mgmt
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Jussi Kivilinna 49b35bd3f5 rndis_wlan: add support for set_cqm_rssi_config
Device poller already reads current RSSI, so add support for
set_cqm_rssi_config there.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Jussi Kivilinna a3463a1fdc rndis_wlan: remove unused variable from priv structure
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Jussi Kivilinna c2aa413279 rndis_wlan: constify rndis_config_ops
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Jussi Kivilinna 21b27beca7 rndis_wlan: turn radio off before interface is bring up
Radio should be off when interface is down.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:30 -05:00
Jussi Kivilinna 0b57802174 rndis_wlan: do not set default_key if not WEP key
rndis_set_default_key did call add_wep_key to set default key on device, even
if key is WPA. This caused rndis_wlan not work with wpa_supplicant in nl80211
mode (causing disconnect from AP).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:30 -05:00
Jussi Kivilinna bfe3850b0c rndis_wlan: scanning, workaround device returning incorrect bssid-list item count.
Sometimes device returns wrong number of items in bssid-list. Appears that
some specific beacons trigger this problem and leads to very poor scanning
results. Workaround by ignoring num_items received from device and walkthrough
full bssid-list buffer.

v2: Fix buffer range checks and reading next item length. Old code read
    behind buffer on last item but didn't use those values as 'count' would
    also reach zero. Also fix resizing of buffer if device has larger buffer,
    old code assumed that BSSID-list OID would return same buffer size
    when it really can return yet another new larger length.

Tested-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:30 -05:00
Rafał Miłecki ab72efdf10 b43: N-PHY: enable support for PHYs rev 3 and higher
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:30 -05:00
Rafał Miłecki d4814e69ee b43: N-PHY: update 2056 radio on channel switch on rev3+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:29 -05:00
Rafał Miłecki d414464673 b43: N-PHY: use correct channel tables for rev4+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:29 -05:00
Rafał Miłecki aca434d36f b43: N-PHY: avoid PHY hangs for rev 3 and 4
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:29 -05:00
Rafał Miłecki 94a5b04524 b43: N-PHY: add init tables for 2056 radio
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:29 -05:00
Rafał Miłecki ea7ee14b8a b43: N-PHY: implement radio 2056 init steps
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:29 -05:00
Rafał Miłecki e41596a118 b43: use correct firmware for newer cores
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:28 -05:00
Vasanthakumar Thiagarajan d0ce2d1705 ath9k_hw: Fix bug in eeprom data length validation for AR9485
The size of the eeprom data is 1088 bytes for AR9485. But
a sanity check is done against 4K which would result in a
'potential read past the end of the buffer' smatch complaint.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:28 -05:00
Bruno Randolf 0207c0c51a ath5k: Use helper function to get eeprom mode from channel
Introduce a helper function to get the EEPROM mode from channel and remove
multiple similar switch statements. Also since it's now easy to get the EEPROM
mode from the channel, use them inside the functions which need it, instead of
passing a redundant ee_mode parameter.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:28 -05:00
Bruno Randolf 26a51ad7f2 ath5k: Remove ATH5K_INI_RFGAIN defines, use band instead
Remove redundant defines.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:28 -05:00
Bruno Randolf 51f00622e5 ath5k: Track current TX power separately from max TX power
Add a new variable to keep track of the currently configured tx power. Before
max_pwr was re-used for keeping the maximum allowed power as well as the
current configuration. Doing a min() on it allows you to lower the txpower, but
how would you be able to make it higher again?

This patch fixes that by adding a new variable ah_cur_pwr which is used instead
of txp_max_pwr to keep the current configuration. txp_max_pwr is used to check
if we are within the limits.

Another problem fixed by this patch is that it avoids setting a zero txpower
when things are initialized first and the current power is not yet set.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:28 -05:00
Bruno Randolf 56bd29d361 ath5k: Separate powertable setup and writing
And rename functions which write the powertable to make it clearer.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
Bruno Randolf 26c7fc4364 ath5k: Simplify powertable recalculation
Let ath5k_hw_txpower() decide if it can re-use the powertable or if it has to
be recalculated instead of passing a 'fast' flag from the outside.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
Dan Carpenter 6dab55bf7e ath9k: unlock on error path in ath9k_change_interface()
There is a missing unlock when we hit the "No beacon slot available"
error condition.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
Hauke Mehrtens 8d6a686a0d rtlwifi: Use pci_pcie_cap()
Use function pci_pcie_cap() instead of accessing struct member directly.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
Hauke Mehrtens e40b5faabc ath9k: Use pci_is_pcie()
Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
Hauke Mehrtens e98b06b09b ath5k: Use pci_is_pcie()
Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:26 -05:00
Hauke Mehrtens 2cdb9a42f3 rt2x00: Use pci_is_pcie()
Use function pci_is_pcie() instead of accessing struct member directly.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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>
2010-12-22 15:43:26 -05:00
Hauke Mehrtens 750de29109 wl12xx: remove unnecessary import
No function declared in gpio.h is used here.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:26 -05:00
Hauke Mehrtens 63d9faf665 wl1251: remove unnecessary import
No function declared in gpio.h is used here.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:26 -05:00
Luis R. Rodriguez afe68d0a8f ath9k: fix aphy / wiphy idle mismatch
ath9k supports its own set of virtual wiphys, and it uses
the mac80211 idle notifications to know when a device needs
to be idle or not. We recently changed ath9k to force idle
on driver stop() and on resume but forgot to take into account
ath9k's own virtual wiphy idle states. These are used internally
by ath9k to check if the device's radio should be powered down
on each idle call. Without this change its possible that the
device could have been forced off but the virtual wiphy idle
was left on.

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:25 -05:00
Rajkumar Manoharan d584747be8 ath9k: Fix warnings on card removal
The recently added warning message on power change failure
is not needed on device removal.

ath: Failed to wakeup in 500us
------------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/ath9k/hw.c:1618
ath9k_hw_setpower+0x61f/0x630 [ath9k_hw]()
Hardware name: 64756D6
Pid: 540, comm: kworker/u:3 Not tainted 2.6.37-rc6-wl #37
Call Trace:
 [<ffffffff810501aa>] warn_slowpath_common+0x7a/0xb0
 [<ffffffffa056e280>] ? ath9k_iowrite32+0x0/0x90 [ath9k]
 [<ffffffff810501f5>] warn_slowpath_null+0x15/0x20
 [<ffffffffa05226ef>] ath9k_hw_setpower+0x61f/0x630 [ath9k_hw]
 [<ffffffffa05700e5>] ath9k_ps_wakeup+0x85/0xd0 [ath9k]
 [<ffffffffa0570685>] ath9k_configure_filter+0x25/0x80 [ath9k]
 [<ffffffffa04dde43>] ieee80211_configure_filter+0x133/0x190 [mac80211]
 [<ffffffffa04ee502>] ieee80211_do_stop+0x132/0x540 [mac80211]
 [<ffffffff813466ff>] ? _raw_spin_unlock_bh+0x1f/0x30
 [<ffffffff812b6923>] ? dev_deactivate+0x1c3/0x1e0
 [<ffffffffa04ee925>] ieee80211_stop+0x15/0x20 [mac80211]
 [<ffffffff8129d1b6>] __dev_close+0x56/0x90

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:25 -05:00
Sujith Manoharan 97dcec5715 ath9k_htc: Fix warning on device removal
The commit "ath9k_hw: warn if we cannot change the power to the chip"
introduced a new warning to indicate chip powerup failures, but this
is not required for devices that have been removed. Handle USB device
removal properly by checking for unplugged status.

For PCI devices, this warning will still be seen when the card is pulled
out, not sure how to check for card removal.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:25 -05:00
John W. Linville 63e35cd9bd Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-core.h
2010-12-22 14:27:21 -05:00
John W. Linville 3cfeb0c33f rtl818x: move rtl8180 and rtl8187 to separate subdirectories
These drivers share one header file, but nothing else.  Worse, both
drivers use the rtl8225 part with different register settings.  The
results has been some ugly naming -- let's simplify that.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
2010-12-22 13:45:32 -05:00
Jiri Kosina 4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
John W. Linville 3d986b25b5 rtlwifi: use alloc_workqueue
create_workqueue is deprecated.  The workqueue usage does not seem to
demand any special treatment, so do not set any flags either.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Tejun Heo <tj@kernel.org>
2010-12-20 14:52:18 -05:00
Felix Fietkau d4d5dc3d6f ath9k: do not limit the chainmask to 1 for legacy mode
Restricting the chainmask to 1 for legacy mode disables useful features
such as MRC, and it reduces the available transmit power.
I can't think of a good reason to do this in legacy mode, so let's just
get rid of that code.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:52:18 -05:00
Felix Fietkau f1a8abb045 ath9k_hw: fix PA predistortion HT40 mask
The commit 'ath9k_hw: Disable PAPRD for rates with low Tx power' changed
the code that sets the PAPRD rate masks to use only either the HT20 mask
or the HT40 mask. This is wrong, as the hardware can still use HT20 rates
even when configured for HT40, and the operating channel mode does not
affect PAPRD operation.
The register for the HT40 rate mask is applied as a mask on top of the
other registers to selectively disable PAPRD for specific rates on HT40
packets only.
This patch changes the code back to the old behavior which matches the
intended use of these registers. While with current cards this should not
make any practical difference (according to Atheros, the HT20 and HT40
mask should always be equal), it is more correct that way, and maybe
the HT40 mask will be used for some rare corner cases in the future.

Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:52:18 -05:00
Dan Carpenter ae29fbb189 wl1251: wl12xx_get_platform_data() returns an ERR_PTR
wl12xx_get_platform_data() returns an ERR_PTR on failure and it never
returns a NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:49 -05:00
Larry Finger d704300fa5 rtlwifi: Fix use of mutex in interrupt code
A previous conversion from semaphoreto mutexes missed the fact that one
of the semaphores was used in interrupt code. Fixed by changing to
a spinlock.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
Mohammed Shafi Shajakhan b1c1d0003d ath9k: Properly initialize channel table for 2GHz
ath9k channel table for 2Ghz does not seems to initialize the 'band'
parameter.Though it does not seems to cause any visible issue it looks
odd when we initialize the 'band' parameter for 5Ghz channel table while
not so for 2Ghz.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
Anisse Astier 18db45c46e rtl8192ce: Fix typo in Kconfig description
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
Felix Fietkau 55821324dc ath9k_hw: remove baseband rfsilent support
When rfkill is enabled, ath9k_hw unnecessarily configured the baseband to
turn off based on GPIO input, however that code was hardcoded to GPIO 0
instead of ah->rfkill_gpio.
Since ath9k uses software rfkill anyway, this code is completely unnecessary
and should be removed in case anything else ever uses GPIO 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
Felix Fietkau 4b3ba66a47 ath9k: fix queue depth check for forming new aggregates
To improve aggregation length, there should not be more than two fully formed
A-MPDU frames in the hardware queue. To ensure this, the code checks the tx
queue length before forming new A-MPDUs. This can reduce the throughput (or
maybe even starve out A-MPDU traffic) when too many non-aggregated frames are
in the queue.
Fix this by keeping track of pending A-MPDU frames (even when they're sent out
as single frames), but exclude rate control probing frames to improve
performance.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
John W. Linville 5c405b5c3e rtl8192ce: drop 'rtl8192c-' prefix from files
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
2010-12-20 14:49:47 -05:00
Bruno Randolf 3de135dba9 ath5k: Set available antenna information for cfg80211
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:47 -05:00
Meelis Roos b2b7ab22fa hostap: remove netif_stop_queue from init
Fix runtime warning with backtrace from hostap by removing
netif_stop_queue() call before register_netdev. Tested to work fine on
hostap_pci Prism 2.5.

(This removes a warning about calling netif_stop_queue before
register_netdev is called. -- JWL)

Signed-off-by: Meelis Roos <mroos@linux.ee>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:22:07 -05:00
Johannes Stezenbach 9f333281a7 mac80211/rt2x00: add ieee80211_tx_status_ni()
All rt2x00 drivers except rt2800pci call ieee80211_tx_status() from
a workqueue, which causes "NOHZ: local_softirq_pending 08" messages.

To fix it, add ieee80211_tx_status_ni() similar to ieee80211_rx_ni()
which can be called from process context, and call it from
rt2x00lib_txdone().  For the rt2800pci special case a driver
flag is introduced.

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

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 13:48:04 -05:00
David S. Miller b4aa9e05a6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x.h
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-core.h
	drivers/vhost/vhost.c
2010-12-17 12:27:22 -08:00
Larry Finger 8a09d6d80c rtlwifi: Switch locking from semaphores to mutexes
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
Bruno Randolf f15a4bb263 ath5k: Fix survey
The old survey implementation was broken and returned nonsense data.

Clear cycle counters and survey data on reset. Since the cycle counters easily
overflow it's better to keep a local version of collected survey data (in ms
resolution, instead of clockrate) and update this every time survey is
retrieved. If survey is retrieved often enough to avoid cycle counter overflows
this works fine, otherwise we could update survey more often, like ath9k does.
Still only the survey for the current channel is kept.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
Larry Finger 4aea248dd7 rtl8192ce: Fix build on powerpc
After merge of the rtl8192ce driver, a powerpc build fails with:

drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c: In function 'rtl92c_init_sw_vars':
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:76: error: implicit declaration of function 'vmalloc'
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:76: warning: cast to pointer from integer of different size
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c: In function 'rtl92c_deinit_sw_vars':
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:91: error: implicit declaration of function 'vfree'

The problem is fixed by explicitly including the appropriate header.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
Luis R. Rodriguez 931299cf87 ath: fix NULL pointer dereference on reg_notifier()
The reg_notifier() was recently updated as being capable of
having the request passed as NULL, fix ath to follow this API
change. Without this we end up oopsing:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
IP: [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
PGD b4c4c067 PUD b4c4d067 PMD 0
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
last sysfs file: /sys/devices/pci0000:00/0000:00:1b.0/uevent
CPU 1
Modules linked in: <etc>
Pid: 436, comm: modprobe Not tainted 2.6.37-rc5-wl+ #36 6460DWU/6460DWU
RIP: 0010:[<ffffffffa02fb8cb>]  [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
RSP: 0018:ffff8800b6f6baa8  EFLAGS: 00010246
RAX: ffff8800b527b254 RBX: ffff8800b532c180 RCX: 0000000000000018
RDX: ffff8800b530c108 RSI: 0000000000000000 RDI: ffff8800b532c180
RBP: ffff8800b6f6baa8 R08: ffff8800b532f268 R09: 0000000000000235
R10: 00000000000016ad R11: 0000000000000018 R12: 0000000000000000
R13: 0000000000000016 R14: ffff8800b532f268 R15: 0000000000000011
FS:  00007f0c53104700(0000) GS:ffff8800bed00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000004 CR3: 00000000b6531000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 436, threadinfo ffff8800b6f6a000, task ffff8800b404dc40)
Stack:
 ffff8800b6f6bac8 ffffffffa03ea651 ffff8800b532c180 ffff8800b527b254
 ffff8800b6f6bb38 ffffffffa01835ca ffffffffa019ed00 00000000a019ed80
 0000000000000002 ffff880000000002 ffffffffa0366140 0000000010aee572
Call Trace:
 [<ffffffffa03ea651>] ath9k_reg_notifier+0x41/0x50 [ath9k]
 [<ffffffffa01835ca>] wiphy_update_regulatory+0x4ba/0x5a0 [cfg80211]
 [<ffffffffa0366140>] ? ieee80211_register_hw+0xa0/0x5b0 [mac80211]
 [<ffffffffa0366140>] ? ieee80211_register_hw+0xa0/0x5b0 [mac80211]
 [<ffffffffa017f994>] wiphy_register+0x1d4/0x360 [cfg80211]
 [<ffffffff8114b918>] ? __kmalloc+0x108/0x1c0
 [<ffffffffa0366223>] ieee80211_register_hw+0x183/0x5b0 [mac80211]
 [<ffffffffa03eb49b>] ath9k_init_device+0x66b/0x850 [ath9k]
 [<ffffffffa03f9dd6>] ath_pci_probe+0x2f6/0x3c0 [ath9k]
 [<ffffffff81037529>] ? default_spin_lock_flags+0x9/0x10
 [<ffffffff812e19cf>] local_pci_probe+0x5f/0xd0
 [<ffffffff812e2bf1>] pci_device_probe+0x101/0x120
 [<ffffffff81390aca>] ? driver_sysfs_add+0x7a/0xb0
 [<ffffffff81390c26>] driver_probe_device+0x96/0x1c0
 [<ffffffff81390deb>] __driver_attach+0x9b/0xa0
 [<ffffffff81390d50>] ? __driver_attach+0x0/0xa0
 [<ffffffff81390008>] bus_for_each_dev+0x68/0x90
 [<ffffffff81390a4e>] driver_attach+0x1e/0x20
 [<ffffffff81390309>] bus_add_driver+0xe9/0x290
 [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
 [<ffffffff81391130>] driver_register+0x80/0x150
 [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
 [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
 [<ffffffff812e2e76>] __pci_register_driver+0x56/0xd0
 [<ffffffffa03f9ec3>] ath_pci_init+0x23/0x30 [ath9k]
 [<ffffffffa040702b>] ath9k_init+0x2b/0x4d [ath9k]
 [<ffffffff81002053>] do_one_initcall+0x43/0x190
 [<ffffffff8109fb5b>] sys_init_module+0xbb/0x200
 [<ffffffff8100c042>] system_call_fastpath+0x16/0x1b
Code: <who even reads this anyway? haha, ok you do>
RIP  [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
 RSP <ffff8800b6f6baa8>
CR2: 0000000000000004
---[ end trace 6d03d3c7eda9f06b ]---

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:31 -05:00
Vasanthakumar Thiagarajan 45ef6a0bcc ath9k_hw: Configure appropriate Tx power when PAPRD fails
Target Tx power available in eeprom is for PAPRD. If PAPRD
fails, paprd scale factor needs to be detected from this
target tx power.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:31 -05:00
Vasanthakumar Thiagarajan 7072bf62fb ath9k_hw: Disable PAPRD for rates with low Tx power
When the drop in Tx power for a particular mcs rate exceeds
the paprd scale factor, paprd may not work properly. Disable
paprd for any such rates.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:31 -05:00
Vasanthakumar Thiagarajan 8698bca6b5 ath9k_hw: Add a helper to get paprd scale factor
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:30 -05:00
Vasanthakumar Thiagarajan 0b2084bc57 ath9k_hw: Tx IQ cal changes for AR9003
Add multiple Tx IQ cal support to improve EVM accross
different power levels.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:30 -05:00
Vasanthakumar Thiagarajan 895ad7eb21 ath9k_hw: Move get_streams() to hw.h
This helper can be used in multiple places. Also make
it inline returning u8.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:30 -05:00
Vasanthakumar Thiagarajan d8a8440e3f ath9k_hw: Remove unnecessary Rx IQ cal register configuration in ar9003_hw_tx_iq_cal()
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:30 -05:00
Vasanthakumar Thiagarajan 7e68b74668 ath9k_hw: Remove delay during regwrite of analog shift registers
This is not needed for AR9003.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:30 -05:00
John W. Linville 5928b91aca Merge branch 'wl12xx-next' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx 2010-12-16 15:21:33 -05:00
Sedat Dilek 7d5f01ad53 iwlwifi: Fix error: struct iwl_lq_sta has no member named dbg_fixed_rate
While compiling linux-next (next-20101216) I fell over this breakage:
...
drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘iwl_rs_rate_init’:
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2876:8: error: ‘struct iwl_lq_sta’ has no member named ‘dbg_fixed_rate’

dbg_fixed_rate is only used when CONFIG_MAC80211_DEBUGFS is set:

[ drivers/net/wireless/iwlwifi/iwl-agn-rs.h ]
...
 #ifdef CONFIG_MAC80211_DEBUGFS
       struct dentry *rs_sta_dbgfs_scale_table_file;
       struct dentry *rs_sta_dbgfs_stats_table_file;
       struct dentry *rs_sta_dbgfs_rate_scale_data_file;
       struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file;
       u32 dbg_fixed_rate;
 #endif

The issue was introduced by commit a1da077bc36368eb7d6312e7e49260f0a3d92c77:
"iwlwifi: clear dbg_fixed_rate during init"

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 09:47:02 -05:00
John W. Linville e137478b56 rtlwifi: convert to __packed notation
Use "__packed" instead of "__attribute__ ((packed))"...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 09:20:16 -05:00
Mohammed Shafi Shajakhan 2b7e6bce41 ath9k: Add comments for making pm-qos as modparam
PM-QOS value can be user specified via module parameter.
This patch adds few comments regarding this in the driver
code.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 17:04:07 -05:00
Sujith Manoharan 64c6e50c07 ath9k_htc: Remove PCI specific configuration
This is not required for USB devices.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 17:04:06 -05:00
Sujith Manoharan bd2ce6e43f mac80211: Add timeout to BA session start API
Allow drivers or rate control algorithms to specify BlockAck session
timeout when initiating an ADDBA transaction. This is useful in cases
where maintaining persistent BA sessions does not incur any overhead.

The current timeout value of 5000 TUs is retained for all non ath9k/ath9k_htc
drivers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 17:03:59 -05:00
Wey-Yi Guy 14a085e770 iwlagn: fix witespace damage
patch "iwlagn: check ready in iwlagn_bss_info_changed()" introduce
whitespace, fix it

please merge with the previous patch

Reported 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>
2010-12-15 17:03:55 -05:00
Mohammed Shafi Shajakhan 4dc3530df7 ath9k: Make PM-QOS value as user configurable
This patch allows the pm-qos value to be user configurable by making it as
a module parameter.This will help our customers to configure the pm-qos
value according to the effect in throughput due to the DMA latency problem
which was observed in Intel Pinetrail platforms.
	The tested value of '55' will be filled as the default
pm-qos-value incase the user does not specifies pm-qos value as a
module parameter.
example usage: sudo modprobe ath9k pmqos=65

Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 17:03:54 -05:00
John W. Linville 17b3c17ecd Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
	drivers/net/wireless/iwlwifi/iwl-core.h
2010-12-15 16:40:49 -05:00
John W. Linville 1fcfe76a76 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-1000.c
	drivers/net/wireless/iwlwifi/iwl-6000.c
	drivers/net/wireless/iwlwifi/iwl-core.h
2010-12-15 16:33:28 -05:00
Larry Finger 0c8173385e rtl8192ce: Add new driver
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 16:17:49 -05:00
David S. Miller 82cc4f5cb8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-12-15 09:43:13 -08:00
Luciano Coelho 248daa084c wl12xx_sdio_test: rename files to match current style
Change some file names and Kconfig settings so that this new module matches
the new way of using wl12xx instead of wl1271.

Also fix SDIO power enabling and disabling to match the latest way of doing
it.

Cc: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 17:09:27 +02:00
Juuso Oikarinen 6742f554db wl12xx: Change TX queue to be per AC
With the current single-queue implementation traffic priorization is not
working correctly - when using multiple BE streams and one, say VI stream,
the VI stream will share bandwidth almost equally with the BE streams.

To fix the issue, implement per AC queues, which are emptied in priority
order to the firmware. To keep it relatively simple, maintain a global
buffer count and global queue stop/wake instead of per-AC.

With these changes, priorization appears to work just fine.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:41:37 +02:00
Eliad Peller 17c1755c24 wl12xx: allow runtime changing of debug_level
Currently, the debug level is set in compilation time (by the DEBUG_LEVEL
const). This method has the advantage of compiling only the relevant
messages, while optimizing out the unused ones.

In order to allow runtime control over the debug_level, while optimizing
out messages when debug messages are not needed, we combine some methods:
1. use dynamic_debug (pr_debug) rather then printk.
2. add debug_level module param in order to set debug level during insmod.
3. add debug_level sysfs file in order to allow dynamic control over the
   debug level.

Since patches for pr_debug_hex_dump() implementation haven't been applied yet,
we are still temporarly using print_hex_dump().

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:41:36 +02:00
Guy Eilam ea559b4605 wl1271: fixed problem with WPS IEs in probe requests
Inclusion of a WPS IE in probe requests caused a problem
in the driver due to the maximum size of the probe request
template and the max_scan_ie_len values at initialization.

Increased the size of probe request template
to the maximum size allowed by the firmware.
Struct wl12xx_probe_req_template, which was only used
for calculating the max size of the probe request template,
is no longer used and needed.

max_scan_ie_len is used for validating the size of
additional IEs in scan requests.
Initialized the max_scan_ie_len field to the maximum size
of the probe request template minus the ieee80211 header size.

Signed-off-by: Guy Eilam <guy@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:41:04 +02:00
Eliad Peller c531277215 wl12xx: add auto-arp support
The auto-arp feature of wl12xx allows the firmware to automatically
response to arp requests asking for its ip.

in order to use it, we configure the arp response template and
enable the corresponding bit in wl1271_acx_arp_filter (along with
passing its ip)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:04:56 +02:00
Roger Quadros b69eb80bf7 wl1271_sdio_test: Add module for sdio RX/TX testing
This module enables individually generating RX and TX traffic
over the SDIO bus on which the WL1271 chipset is connected.
This is required to perform RF interference testing.

The module takes 2 module parameters 'rx' and 'tx'.

To generate RX traffic:
	modprobe wl1271_sdio_test rx=1
To generate TX traffic:
	modprobe wl1271_sdio_test tx=1

To generate both RX & TX traffic, set both rx and tx to 1.

You can change the testing configuration at runtime by changing
the rx & tx values at /sys/modules/wl1271_sdio_test/

To stop testing simply unload the module.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Reviewed-by: Carlos Chinea <carlos.chinea@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:03:17 +02:00
Luciano Coelho fb6a6819fa wl12xx: disable 11a channels when wl->enable_11a is known
Disabling the 11a channels when not supported in the reg_notify function was
not working as it should, because when the driver is initiailizing (and
registering itself with mac80211), it would get the reg notification too
early.  At that point the driver wouldn't have received the NVS yet, so it
wouldn't know whether 11a was supported.

To fix this, we disable 11a channels when we read the NVS instead.  Also, it
is easier (and still safe) to set n_channels to zero instead of setting the
disabled flag on every 11a channel.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-12-15 15:00:00 +02:00
Tejun Heo afe2c511fb workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync() quite some time ago.  Convert all the
in-kernel users.  The conversions are completely equivalent and
trivial.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: netdev@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Alex Elder <aelder@sgi.com>
Cc: xfs-masters@oss.sgi.com
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netfilter-devel@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
2010-12-15 10:56:11 +01:00
Linus Torvalds b4fe2a0342 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (75 commits)
  pppoe.c: Fix kernel panic caused by __pppoe_xmit
  WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
  bnx2x: Advance a version number to 1.60.01-0
  bnx2x: Fixed a compilation warning
  bnx2x: LSO code was broken on BE platforms
  qlge: Fix deadlock when cancelling worker.
  net: fix skb_defer_rx_timestamp()
  cxgb4vf: Ingress Queue Entry Size needs to be 64 bytes
  phy: add the IC+ IP1001 driver
  atm: correct sysfs 'device' link creation and parent relationships
  MAINTAINERS: remove me from tulip
  SCTP: Fix SCTP_SET_PEER_PRIMARY_ADDR to accpet v4mapped address
  enic: Bug Fix: Pass napi reference to the isr that services receive queue
  ipv6: fix nl group when advertising a new link
  connector: add module alias
  net: Document the kernel_recvmsg() function
  r8169: Fix runtime power management
  hso: IP checksuming doesn't work on GE0301 option cards
  xfrm: Fix xfrm_state_migrate leak
  net: Convert netpoll blocking api in bonding driver to be a counter
  ...
2010-12-14 17:33:40 -08:00
Eduardo Costa 56e6417b49 p54usb: New USB ID for Gemtek WUBI-100GW
This USB ID is for the WUBI-100GW 802.11g Wireless LAN USB Device that
uses p54usb.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Eduardo Costa <ecosta.tmp@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-14 16:10:45 -05:00