summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-04-14wireless: rt2x00: rt2800usb: identify Sitecom devicesmaster-2010-04-15master-2010-04-14Xose Vazquez Perez
A very useful information was provided by Sitecom R&D guys: Please find the information regarding our latest Ralink adapters below; WL-302 - VID: 0x0DF6, PID: 0x002D - Ralink RT2771 WL-315 - VID: 0x0DF6, PID: 0x0039 - Ralink RT2770 WL-319 - VID: 0x182D, PID: 0x0037 - Ralink RT2860 WL-321 - VID: 0x0DF6, PID: 0x003B - Ralink RT2770 WL-324 - VID: 0x0DF6, PID: 0x003D - Ralink RT2870 WL-329 - VID: 0x0DF6, PID: 0x0041 - Ralink RT3572 WL-343 - VID: 0x0DF6, PID: 0x003E - Ralink RT3070 WL-344 - VID: 0x0DF6, PID: 0x0040 - Ralink RT3071 WL-345 - VID: 0x0DF6, PID: 0x0042 - Ralink RT3072 WL-608 - VID: 0x0DF6, PID: 0x003F - Ralink RT2070 Note: PID: 0x003C, 0x004A, and 0x004D: --these products do not exist; devices were never produced/shipped-- The WL-349v4 USB dongle (0x0df6,0x0050) will be shipped soon (it isn't available yet), and uses a Ralink RT3370 chipset. Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ar9170usb: add a couple more USB IDsChristian Lamparter
This patch adds the following 5 entries to the usbid device table: * Netgear WNA1000 * Proxim ORiNOCO Dual Band 802.11n USB Adapter * 3Com Dual Band 802.11n USB Adapter * H3C Dual Band 802.11n USB Adapter * WNC Generic 11n USB dongle CC: <stable@kernel.org> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14wl1251: don't require NVS data when EEPROM is usedGrazvydas Ignotas
If EEPROM is used, NVS data is now loaded but ignored. Stop loading it to avoid need of dummy NVS file for modules with EEPROM. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath9k-htc: fix lockdep warning and kernel warning after unplugging ar9271 ↵Ming Lei
usb device This patch fixes two warnings below after unplugging ar9271 usb device: -one is a kernel warning[1] -another is a lockdep warning[2] The root reason is that __skb_queue_purge can't be executed in hardirq context, so the patch forks ath9k_skb_queue_purge(ath9k version of _skb_queue_purge), which frees skb with dev_kfree_skb_any which can be run in hardirq context safely, then prevent the lockdep warning and kernel warning after unplugging ar9271 usb device. [1] kernel warning [ 602.894005] ------------[ cut here ]------------ [ 602.894005] WARNING: at net/core/skbuff.c:398 skb_release_head_state+0x71/0x87() [ 602.894005] Hardware name: 6475EK2 [ 602.894005] Modules linked in: ath9k_htc ath9k ath9k_common ath9k_hw ath bridge stp llc sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table kvm_intel kvm arc4 ecb mac80211 snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep thinkpad_acpi snd_pcm snd_timer hwmon iTCO_wdt snd e1000e pcspkr i2c_i801 usbhid iTCO_vendor_support wmi cfg80211 yenta_socket rsrc_nonstatic pata_acpi snd_page_alloc soundcore uhci_hcd ohci_hcd ehci_hcd usbcore i915 drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded: ath] [ 602.894005] Pid: 2506, comm: ping Tainted: G W 2.6.34-rc3-wl #20 [ 602.894005] Call Trace: [ 602.894005] <IRQ> [<ffffffff8104a41c>] warn_slowpath_common+0x7c/0x94 [ 602.894005] [<ffffffffa022f398>] ? __skb_queue_purge+0x43/0x4a [ath9k_htc] [ 602.894005] [<ffffffff8104a448>] warn_slowpath_null+0x14/0x16 [ 602.894005] [<ffffffff813269c1>] skb_release_head_state+0x71/0x87 [ 602.894005] [<ffffffff8132829a>] __kfree_skb+0x16/0x81 [ 602.894005] [<ffffffff813283b2>] kfree_skb+0x7e/0x86 [ 602.894005] [<ffffffffa022f398>] __skb_queue_purge+0x43/0x4a [ath9k_htc] [ 602.894005] [<ffffffffa022f560>] __hif_usb_tx+0x1c1/0x21b [ath9k_htc] [ 602.894005] [<ffffffffa022f73c>] hif_usb_tx_cb+0x12f/0x154 [ath9k_htc] [ 602.894005] [<ffffffffa00d2fbe>] usb_hcd_giveback_urb+0x91/0xc5 [usbcore] [ 602.894005] [<ffffffffa00f6c34>] ehci_urb_done+0x7a/0x8b [ehci_hcd] [ 602.894005] [<ffffffffa00f6f33>] qh_completions+0x2ee/0x376 [ehci_hcd] [ 602.894005] [<ffffffffa00f8ba5>] ehci_work+0x95/0x76e [ehci_hcd] [ 602.894005] [<ffffffffa00fa5ae>] ? ehci_irq+0x2f/0x1d4 [ehci_hcd] [ 602.894005] [<ffffffffa00fa725>] ehci_irq+0x1a6/0x1d4 [ehci_hcd] [ 602.894005] [<ffffffff810a6d18>] ? __rcu_process_callbacks+0x7a/0x2df [ 602.894005] [<ffffffff810a47a4>] ? handle_fasteoi_irq+0x22/0xd2 [ 602.894005] [<ffffffffa00d268d>] usb_hcd_irq+0x4a/0xa7 [usbcore] [ 602.894005] [<ffffffff810a2853>] handle_IRQ_event+0x77/0x14f [ 602.894005] [<ffffffff813285ce>] ? skb_release_data+0xc9/0xce [ 602.894005] [<ffffffff810a4814>] handle_fasteoi_irq+0x92/0xd2 [ 602.894005] [<ffffffff8100c4fb>] handle_irq+0x88/0x91 [ 602.894005] [<ffffffff8100baed>] do_IRQ+0x63/0xc9 [ 602.894005] [<ffffffff81354245>] ? ip_flush_pending_frames+0x4d/0x5c [ 602.894005] [<ffffffff813ba993>] ret_from_intr+0x0/0x16 [ 602.894005] <EOI> [<ffffffff811095fe>] ? __delete_object+0x5a/0xb1 [ 602.894005] [<ffffffff813ba5f5>] ? _raw_write_unlock_irqrestore+0x47/0x7e [ 602.894005] [<ffffffff813ba5fa>] ? _raw_write_unlock_irqrestore+0x4c/0x7e [ 602.894005] [<ffffffff811095fe>] __delete_object+0x5a/0xb1 [ 602.894005] [<ffffffff81109814>] delete_object_full+0x25/0x31 [ 602.894005] [<ffffffff813a60c0>] kmemleak_free+0x26/0x45 [ 602.894005] [<ffffffff810ff517>] kfree+0xaa/0x149 [ 602.894005] [<ffffffff81323fb7>] ? sock_def_write_space+0x84/0x89 [ 602.894005] [<ffffffff81354245>] ? ip_flush_pending_frames+0x4d/0x5c [ 602.894005] [<ffffffff813285ce>] skb_release_data+0xc9/0xce [ 602.894005] [<ffffffff813282a2>] __kfree_skb+0x1e/0x81 [ 602.894005] [<ffffffff813283b2>] kfree_skb+0x7e/0x86 [ 602.894005] [<ffffffff81354245>] ip_flush_pending_frames+0x4d/0x5c [ 602.894005] [<ffffffff81370c1f>] raw_sendmsg+0x653/0x709 [ 602.894005] [<ffffffff81379e31>] inet_sendmsg+0x54/0x5d [ 602.894005] [<ffffffff813207a2>] ? sock_recvmsg+0xc6/0xdf [ 602.894005] [<ffffffff813208c1>] sock_sendmsg+0xc0/0xd9 [ 602.894005] [<ffffffff810e13b4>] ? might_fault+0x68/0xb8 [ 602.894005] [<ffffffff810e13fd>] ? might_fault+0xb1/0xb8 [ 602.894005] [<ffffffff8132a1c3>] ? copy_from_user+0x2f/0x31 [ 602.894005] [<ffffffff8132a5b3>] ? verify_iovec+0x54/0x91 [ 602.894005] [<ffffffff81320d41>] sys_sendmsg+0x1da/0x241 [ 602.894005] [<ffffffff8103d327>] ? finish_task_switch+0x0/0xc9 [ 602.894005] [<ffffffff8103d327>] ? finish_task_switch+0x0/0xc9 [ 602.894005] [<ffffffff8107642e>] ? trace_hardirqs_on_caller+0x16/0x150 [ 602.894005] [<ffffffff813ba27d>] ? _raw_spin_unlock_irq+0x56/0x63 [ 602.894005] [<ffffffff8103d3cb>] ? finish_task_switch+0xa4/0xc9 [ 602.894005] [<ffffffff8103d327>] ? finish_task_switch+0x0/0xc9 [ 602.894005] [<ffffffff810357fe>] ? need_resched+0x23/0x2d [ 602.894005] [<ffffffff8107642e>] ? trace_hardirqs_on_caller+0x16/0x150 [ 602.894005] [<ffffffff813b9750>] ? trace_hardirqs_on_thunk+0x3a/0x3f [ 602.894005] [<ffffffff81009c02>] system_call_fastpath+0x16/0x1b [ 602.894005] ---[ end trace 91ba2d8dc7826839 ]--- [2] lockdep warning [ 169.363215] ====================================================== [ 169.365390] [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] [ 169.366334] 2.6.34-rc3-wl #20 [ 169.366872] ------------------------------------------------------ [ 169.366872] khubd/78 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 169.366872] (clock-AF_INET){++.?..}, at: [<ffffffff81323f51>] sock_def_write_space+0x1e/0x89 [ 169.366872] [ 169.366872] and this task is already holding: [ 169.366872] (&(&hif_dev->tx.tx_lock)->rlock){-.-...}, at: [<ffffffffa03715b0>] hif_usb_stop+0x24/0x53 [ath9k_htc] [ 169.366872] which would create a new lock dependency: [ 169.366872] (&(&hif_dev->tx.tx_lock)->rlock){-.-...} -> (clock-AF_INET){++.?..} [ 169.366872] [ 169.366872] but this new dependency connects a HARDIRQ-irq-safe lock: [ 169.366872] (&(&hif_dev->tx.tx_lock)->rlock){-.-...} [ 169.366872] ... which became HARDIRQ-irq-safe at: [ 169.366872] [<ffffffff810772d5>] __lock_acquire+0x2c6/0xd2b [ 169.366872] [<ffffffff8107866d>] lock_acquire+0xec/0x119 [ 169.366872] [<ffffffff813b99bb>] _raw_spin_lock+0x40/0x73 [ 169.366872] [<ffffffffa037163d>] hif_usb_tx_cb+0x5e/0x154 [ath9k_htc] [ 169.366872] [<ffffffffa00d2fbe>] usb_hcd_giveback_urb+0x91/0xc5 [usbcore] [ 169.366872] [<ffffffffa00f6c34>] ehci_urb_done+0x7a/0x8b [ehci_hcd] [ 169.366872] [<ffffffffa00f6f33>] qh_completions+0x2ee/0x376 [ehci_hcd] [ 169.366872] [<ffffffffa00f8ba5>] ehci_work+0x95/0x76e [ehci_hcd] [ 169.366872] [<ffffffffa00fa725>] ehci_irq+0x1a6/0x1d4 [ehci_hcd] [ 169.366872] [<ffffffffa00d268d>] usb_hcd_irq+0x4a/0xa7 [usbcore] [ 169.366872] [<ffffffff810a2853>] handle_IRQ_event+0x77/0x14f [ 169.366872] [<ffffffff810a4814>] handle_fasteoi_irq+0x92/0xd2 [ 169.366872] [<ffffffff8100c4fb>] handle_irq+0x88/0x91 [ 169.366872] [<ffffffff8100baed>] do_IRQ+0x63/0xc9 [ 169.366872] [<ffffffff813ba993>] ret_from_intr+0x0/0x16 [ 169.366872] [<ffffffff8130f6ee>] cpuidle_idle_call+0xa7/0x115 [ 169.366872] [<ffffffff81008c4f>] cpu_idle+0x68/0xc4 [ 169.366872] [<ffffffff813a41e0>] rest_init+0x104/0x10b [ 169.366872] [<ffffffff81899db3>] start_kernel+0x3f1/0x3fc [ 169.366872] [<ffffffff818992c8>] x86_64_start_reservations+0xb3/0xb7 [ 169.366872] [<ffffffff818993c4>] x86_64_start_kernel+0xf8/0x107 [ 169.366872] [ 169.366872] to a HARDIRQ-irq-unsafe lock: [ 169.366872] (clock-AF_INET){++.?..} [ 169.366872] ... which became HARDIRQ-irq-unsafe at: [ 169.366872] ... [<ffffffff81077349>] __lock_acquire+0x33a/0xd2b [ 169.366872] [<ffffffff8107866d>] lock_acquire+0xec/0x119 [ 169.366872] [<ffffffff813b9d07>] _raw_write_lock_bh+0x45/0x7a [ 169.366872] [<ffffffff8135cf14>] tcp_close+0x165/0x34d [ 169.366872] [<ffffffff8137aced>] inet_release+0x55/0x5c [ 169.366872] [<ffffffff81321350>] sock_release+0x1f/0x6e [ 169.366872] [<ffffffff813213c6>] sock_close+0x27/0x2b [ 169.366872] [<ffffffff8110dd45>] __fput+0x125/0x1ca [ 169.366872] [<ffffffff8110de04>] fput+0x1a/0x1c [ 169.366872] [<ffffffff8110adc9>] filp_close+0x68/0x72 [ 169.366872] [<ffffffff8110ae80>] sys_close+0xad/0xe7 [ 169.366872] [<ffffffff81009c02>] system_call_fastpath+0x16/0x1b (Trimmed at the "other info that might help us debug this" line in the interest of brevity... -- JWL) Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath9k-htc:respect usb buffer cacheline alignment in reg out pathMing Lei
In ath9k-htc register out path, ath9k-htc will pass skb->data into usb hcd and usb hcd will do dma mapping and unmapping to the buffer pointed by skb->data, so we should pass a cache-line aligned address. This patch replace __dev_alloc_skb with alloc_skb to make skb->data pointed to a cacheline aligned address simply since ath9k-htc does not skb_push on the skb and pass it to mac80211, also use kfree_skb to free the skb allocated by alloc_skb(we can use kfree_skb safely in hardirq context since skb->destructor is NULL always in the path). Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath9k-htc:respect usb buffer cacheline alignment in reg in pathMing Lei
In ath9k-htc register in path, ath9k-htc will pass skb->data into usb hcd and usb hcd will do dma mapping and unmapping to the buffer pointed by skb->data, so we should pass a cache-line aligned address. This patch replace __dev_alloc_skb with alloc_skb to make skb->data pointed to a cacheline aligned address simply since ath9k-htc does not skb_push on the skb and pass it to mac80211, also use kfree_skb to free the skb allocated by alloc_skb(we can use kfree_skb safely in hardirq context since skb->destructor is NULL always in the path). Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath9k-htc:respect usb buffer cacheline alignment in ath9k_hif_usb_alloc_rx_urbsMing Lei
In ath9k_hif_usb_alloc_rx_urbs, ath9k-htc will pass skb->data into usb hcd and usb hcd will do dma mapping and unmapping to the buffer pointed by skb->data, so we should pass a cache-line aligned address. This patch replace __dev_alloc_skb with alloc_skb to make skb->data pointed to a cacheline aligned address simply since ath9k-htc does not skb_push on the skb and pass it to mac80211, also use kfree_skb to free the skbs allocated by alloc_skb(we can use kfree_skb safely in hardirq context since skb->destructor is NULL always in the path). Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath5k: treat RXORN as non-fatalBruno Randolf
We get RXORN interrupts when all receive buffers are full. This is not necessarily a fatal situation. It can also happen when the bus is busy or the CPU is not fast enough to process all frames. Older chipsets apparently need a reset to come out of this situration, but on newer chips we can treat RXORN like RX, as going thru a full reset does more harm than good, there. The exact chip revisions which need a reset are unknown - this guess AR5K_SREV_AR5212 ("venice") is copied from the HAL. Inspired by openwrt 413-rxorn.patch: "treat rxorn like rx, reset after rxorn seems to do more harm than good" Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-14ath5k: Use high bitrates for ACK/CTSBruno Randolf
There was a confusion in the usage of the bits AR5K_STA_ID1_ACKCTS_6MB and AR5K_STA_ID1_BASE_RATE_11B. If they are set (1), we will get lower bitrates for ACK and CTS. Therefore ath5k_hw_set_ack_bitrate_high(ah, false) actually resulted in high bitrates, which i think is what we want anyways. Cleared the confusion and added some documentation. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Add rt3390 support in rt2800 register initialization.master-2010-04-12Gertjan van Wingerde
Add RT3390 specific register initializations to rt2x00, based on the latest Ralink rt3390 vendor driver. Untested as I don't actually own an RT3390 based device, but given experiences on rt3070/rt3071 very hopeful that this will actually work.. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Add rt3090 support in rt2800 register initialization.Gertjan van Wingerde
Add RT3090 specific register initializations to rt2x00, based on the latest Ralink rt3090 vendor driver. Untested as I don't actually own an RT3090 based device, but given experiences on rt3070/rt3071 very hopeful that this will actually work.. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Add rt3071 support in rt2800 register initialization.Gertjan van Wingerde
Add RT3071 specific register initializations to rt2x00, based on the latest Ralink rt3070 vendor driver. With this patch my RT3071 based devices start showing a sign of life. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Finish rt3070 support in rt2800 register initialization.Gertjan van Wingerde
rt2x00 had preliminary support for RT3070 based devices, but the support was incomplete. Update the RT3070 register initialization to be similar to the latest Ralink vendor driver. With this patch my rt3070 based devices start showing a sign of life. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Align rt2800 register initialization with vendor driver.Gertjan van Wingerde
Align the rt2800 register initializations with the latest versions of the Ralink vendor driver. This patch is also preparation for the addition of support for RT3070 / RT3071 / RT3090 / RT3390 based devices. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Refactor rt2800 version constants.Gertjan van Wingerde
The rt2800 version constants are inconsistent, and the version number don't mean a lot of things anyway. Refactor the constants to have some more meaningful names, and introduce and use some new helpers to check these chipset revisions. At the same time rename to revision, as they are more revision numbers rather than version numbers. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Align RT chipset definitions with vendor driver.Gertjan van Wingerde
Only include definitions for RT chipsets that are also used inside the Ralink vendor drivers. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Update rt2800 register definitions towards latest definitions.Gertjan van Wingerde
Definitions taken from the latest rt2860 / rt2870 / rt3070 / rt3090 Ralink vendor drivers. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12rt2x00: Let RF chipset decide the RF channel switch method to use in rt2800.Gertjan van Wingerde
It seems that the distinction between RF channel switch method is solely based on the RF chipset that is used. Refactor the channel switch decision to just take the RF chipset into account, thereby greatly simplifying the check. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12p54pci: prevent stuck rx-ring on slow systemQuintin Pitts
This patch fixes an old problem, which - under certain circumstances - could cause the device to become unresponsive. most of p54pci's rx-ring management is implemented in just two distinct standalone functions. p54p_check_rx_ring takes care of processing incoming data, while p54p_refill_rx_ring tries to replenish all depleted communication buffers. This has always worked fine on my fast machine, but now I know there is a hidden race... The most likely candidate here is ring_control->device_idx. Quintin Pitts had already analyzed the culprit and posted a patch back in Oct 2009. But sadly, no one's picked up on this. ( https://patchwork.kernel.org/patch/53079/ [2 & 3] ). This patch does the same way, except that it also prioritize rx data processing, simply because tx routines *can* wait. Reported-by: Sean Young <sean@mess.org> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11386 Reported-by: Quintin Pitts <geek4linux@gmail.com> Signed-off-by: Quintin Pitts <geek4linux@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-12Merge branch 'wireless-next-2.6' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
2010-04-09iwlwifi: avoid Tx queue memory allocation in interface downZhu Yi
We used to free all the Tx queues memory when interface is brought down and reallocate them again in interface up. This requires order-4 allocation for txq->cmd[]. In situations like s2ram, this usually leads to allocation failure in the memory subsystem. The patch fixed this problem by allocating the Tx queues memory only at the first time. Later iwl_down/iwl_up only initialize but don't free and reallocate them. The memory is freed at the device removal time. BTW, we have already done this for the Rx queue. This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15551 Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: fix compiler warningWey-Yi Guy
Check return code on iwl_send_cmd_pdu() to get rid of compiler warning. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: fix compile warnings when compiling without debugReinette Chatre
Fixes: CC [M] drivers/net/wireless/iwlwifi/iwl-agn-rs.o drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘rs_get_rate’: drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2419: warning: unused variable ‘priv’ CC [M] drivers/net/wireless/iwlwifi/iwl-sta.o drivers/net/wireless/iwlwifi/iwl-sta.c: In function ‘iwl_send_add_sta’: drivers/net/wireless/iwlwifi/iwl-sta.c:197: warning: unused variable ‘sta_id’ drivers/net/wireless/iwlwifi/iwl-3945.c: In function ‘iwl3945_rx_reply_rx’: drivers/net/wireless/iwlwifi/iwl-3945.c:601: warning: unused variable ‘rx_stats_noise_diff’ drivers/net/wireless/iwlwifi/iwl-3945.c:600: warning: unused variable ‘rx_stats_sig_avg’ drivers/net/wireless/iwlwifi/iwl-3945-rs.c: In function ‘rs_get_rate’: drivers/net/wireless/iwlwifi/iwl-3945-rs.c:650: warning: unused variable ‘priv’ Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: small changes in commentsWey-Yi Guy
REPLY_TX_LINK_QUALITY_CMD was used by 4965, 5000 series and up Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: update tx command response statusWey-Yi Guy
Update to include additional tx command response status for "_agn" devices. The following status indicate the transmission was postponed: TX_STATUS_POSTPONE_DELAY TX_STATUS_POSTPONE_FEW_BYTES TX_STATUS_POSTPONE_BT_PRIO TX_STATUS_POSTPONE_QUIET_PERIOD TX_STATUS_POSTPONE_CALC_TTAK Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: add more debug info in error event dumpWey-Yi Guy
When sys assert happen, driver will dump the error table information provided by uCode. There are more information available but is not being display by the driver; adding program counter and last host command the to log to help uCode debugging. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: clean up last_phy_resJohannes Berg
The last_phy_res[100] variable is used in an odd way. The first byte of it is used as a flag, and the rest as the data. Thus, the array need only be 61 bytes, since it is just the flag and a struct iwl_rx_phy_res (which is 60 bytes). Clean this up by splitting the variable into two: last_phy_res and last_phy_res_valid, using correct types for both (struct and bool). While doing all this also move the variables to the _agn part of the hw-specific union since they only apply to A-MPDUs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: remove pointless sta_id invalid checkJohannes Berg
lq->sta_id cannot be invalid here since this function will only be called after the station has been added properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlagn: simplify WEP key checkJohannes Berg
Simplify the WEP group key check by checking the sta pointer instead of the sta_id we calculate with it; also clean up the comment formatting. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: remove wrong key use checkJohannes Berg
Default WEP keys and regular keys are not allocated from the same space in the firmware, so we shouldn't use the same bits to indicate in use. For default WEP keys, however, mac80211 won't allow using the same key index twice, so the check is not necessary at all -- add/remove are perfectly nested due to those checks. Other keys are allocated in the device in a global array that only has a certain number of slots, so for that we need to keep the allocation bitmap; but the 802.11 key index isn't relevant there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: make WEP key restoring explicitJohannes Berg
The firmware clears default WEP keys on transitions to !associated, so we need to restore them just like stations. This is rather implicit as part of sending a station right now, which is odd. Make it explicit instead and only for agn since 3945 doesn't use hw crypto for WEP. Due to that, iwl_send_static_wepkey_cmd is now only used in iwl-sta.c and can be static. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09iwlwifi: default max event log sizeWey-Yi Guy
Size of event log is determined by uCode which is different per NICs. Set the maximum event log size per device to better match uCode configuration. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-04-09mac80211: check whether scan is in progress before queueing scan_workmaster-2010-04-09Teemu Paasikivi
As scan_work is queued from work_work it needs to be checked if scan has been started during execution of work_work. Otherwise, when hw scan is used, the stack gets error about hw being busy with ongoing scan. This causes the stack to abort scan without notifying the driver about it. This leads to a situation where the hw is scanning and the stack thinks it's not. Then when the scan finishes, the stack will complain by warnings. Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09wl1271: Add support for connection quality monitoringJuuso Oikarinen
This patch will add support for connection quality monitoring by configuring rssi triggers to the firmware, and enabling the firmware rssi trigger functionality. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09wl1271: Go to ELP in idleJuuso Oikarinen
Allow the wl1271 go to ELP mode also in idle. This will reduce current consumption remarkably in idle mode (~12mA -> ~0.2mA) Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFFSaravanan Dhanabal
mac80211 sends RTS threshold configuration request even if the wl1271 interface state is WL1271_STATE_OFF. This leads to failures during pm tests. This patch leaves the configuration function, if the interface is going down. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09wl1271: Fix mac80211 configuration requests during WL1271_STATE_OFFSaravanan Dhanabal
mac80211 sends configuration requests even if the wl1271 interface state is WL1271_STATE_OFF. This creates warnings from mac80211. This patch leaves the configuration functions, if the interface is going down. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09wl1271: Fix memory leaks on driver initializationJuuso Oikarinen
This patch fixes some memory leaks occurring during driver init/de-init. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09mac80211: fix typo for LDPC capabilityLuis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09mac80211: delay skb linearising in rx decryptionZhu Yi
We delay the skb linearising in ieee80211_rx_h_decrypt so that frames do not require software decryption are not linearized. We are safe to do this because ieee80211_get_mmie_keyidx() only requires to touch nonlinear data for management frames, which are already linearized before getting here. Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-09Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-4965.c
2010-04-08ath5k: fixup some merge damage for AR5211 IQ calibrationJohn W. Linville
Resolution of a merge conflict upstream accidentally removed a hunk of "ath5k: IQ calibration for AR5211 is slightly different", so restore it. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08iwlwifi: need check for valid qos packet before freeWey-Yi Guy
For 4965, need to check it is valid qos frame before free, only valid QoS frame has the tid used to free the packets. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08mac80211_hwsim: add sw_scan sw_scan_completemaster-2010-04-08Luis R. Rodriguez
Simple pre-scan and scan complete callbacks, this at least shows to me that mac80211 will issue two scans at the same time on the same wiphy. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08ath5k: add bounds check to pdadc tableBob Copeland
We check the bounds on pdadc once when correcting for negative curves but not when we later copy values from from the pdadc_tmp array, leading to a potential overrun. Although we shouldn't hit this case in practice, let's be consistent. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08ath5k: fix race condition in tx desc processingBob Copeland
As pointed out by Benoit Papillault, there is a potential race condition between the host and the hardware in reading the next link in the transmit descriptor list: cpu0 hw tx for buf completed raise tx_ok interrupt process buf buf->ds_link = 0 read buf->ds_link This change checks txdp before processing a descriptor (if there are any subsequent descriptors) to see if hardware moved on. We'll then process this descriptor on the next tasklet. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08ath5k: clean up queue manipulationBob Copeland
Review spotted a couple of strange invocations to ieee80211_wake_queues that could potentially cause problems: - queues are awakened in the calibration tasklet before phy calibration, and then again after calibration - queues are awakened inside reset when we're trying to drain the ath5k transmit queues, and again after reset is completed (in callers to ath5k_reset_wake). In both cases the first wake is unnecessary, so remove it. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08ath5k: correct channel setting for 2.5 mhz spacingBob Copeland
These channels aren't selectable anyway, but our calculations for 2.5 mhz frequencies are incorrect. The value is supposed to be: (frequency - reference) * (10/25) i.e., divide by 2.5, but we were instead doing: (10 * frequency - reference) / 25. Additionally, the check for (frequency % 5 == 2) had an extra subtraction that wasn't in madwifi HAL. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08mac80211: enhance tracingJohannes Berg
Enhance tracing by adding tracing for a variety of callbacks that the drivers call, and also for internal calls (currently limited to queue status). This can aid debugging what is going on in mac80211 in interaction with drivers, since we can now see what drivers call and not just what mac80211 calls in the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-08rt2x00: use rt2800_config_channel_rt3x for rt2872Helmut Schaa
rt2872 needs the same rf register setup as rt3070 and rt3090, hence use rt2800_config_channel_rt3x instead of rt2800_config_channel_rt2x. This change allows me to actually switch channels and hence scan all configured channels on the RT305x SoC platform (which uses a rt2872) here. 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> Tested-by: Luis Correia <luis.f.correia@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>