1. 13 Dec, 2010 7 commits
    • Mohammed Shafi Shajakhan's avatar
      ath9k: clean up hardware code for beacon handling · f33fdcf1
      Mohammed Shafi Shajakhan authored
      The registers TBTT_TIMER ,DMA_BEACON_ALERT ,NEXT_SWBA are need to be
      configured only for AP and IBSS mode.
      
      SWBA register is used for generating software interrupts so that beacon
      frames will be created by the software.DMA beacon alert register is
      to indicate the hardware to DMA the contents of beacon buffer to PCU buffer
      and TBTT to start transmitting the packet buffer to the base band.
      Clearly these things are not needed for station/monitor mode so
      remove configuring them.
      
      Cc: doug dahlby <ddahlby@atheros.com>
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      f33fdcf1
    • Sven Neumann's avatar
      cfg80211: update information elements in cached BSS struct · 01123e23
      Sven Neumann authored
      When a cached BSS struct is updated because a new beacon was received,
      the code replaces the cached information elements by the IEs from the
      new beacon. However it did not update the pub.information_elements
      and pub.len_information_elements fields leaving them either pointing
      to the old beacon IEs or in an inconsistent state where the data is
      replaced by the new beacon IEs but len_information_elements still has
      its value from the first beacon.
      
      Fix this by updating the information elements fields if they are
      pointing to beacon IEs.
      Signed-off-by: default avatarSven Neumann <s.neumann@raumfeld.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      01123e23
    • Rajkumar Manoharan's avatar
      ath: Missed to clear key4 of micentry · 998d516d
      Rajkumar Manoharan authored
      key4 of micentry is used, if ATH_CRYPT_CAP_MIC_COMBINED is set.
      But is not cleared on key cache reset.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      998d516d
    • Rajkumar Manoharan's avatar
      ath9k: Add change_interface callback · 6b3b991d
      Rajkumar Manoharan authored
      Add support to change interface type
      without bringing down the interface.
      Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      6b3b991d
    • Bruno Randolf's avatar
      cfg80211: Add antenna availability information · a7ffac95
      Bruno Randolf authored
      Add a field to wiphy for the hardware to report the availble antennas for
      configuration. Only if this is set to something bigger than zero, will the
      anntenna configuration ops be executed.
      
      Allthough this could be a simple number of antennas, I defined it as a bitmap
      of antennas which are available for configuration, since it's more consistent
      with the rest of the antenna API and there could be cases where the
      hardware allows only configuration of certain antennas. As it does not make
      much of a difference in size or normal usage, I think it's better to be able to
      support this, in case the need arises.
      
      The antenna configuration is now also checked against the availabe antennas and
      rejected if it does not match.
      Signed-off-by: default avatarBruno Randolf <br1@einfach.org>
      
      --
      v3:	always apply available antenna mask (for "all" antennas case).
      
      v2:	reject antenna configurations which don't match the available antennas
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a7ffac95
    • Luis R. Rodriguez's avatar
      ath9k: fix assumptions for idle calls on suspend/resume · a08e7ade
      Luis R. Rodriguez authored
      mac80211 will notify drivers when to go idle and ath9k
      assumed that it would get further notifications for idle
      states after a device stop() config call but as per agreed
      semantics the idle state of the radio is left up to driver
      after mac80211 issues the stop() callback. The driver is
      resposnbile for ensuring the device remains idle after
      that even between suspend / resume calls.
      
      This fixes suspend/resume when you issue suspend and resume
      twice on ath9k when ath9k_stop() was already called. We need
      to put the radio to full sleep in order for resume to work
      correctly.
      
      What might seem fishy is we are turning the radio off
      after resume. The reason why we do this is because we know
      we should not have anything enabled after a mac80211 tells
      us to stop(), if we resume and never get a start() we won't
      get another stop() by mac80211 so to be safe always bring
      the 802.11 device with the radio disabled after resume,
      this ensures that if we suspend we already have the radio
      disabled and only a start() will ever trigger it on.
      
      Cc: stable@kernel.org
      Cc: Paul Stewart <pstew@google.com>
      Cc: Amod Bodas <amod.bodas@atheros.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a08e7ade
    • Luis R. Rodriguez's avatar
      ath9k: Fix power save count imbalance on ath_radio_enable() · c2731b81
      Luis R. Rodriguez authored
      Upon a failure we never call ath9k_ps_restore() on ath_radio_enable(),
      this will throw off the sc->ps_usecount. When the sc->ps_usecount
      is > 0 we never put the chip to full sleep. This drains battery,
      and will also make the chip fail upon resume with:
      
      ath: Starting driver with initial channel: 5745 MHz
      ath: timeout (100000 us) on reg 0x7000: 0xdeadbeef & 0x00000003 != 0x00000000
      
      This would make the chip useless upon resume.
      
      I cannot prove this can happen but in theory it is so best to
      avoid this race completely and not have users complain about
      a broken device after resume.
      
      Cc: stable@kernel.org
      Cc: Paul Stewart <pstew@google.com>
      Cc: Amod Bodas <amod.bodas@atheros.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c2731b81
  2. 09 Dec, 2010 2 commits
  3. 08 Dec, 2010 24 commits
  4. 07 Dec, 2010 7 commits
    • Javier Cardona's avatar
      mac80211: Fix compilation error when mesh is disabled · 7659a193
      Javier Cardona authored
      Wrap mesh sections inside CONFIG_MAC80211_MESH to fix compilation
      problems reported by Stephen Rothwell, Larry Finger and Bruno Randolf.
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7659a193
    • Mohammed Shafi Shajakhan's avatar
      ath9k: Remove dead code in recv.c · cae6b74d
      Mohammed Shafi Shajakhan authored
      The structure struct ieee80211_rx_status *rxs is no longer needed to be
      passed to ath_rx_send_to_mac80211 function
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      cae6b74d
    • Mohammed Shafi Shajakhan's avatar
      ath9k: Parse DTIM period from mac80211 · 0ce3bcfc
      Mohammed Shafi Shajakhan authored
      With the current save power save implementation we assume a dtim period
      of 1.This value is assigned based on a sanity check in the driver
      eventhough we had not parsed it from mac80211.This patch obtains the actual
      DTIM period from AP by parsing it from mac80211.Yet for handling
      multicast traffic we may still have it as fixed rather than parsing it
      from mac80211 .This does not breaks power save or anything as the sleep
      duration is currently fixed in the driver.This patch may serve to improve
      power save in the future by using dtim period for sleep duration and using
      correct dtim period adhoc mode.
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0ce3bcfc
    • Mohammed Shafi Shajakhan's avatar
      ath9k: Properly use unlikely check macro · aaef24b4
      Mohammed Shafi Shajakhan authored
      AUTOSLEEP feature is enabled only for AR9271 and AR9003 version
      chipsets.So unlikely macro should be used only to check whether
      auto-sleep feature is enabled
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      aaef24b4
    • Sujith Manoharan's avatar
      ath9k_htc: Fix panic on FW download failure · caa0a99a
      Sujith Manoharan authored
      Use the correct error condition exit in case firmware download
      fails for some reason. Not doing so results in a panic:
      
      usb 1-3: ath9k_htc: Transferred FW: ar9271.fw, size: 51280
      usb 1-3: ath9k_htc: Firmware - ar9271.fw download failed
      usb 1-3: ath9k_htc: Target is unresponsive
      Failed to initialize the device
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      Pid: 2823, comm: insmod Tainted: G        W   2.6.37-rc4-wl #11
      Call Trace:
      [<ffffffff81090d7e>] __lock_acquire+0xe3e/0x1d00
      [<ffffffff813a9f14>] ? restore_args+0x0/0x30
      [<ffffffff81058af1>] ? vprintk+0x321/0x500
      [<ffffffff81092290>] lock_acquire+0xa0/0x190
      [<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffff813a8ea8>] _raw_spin_lock_irq+0x48/0x60
      [<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffff813a53fd>] ? printk+0x3c/0x3f
      [<ffffffffa02a0eac>] usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffffa0055388>] ath9k_hif_usb_dealloc_urbs+0x18/0x40 [ath9k_htc]
      [<ffffffffa00557d7>] ath9k_hif_usb_probe+0x227/0x3d0 [ath9k_htc]
      [<ffffffffa02a56ac>] usb_probe_interface+0x10c/0x210 [usbcore]
      [<ffffffff812ae826>] driver_probe_device+0x96/0x1c0
      [<ffffffff812ae9f3>] __driver_attach+0xa3/0xb0
      [<ffffffff812ae950>] ? __driver_attach+0x0/0xb0
      [<ffffffff812ad6ae>] bus_for_each_dev+0x5e/0x90
      [<ffffffff812ae4c9>] driver_attach+0x19/0x20
      [<ffffffff812ae038>] bus_add_driver+0x168/0x320
      [<ffffffff812aec71>] driver_register+0x71/0x140
      [<ffffffff811fc338>] ? __raw_spin_lock_init+0x38/0x70
      [<ffffffffa02a438c>] usb_register_driver+0xdc/0x190 [usbcore]
      [<ffffffffa0063000>] ? ath9k_htc_init+0x0/0x4f [ath9k_htc]
      [<ffffffffa005599e>] ath9k_hif_usb_init+0x1e/0x20 [ath9k_htc]
      [<ffffffffa006302b>] ath9k_htc_init+0x2b/0x4f [ath9k_htc]
      [<ffffffff8100212f>] do_one_initcall+0x3f/0x180
      [<ffffffff8109ef9b>] sys_init_module+0xbb/0x200
      [<ffffffff8100bf52>] system_call_fastpath+0x16/0x1b
      Signed-off-by: default avatarSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      caa0a99a
    • Sujith Manoharan's avatar
    • Sujith Manoharan's avatar
      ath9k_htc: Cleanup device identification · 0b5ead91
      Sujith Manoharan authored
      ath.ko is a common module shared between ath5k, ar9170usb, ath9k and ath9k_htc.
      Adding driver specific data to the shared structure would impact all the
      drivers. Handling USB device recognition for devices specific to ath9k_htc
      can be handled within the driver itself.
      
      Also, AR7010 refers to the processor used in both AR9280/AR9287 based
      devices. Rename the device enumerations accordingly.
      
      While at it, check properly for the bus type when choosing the EEPROM
      base address for UB95.
      Signed-off-by: default avatarSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0b5ead91