1. 22 8月, 2011 7 次提交
  2. 09 8月, 2011 1 次提交
  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 5 次提交
  5. 27 6月, 2011 6 次提交
  6. 08 6月, 2011 1 次提交
  7. 13 5月, 2011 5 次提交
  8. 02 5月, 2011 2 次提交
  9. 29 4月, 2011 1 次提交
    • A
      wl12xx: support FW TX inactivity triggers · 47684808
      Arik Nemtsov 提交于
      In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events.
      Both are reported to the upper layers as a TX failure in the offending
      stations.
      
      In STA mode we register only for the MAX_TX_RETRY event. A TX failure is
      interpreted as a loss of connection.
      
      Support for IEEE80211_HW_REPORTS_TX_ACK_STATUS has been removed to avoid
      the inherent race condition of a mac80211 TX failure counter in addition
      to the FW counter.
      
      This patch depends on "mac80211: allow low level driver to report packet
      loss"
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47684808
  10. 19 4月, 2011 11 次提交
    • I
      wl12xx: Handle platforms without level trigger interrupts · 341b7cde
      Ido Yariv 提交于
      Some platforms are incapable of triggering on level interrupts. Add a
      platform quirks member in the platform data structure, as well as an
      edge interrupt quirk which can be set on such platforms.
      
      When the interrupt is requested with IRQF_TRIGGER_RISING, IRQF_ONESHOT
      cannot be used, as we might miss interrupts that occur after the FW
      status is cleared and before the threaded interrupt handler exits.
      
      Moreover, when IRQF_ONESHOT is not set, iterating more than once in the
      threaded interrupt handler introduces a few race conditions between this
      handler and the hardirq handler. Currently this is worked around by
      limiting the loop to one iteration only. This workaround has an impact
      on performance. To remove to this restriction, the race conditions will
      need to be addressed.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      341b7cde
    • 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
    • J
      wl12xx: Handle duplicate calling of remove interface · 13026dec
      Juuso Oikarinen 提交于
      Because of the hardware recovery mechanism, its possible the
      __wl1271_op_remove_interface is called twice. Currently, this leads to a
      kernel crash even before a kernel WARNing can be issued.
      
      Fix this.
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      13026dec
    • L
      wl12xx: use a bitmask instead of list of booleans in scanned_ch · 4a31c11c
      Luciano Coelho 提交于
      We were using an array of booleans to mark the channels we had already
      scanned.  This was causing a sparse error, because bool is not a type
      with defined size.  To fix this, use bitmasks instead, which is much
      cleaner anyway.
      
      Thanks Johannes Berg for the idea.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      4a31c11c
    • 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
    • A
      wl12xx: 1281/1283 support - Use different FW file for AP mode wl127x/wl128x chips · 1aed55fd
      Arik Nemtsov 提交于
      Choose a different FW for AP-mode wl127x and wl128x chips, base on chip
      ID at boot time.
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      1aed55fd
    • S
      wl12xx: 1281/1283 support - use dynamic memory for the RX/TX pools · 13b107dd
      Shahar Levi 提交于
      Separate the memory configuration to chip-specific structures and
      implement dynamic memory for wl128x.
      
      This feature allows us to move TX memory blocks to the RX pool when
      the RX path is overloaded.
      
      Thanks for Arik Nemtsov <arik@wizery.com> for helping simplify the
      wl1271_fw_status() code.
      
      [Rewrote the commit subject and message for clarity; improved some
      comments and changed "spare" to "padding" for consistency; added a
      FIXME for the AP memory configuration -- 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>
      13b107dd
    • S
      wl12xx: 1281/1283 support - New boot sequence · 5ea417ae
      Shahar Levi 提交于
      Boot sequence support FREF clock and TCXO clock.
      WL128x has two clocks input - TCXO and FREF.
      TCXO is the main clock of the device, while FREF is used to sync
      between the GPS and the cellular modem.
      Auto-detection checks where TCXO is 32.736MHz or 16.368MHz, in that
      case the FREF will be used as the WLAN/BT main clock.
      
      [Use clock enumeration as defined in linux/wl12xx.h; remove
      unnecessary else block in wl128x_switch_fref; remove unnecessary
      change in main.c; remove some unnecessary debug prints and comments;
      fix potential use of uninitialized value (pll_config) -- 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>
      5ea417ae
    • S
      wl12xx: 1281/1283 support - Loading FW & NVS · bc765bf3
      Shahar Levi 提交于
      Take care of FW & NVS with the auto-detection between wl127x and
      wl128x.
      
      [Moved some common code outside if statements and added notes about
      NVS structure assumptions; Fixed a bug when checking the nvs size: if
      the size was incorrect, the local nvs variable was set to NULL, it
      should be wl->nvs instead. -- Luca]
      
      [Merged with potential buffer overflow fix -- 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>
      bc765bf3