1. 25 8月, 2011 1 次提交
  2. 22 8月, 2011 14 次提交
  3. 08 7月, 2011 1 次提交
    • A
      wl12xx: start/stop queues according to global per-AC counters · f1a46384
      Arik Nemtsov 提交于
      Split tx_queue_count to count per-AC skb's queued, instead of relying on
      the skb-queue len. The skb queues used were only valid in STA-mode, as
      AP-mode uses per-link queues.
      
      This fixes a major regression in AP-mode, caused by the patch
      "wl12xx: implement Tx watermarks per AC". With that patch applied, we
      effectively had no regulation of Tx queues in AP-mode. Therefore a
      sustained high rate of Tx could cause exhaustion of the skb memory pool.
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      f1a46384
  4. 06 7月, 2011 4 次提交
  5. 27 6月, 2011 3 次提交
  6. 02 5月, 2011 3 次提交
  7. 19 4月, 2011 11 次提交
    • I
      wl12xx: Simplify TX blocks accounting · d2f4d47d
      Ido Yariv 提交于
      The total number of TX memory blocks may change when the dynamic memory
      option is enabled. The current implementation only tracks the available
      memory blocks, which over-complicates TX blocks accounting.
      
      By tracking the number of allocated blocks, calculation of the number of
      available blocks becomes simpler and cleaner. It simply equals the total
      number of TX memory blocks minus the allocated ones.
      
      Also, remove some unnecessary castings and use union member accesses
      instead.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      d2f4d47d
    • I
      wl12xx: Clean up the dummy packet mechanism · 990f5de7
      Ido Yariv 提交于
      The current implementation allocates a skb each time one is requested by
      the firmware. Since dummy packets are handled differently than regular
      packets, the skb needs to be marked. Currently, this is done by
      setting the pkt_type member to 5. This might not be safe, as we cannot
      be sure that there won't be any other packets with this pkt_type value.
      
      Since the packet does not change from one request to another, we can
      simply allocate a dummy packet template and always send it. All changes
      to the skb done during packet preparation must be reverted, so the same
      skb can be reused.
      
      The dummy packets are not transmitted, therefore there's no need to set
      the BSSID or our own MAC address.
      
      In addition, the header portion of the packet was zeroed by mistake, so
      fix that as well.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      990f5de7
    • I
      wl12xx: Clean up the block size alignment code · 0da13da7
      Ido Yariv 提交于
      Simplify and clean up the block size alignment code:
      1. Set the block size according to the padding field type, as it cannot
         exceed the maximum value this field can hold.
      2. Move the alignment code into a function instead of duplicating it in
         multiple places.
      3. In the current implementation, the block_size member can be
         misleading because a zero value actually means that there's no need to
         align. Declare a block size alignment quirk instead.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      0da13da7
    • O
      wl12xx: fix roaming · c5745187
      Ohad Ben-Cohen 提交于
      The wl12xx device normally drops all frames coming from BSSID
      it is not joined with.
      
      This behavior is configured today by the wl12xx driver in response
      to a handful of ieee80211_bss_change and ieee80211_conf_changed
      notification flags, such as BSS_CHANGED_ASSOC, BSS_CHANGED_BSSID,
      IEEE80211_CONF_CHANGE_IDLE, etc..
      
      This breaks when we roam to a new BSSID, where authentication frames
      are sent before any BSS_CHANGED/CONF_CHANGED flags are received.
      When this happens the hardware silently drops the authentication
      responses, and the roaming fails.
      
      Ideally this aggressive filtering behavior of the device should be disabled
      upon a notification from mac80211. Such notification will take place
      after multi-channel support will be added: mac80211 will likely send a
      remain-on-channel notification to drivers when entering sensitive
      states (like authentication), otherwise the firmware might jump to
      different channels (to serve a different role).
      
      Until those notifications materialize, disable the hw BSSID filter
      when authentication requests are sent, so roaming would work.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      c5745187
    • E
      wl12xx: rearrange some ELP wake_up/sleep calls · c1b193eb
      Eliad Peller 提交于
      ELP (Extremely/Enhanced Low Power, or something like that ;)) refers to
      the powerstate of the 12xx chip, in which very low power is consumed,
      and no commands (from the host) can be issued until the chip is woken up.
      
      Wakeup/sleep commands must be protected by a wl->mutex, so it's generally
      a good idea to call wakeup/sleep along with the mutex lock/unlock (where
      needed). However, in some places the wl12xx driver calls wakeup/sleep in
      some "inner" functions. This result in some "nested" wakeup/sleep calls
      which might end up letting the chip go to sleep prematurely (e.g. during
      event handling).
      
      Fix it by rearranging the elp calls to come along with mutex_lock/unlock.
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      c1b193eb
    • L
      wl12xx: set the skbuff priority for dummy packets · 18b92ffa
      Luciano Coelho 提交于
      The firmware requires dummy packets to be sent using TID 7
      (WL1271_TID_MGMT).  Instead of hardcoding it in the tx_fill_hdr()
      function, set it when creating the packet itself.
      
      This requires Eliad's fix to set the actual TID in the TX descriptor.
      
      Cc: Ido Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      18b92ffa
    • E
      wl12xx: set the actual tid instead of the ac · db674d24
      Eliad Peller 提交于
      When passing a tx frame, the driver incorrectly set desc->tid
      with the ac instead of the actual tid.
      
      It has some serious implications when using 802.11n + QoS,
      as the fw starts a BlockAck with the wrong tid (which finally
      cause beacon loss and disconnection / some fw crash)
      
      Fix it by using the actual tid stored in skb->priority.
      Reported-by: NShahar Levi <shahar_levi@ti.com>
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Reviewed-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      db674d24
    • L
      wl12xx: use 1 spare TX block instead of two · e7ddf549
      Luciano Coelho 提交于
      All the new firmware versions (>=6.1.3.50.58 for STA and >=6.2.0.0.47
      for AP) use 1 spare TX block.  We still want to support older
      firmwares that require 2 spare blocks, so added a quirk to handle the
      difference.
      
      Also implemented a generic way of setting quirks that depend on the
      firmware revision.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      e7ddf549
    • S
      wl12xx: 1281/1283 support - Add dummy packet support · ae47c45f
      Shahar Levi 提交于
      Support sending dummy packet to wl128x FW as results of
      dummy packet event. That is part of dynamic TX mem blocks mechanism.
      
      Only send dummy packet when not in AP mode.
      
      [Even though the DUMMY_PACKET_EVENT_ID and the
      STA_REMOVE_COMPLETE_EVENT_ID events are defined to the same value, we
      need to treat them separately in the code.  Keep the check and enable
      STA_REMOVE_COMPLETE_EVENT_ID for AP mode and DUMMY_PACKET_EVENT_ID for
      STA.  Moved one warning to a cleaner place.  Use WL1271_TID_MGMT for
      dummy packets -- Luca]
      Signed-off-by: NShahar Levi <shahar_levi@ti.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      ae47c45f
    • S
      wl12xx: 1281/1283 support - Improve Tx & Rx path · ae77eccf
      Shahar Levi 提交于
      Reduced bus transactions in the Tx & Rx path.
      
      [Removed unnecessary check wl->chip.id != CHIP_ID_1283_PG20 when
      checking the quirk -- Luca]
      Signed-off-by: NShahar Levi <shahar_levi@ti.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      ae77eccf
    • S
      wl12xx: 1281/1283 support - Add acx commands · 48a61477
      Shahar Levi 提交于
      New acx command that sets: Rx fifo enable reduced bus transactions
      in RX path. Tx bus transactions padding to SDIO block size that
      improve preference in Tx and essential for working with SDIO HS (48Mhz).
      The max SDIO block size is 256 when working with Tx bus transactions
      padding to SDIO block.
      
      Add new ops to SDIO & SPI that handles the win size change in case of
      transactions padding (relevant only for SDIO).
      
      [Fix endianess issues; simplify sdio-specific block_size handling;
      minor changes in comments; use "aligned_len" in one calculation
      instead of "pad" to avoid confusion -- Luca]
      Signed-off-by: NShahar Levi <shahar_levi@ti.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      48a61477
  8. 03 3月, 2011 3 次提交
    • I
      wl12xx: Switch to a threaded interrupt handler · a620865e
      Ido Yariv 提交于
      To achieve maximal throughput, it is very important to react to
      interrupts as soon as possible. Currently the interrupt handler wakes up
      a worker for handling interrupts in process context. A cleaner and more
      efficient design would be to request a threaded interrupt handler.  This
      handler's priority is very high, and can do blocking operations such as
      SDIO/SPI transactions.
      
      Some work can be deferred, mostly calls to mac80211 APIs
      (ieee80211_rx_ni and ieee80211_tx_status). By deferring such work to a
      different worker, we can keep the irq handler thread more I/O
      responsive. In addition, on multi-core systems the two threads can be
      scheduled on different cores, which will improve overall performance.
      
      The use of WL1271_FLAG_IRQ_PENDING & WL1271_FLAG_IRQ_RUNNING was
      changed. For simplicity, always query the FW for more pending
      interrupts. Since there are relatively long bursts of interrupts, the
      extra FW status read overhead is negligible. In addition, this enables
      registering the IRQ handler with the ONESHOT option.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      a620865e
    • 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: 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