1. 13 5月, 2011 8 次提交
  2. 02 5月, 2011 15 次提交
  3. 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
  4. 19 4月, 2011 16 次提交
    • 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: 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
    • 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
    • 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
    • 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
    • A
      wl12xx: configure channel/band while FW is off · 17e672d6
      Arik Nemtsov 提交于
      Initialize the channel and band from mac80211 conf even when the FW is
      not yet loaded. This mitigates a bug in AP-mode where the channel was
      never changed from its initial setting after FW boot and was therefore
      never configured to FW.
      Reported-by: NAlexander Boukaty <alexanderb@ti.com>
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      17e672d6
    • 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: fix a couple of sparse warnings about undeclared functions · 4623ec7d
      Luciano Coelho 提交于
      Fix the following sparse warnings:
      
      drivers/net/wireless/wl12xx/main.c:1129:5: warning: symbol '__wl1271_plt_stop' was not declared. Should it be static?
      drivers/net/wireless/wl12xx/main.c:2988:5: warning: symbol 'wl1271_op_ampdu_action' was not declared. Should it be static?
      
      Both functions should be static.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      4623ec7d
    • L
      wl12xx: fix SG BT load value to reflect its new meaning · d9482e2b
      Luciano Coelho 提交于
      The Soft Gemini BT load ratio value has changed its meaning with FW
      version 6.1.0.0.310.  It now means the passive scan compensation
      percentage during A2DP EDR.  Instead of 50, we need to use 200.
      
      Fix the SG configuration accordingly.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      d9482e2b
    • 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