1. 02 5月, 2011 28 次提交
  2. 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
  3. 19 4月, 2011 11 次提交
    • L
      wl12xx: fix sparse warning about undeclared wl12xx_alloc_dummy_packet · cf27d867
      Luciano Coelho 提交于
      Fix sparse warning:
      
        CHECK   drivers/net/wireless/wl12xx/main.c
      drivers/net/wireless/wl12xx/main.c:1246:17: warning: symbol 'wl12xx_alloc_dummy_packet' was not declared. Should it be static?
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      cf27d867
    • L
      wl12xx: remove unused conf_radio_params structure · 4ec23d6e
      Luciano Coelho 提交于
      This structure has not been used anymore since commit
      e6b190ff.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      4ec23d6e
    • L
      wl12xx: move hardcoded hci_io_ds value into the conf struct · afb7d3cd
      Luciano Coelho 提交于
      Instead of hardcoding the hci_io_ds configuration that we write to the
      SDIO_IO_DS top registed, read it from the default configuration so
      that it's easier to change for different platforms.
      Reported-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      afb7d3cd
    • L
      wl12xx: use kstrtoul functions · 6277ed65
      Luciano Coelho 提交于
      Use the new kstrtoul functions instead of the deprecated strict_strtoul().
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      6277ed65
    • 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
    • I
      wl12xx: Clean up and fix the 128x boot sequence · d29633b4
      Ido Yariv 提交于
      Clean up the boot sequence code & fix the following issues:
      1. Always read the registers' values and set the relevant bits instead of
         zeroing all other bits
      2. Handle cases where wl1271_top_reg_read returns an error
      3. Verify that the HW can detect the selected clock source
      4. Remove 128x PG10 initialization code
      5. Configure the MCS PLL to work in HP mode
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      d29633b4
    • O
      wl12xx: fix "JOIN while associated" commentary · 8bf69aae
      Ohad Ben-Cohen 提交于
      Issuing multiple JOIN commands to the wl12xx's firmware, while
      we're associated, might have undesired implications, so the driver
      prints a message when that happens, and warn developers who check
      out the source.
      
      Update the commentary in order to consider the one valid scenario
      where this can happen: roaming.
      
      Cautiously keep the message for now, until we either gain confidence
      there are no unintentional JOIN-while-associated events, or until
      we move to the new multi-role fw who solves this multiple-join issue
      for good.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      8bf69aae
    • 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