1. 03 3月, 2011 5 次提交
    • I
      wl12xx: Do end-of-transactions transfers only if needed · 606ea9fa
      Ido Yariv 提交于
      On newer hardware revisions, there is no need to write the host's
      counter at the end of a RX transaction. The same applies to writing the
      number of packets at the end of a TX transaction.
      
      It is generally a good idea to avoid unnecessary SDIO/SPI transfers.
      Throughput and CPU usage are improved when avoiding these.
      
      Send the host's RX counter and the TX packet count only if needed, based
      on the hardware revision.
      
      [Changed WL12XX_QUIRK_END_OF_TRANSACTION to use BIT(0) -- Luca]
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      606ea9fa
    • I
      wl12xx: Reorder data handling in irq_work · 8aad2464
      Ido Yariv 提交于
      The FW has a limited amount of memory for holding frames. In case it
      runs out of memory reserved for RX frames, it'll have no other choice
      but to drop packets received from the AP. Thus, it is important to
      handle RX data interrupts as soon as possible, before handling anything
      else.
      
      In addition, since there are enough TX descriptors to go around, it is
      better to first send TX frames, and only then handle TX completions.
      
      Fix this by changing the order of function calls in wl1271_irq_work.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      8aad2464
    • I
      wl12xx: Remove private headers in wl1271_tx_reset · 50e9f746
      Ido Yariv 提交于
      Frames in the tx_frames array include extra private headers, which must
      be removed before passing the skbs to ieee80211_tx_status.
      
      Fix this by removing any private headers in wl1271_tx_reset, similar to
      how this is done in wl1271_tx_complete_packet.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      50e9f746
    • I
      wl12xx: Don't rely on runtime PM for toggling power · 11251e7e
      Ido Yariv 提交于
      Runtime PM might not always be enabled. Even if it is enabled in the
      running kernel, it can still be temporarily disabled, for instance
      during suspend. Runtime PM is opportunistic in nature, and should not be
      relied on for toggling power.
      
      In case the interface is removed and re-added while runtime PM is
      disabled, the FW will fail to boot, as it is mandatory to toggle power
      between boots. For instance, this can happen during suspend in case one
      of the devices fails to suspend before the MMC host suspends, but after
      mac80211 was suspended. The interface will be removed and reactivated
      without toggling the power.
      
      Fix this by calling mmc_power_save_host/mmc_power_restore_host in
      wl1271_sdio_power_on/off functions. It will toggle the power to the chip
      even if runtime PM is disabled. The runtime PM functions should still be
      called to make sure runtime PM does not opportunistically power the chip
      off (e.g. after resuming from system suspend).
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      11251e7e
    • S
      wl12xx: fix the path to the wl12xx firmwares · f62c317c
      Sebastien Jan 提交于
      In the linux-firmware git tree, the firmwares and the NVS are inside
      the ti-connectivity directory.  Fix the filenames that the driver
      looks for accordingly.
      
      [Fixed commit message and merged with the latest changes. -- Luca]
      Signed-off-by: NSebastien Jan <s-jan@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      f62c317c
  2. 02 3月, 2011 3 次提交
    • R
      b43: N-PHY: rev3+: add static tables · 27b4eb26
      Rafał Miłecki 提交于
      This finally makes TX on OFDM rates possible on my dev with PHY rev 4.
      We still have lower performance than wl, but at least speeds around 15M
      become possible.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      27b4eb26
    • C
      rtlwifi: Fix error registering rate-control · 375ff4c7
      Chaoming Li 提交于
      When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt
      to register a rate-control mechanism fails with the warning shown below. The fix is to
      select the RC mechanism when rtlwifi is initialized.
      
      WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [mac80211]()
      Hardware name: HP Pavilion dv2700 Notebook PC
      Modules linked in: arc4 ecb rtl8192ce rtl8192cu(+) rtl8192c_common rtlwifi snd_hda_codec_conexant amd74xx(+) ide_core sg mac80211 snd_hda_intel snd_hda_codec i2c_nforce2 snd_pcm snd_timer cfg80211 snd k8temp hwmon serio_raw joydev i2c_core soundcore snd_page_alloc rfkill forcedeth video ac battery button ext3 jbd mbcache sd_mod ohci_hcd ahci libahci libata scsi_mod ehci_hcd usbcore fan processor thermal
      Pid: 2227, comm: modprobe Not tainted 2.6.38-rc6-wl+ #468
      Call Trace:
       [<ffffffff8104a3da>] ? warn_slowpath_common+0x7a/0xb0
       [<ffffffff8104a425>] ? warn_slowpath_null+0x15/0x20
       [<ffffffffa02de409>] ? ieee80211_rate_control_register+0xc9/0x100 [mac80211]
       [<ffffffffa03b3790>] ? rtl_rate_control_register+0x10/0x20 [rtlwifi]
       [<ffffffffa03ab9c9>] ? rtl_init_core+0x189/0x620 [rtlwifi]
       [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
       [<ffffffffa03b9dea>] ? rtl_usb_probe+0x709/0x82e [rtlwifi]
       [<ffffffffa002a7fd>] ? usb_match_one_id+0x3d/0xc0 [usbcore]
       [<ffffffffa002aae9>] ? usb_probe_interface+0xb9/0x160 [usbcore]
       [<ffffffff8126ed19>] ? driver_probe_device+0x89/0x1a0
       [<ffffffff8126eed3>] ? __driver_attach+0xa3/0xb0
       [<ffffffff8126ee30>] ? __driver_attach+0x0/0xb0
       [<ffffffff8126dd4e>] ? bus_for_each_dev+0x5e/0x90
       [<ffffffff8126e9d9>] ? driver_attach+0x19/0x20
       [<ffffffff8126e5e8>] ? bus_add_driver+0x158/0x290
       [<ffffffff8126f151>] ? driver_register+0x71/0x140
       [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
       [<ffffffffa002a2cc>] ? usb_register_driver+0xdc/0x190 [usbcore]
       [<ffffffffa0013000>] ? rtl8192cu_init+0x0/0x20 [rtl8192cu]
       [<ffffffffa001301e>] ? rtl8192cu_init+0x1e/0x20 [rtl8192cu]
       [<ffffffff810002cf>] ? do_one_initcall+0x3f/0x180
       [<ffffffff8108fd4b>] ? sys_init_module+0xbb/0x200
       [<ffffffff81002c7b>] ? system_call_fastpath+0x16/0x1b
       ---[ end trace 726271c07a47439e ]---
      rtlwifi:rtl_init_core():<0-0> rtl: Unable to register rtl_rc,use default RC !!
      ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
      Signed-off-by: NChaoming Li <chaoming_li@realsil.com.cn>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      375ff4c7
    • S
      ath9k_htc: Handle BSSID/AID for multiple interfaces · e7a2a4f5
      Sujith Manoharan 提交于
      The AID and BSSID should be set in the HW only for the
      first station interface or adhoc interface. Also, cancel
      the ANI timer in stop() for multi-STA scenario. And finally
      configure the HW beacon timers only for the first station
      interface.
      Signed-off-by: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e7a2a4f5
  3. 01 3月, 2011 12 次提交
    • S
      iwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.c · 67289941
      Stanislaw Gruszka 提交于
      There is no need to have separate iwl-agn-rx.c file after iwlegacy
      split.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      67289941
    • S
      iwlwifi: move check health code into iwl-rx.c · ad6e82a5
      Stanislaw Gruszka 提交于
      Remove check_plcp_health and check_ack_health ops methods, they are
      unneeded after iwlegacy driver split. Merge check health code into to
      iwl-rx.c and make functions static.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ad6e82a5
    • S
      iwlwifi: add {ack,plpc}_check module parameters · b7977ffa
      Stanislaw Gruszka 提交于
      Add module ack_check, and plcp_check parameters. Ack_check is disabled
      by default since is proved that check ack health can cause troubles.
      Plcp_check is enabled by default.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b7977ffa
    • S
      iwlegacy: fix dma mappings and skbs leak · 8a032c13
      Stanislaw Gruszka 提交于
      Fix possible dma mappings and skbs introduced by commit
      470058e0 "iwlwifi: avoid Tx queue
      memory allocation in interface down".
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8a032c13
    • S
      iwlwifi: fix dma mappings and skbs leak · 387f3381
      Stanislaw Gruszka 提交于
      Since commit commit 470058e0
      "iwlwifi: avoid Tx queue memory allocation in interface down" we do
      not unmap dma and free skbs when down device and there is pending
      transfer. What in consequence may cause that system hung (waiting
      for free skb's) when performing shutdown at iptables module unload.
      
      DMA leak manifest itself following warning:
      
      WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0()
      Hardware name: HP xw8600 Workstation
      pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240]
      Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn]
      Pid: 9131, comm: rmmod Tainted: G        W   2.6.38-rc6-wl+ #33
      Call Trace:
       [<ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0
       [<ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50
       [<ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0
       [<ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0
       [<ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0
       [<ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90
       [<ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20
       [<ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0
       [<ffffffff812f5808>] ? driver_detach+0xd8/0xe0
       [<ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100
       [<ffffffff812f6022>] ? driver_unregister+0x62/0xa0
       [<ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0
       [<ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn]
       [<ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270
       [<ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b
      
      I still can observe above warning after apply patch, but it is very
      hard to reproduce it, and have count=1. Whereas that one is easy to
      reproduce using debugfs force_reset while transmitting data, and have
      very big counts eg. 240, like quoted here. So count=1 WARNING seems
      to be different issue that need to be resolved separately.
      
      v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition.
      v2 -> v3: remove unneeded EXPORT_SYMBOL
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      387f3381
    • S
      ath9k: Fix incorrect GPIO LED pin for AR9485 · 15178535
      Senthil Balasubramanian 提交于
      AR9485 doesn't use the default GPIO pin for LED and GPIO 6 is actually
      used for this.
      Signed-off-by: NSenthil Balasubramanian <senthilkumar@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      15178535
    • F
      0cf55c21
    • F
      p54: fix a NULL pointer dereference bug · a5a7103f
      Felix Fietkau 提交于
      If the RSSI calibration table was not found or not parsed properly,
      priv->rssi_db will be NULL, p54_rssi_find needs to be able to deal
      with that.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Acked-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a5a7103f
    • A
      rtlwifi: fix places where uninitialized data is used · c2a7dca0
      Alessio Igor Bogani 提交于
      drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
      drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
      drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
      drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function
      
      This work was supported by a hardware donation from the CE Linux Forum.
      Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c2a7dca0
    • A
      rtlwifi: Add the missing rcu_read_lock/unlock · 701c2be0
      Alessio Igor Bogani 提交于
      ===================================================
      [ INFO: suspicious rcu_dereference_check() usage. ]
      ---------------------------------------------------
      net/mac80211/sta_info.c:125 invoked rcu_dereference_check() without protection!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      5 locks held by wpa_supplicant/468:
       #0:  (rtnl_mutex){+.+.+.}, at: [<c1465d84>] rtnl_lock+0x14/0x20
       #1:  (&rdev->mtx){+.+.+.}, at: [<f84b8c2b>] cfg80211_mgd_wext_siwfreq+0x6b/0x170 [cfg80211]
       #2:  (&rdev->devlist_mtx){+.+.+.}, at: [<f84b8c37>] cfg80211_mgd_wext_siwfreq+0x77/0x170 [cfg80211]
       #3:  (&wdev->mtx){+.+.+.}, at: [<f84b8c44>] cfg80211_mgd_wext_siwfreq+0x84/0x170 [cfg80211]
       #4:  (&rtlpriv->locks.conf_mutex){+.+.+.}, at: [<f8506476>] rtl_op_bss_info_changed+0x26/0xc10 [rtlwifi]
      
      stack backtrace:
      Pid: 468, comm: wpa_supplicant Not tainted 2.6.38-rc6+ #79
      Call Trace:
       [<c108806a>] ? lockdep_rcu_dereference+0xaa/0xb0
       [<f8523d2c>] ? sta_info_get_bss+0x19c/0x1b0 [mac80211]
       [<f8523d62>] ? ieee80211_find_sta+0x22/0x40 [mac80211]
       [<f850661c>] ? rtl_op_bss_info_changed+0x1cc/0xc10 [rtlwifi]
       [<c153671c>] ? __mutex_unlock_slowpath+0x14c/0x160
       [<c153673d>] ? mutex_unlock+0xd/0x10
       [<f8507180>] ? rtl_op_config+0x120/0x310 [rtlwifi]
       [<c10896db>] ? trace_hardirqs_on+0xb/0x10
       [<f8522169>] ? ieee80211_bss_info_change_notify+0xf9/0x1f0 [mac80211]
       [<f8506450>] ? rtl_op_bss_info_changed+0x0/0xc10 [rtlwifi]
       [<f853646f>] ? ieee80211_set_channel+0xbf/0xd0 [mac80211]
       [<f84b5f41>] ? cfg80211_set_freq+0x121/0x180 [cfg80211]
       [<f85363b0>] ? ieee80211_set_channel+0x0/0xd0 [mac80211]
       [<f84b8ceb>] ? cfg80211_mgd_wext_siwfreq+0x12b/0x170 [cfg80211]
       [<f84b87eb>] ? cfg80211_wext_siwfreq+0x9b/0x100 [cfg80211]
       [<c153b98b>] ? sub_preempt_count+0x7b/0xb0
       [<c150f874>] ? ioctl_standard_call+0x74/0x3b0
       [<c1465d84>] ? rtnl_lock+0x14/0x20
       [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
       [<c14568bd>] ? __dev_get_by_name+0x8d/0xb0
       [<c150fddb>] ? wext_handle_ioctl+0x16b/0x180
       [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
       [<c145bc7a>] ? dev_ioctl+0x5ba/0x720
       [<c108a947>] ? __lock_acquire+0x3e7/0x19b0
       [<c1443b0b>] ? sock_ioctl+0x1eb/0x290
       [<c108bfa5>] ? lock_release_non_nested+0x95/0x2f0
       [<c1443920>] ? sock_ioctl+0x0/0x290
       [<c114d74d>] ? do_vfs_ioctl+0x7d/0x5c0
       [<c1112232>] ? might_fault+0x62/0xb0
       [<c113e3c6>] ? fget_light+0x226/0x390
       [<c1112278>] ? might_fault+0xa8/0xb0
       [<c114dd17>] ? sys_ioctl+0x87/0x90
       [<c1002f9f>] ? sysenter_do_call+0x12/0x38
      
      This work was supported by a hardware donation from the CE Linux Forum.
      Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      701c2be0
    • D
      iwlwifi: remove duplicate initialization · c3371d64
      Dan Carpenter 提交于
      rate_mask is initialized again later so this can be removed.  Btw, if
      rate_control_send_low(sta, priv_sta, txrc) returns false, that means
      that "sta" is non-NULL.  That's why the second initialization of
      rate_mask is a little simpler than the first.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c3371d64
    • J
      at76c50x-usb: fix warning caused by at76_mac80211_tx now returning void · 10889f13
      John W. Linville 提交于
        CC [M]  drivers/net/wireless/at76c50x-usb.o
      drivers/net/wireless/at76c50x-usb.c: In function ‘at76_mac80211_tx’:
      drivers/net/wireless/at76c50x-usb.c:1759:4: warning: ‘return’ with a value, in function returning void
      
      This is fallout from commit 7bb45683
      ("mac80211: make tx() operation return void").
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      10889f13
  4. 27 2月, 2011 5 次提交
  5. 26 2月, 2011 10 次提交
  6. 25 2月, 2011 1 次提交
    • J
      rtl8192c: fix compilation errors · 41cae2d0
      Johannes Berg 提交于
      On my G5 this fails to compile with
      
      drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
      drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
      drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict
      drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict
      
      since you can't export static functions.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      41cae2d0
  7. 24 2月, 2011 4 次提交