1. 22 11月, 2008 6 次提交
    • I
      rt2x00: Optimize get_duration / get_duration_res · bad13639
      Ivo van Doorn 提交于
      We can optimize get_duration and get_duration_res
      by making them a macro. They are really simple
      calculation handlers so this doesn't matter much.
      
      Often (especially in rt2400pci and rt2500pci,
      the arguments are hardcoded, and the result value
      is passed into other hardcoded values.
      
      By making the functions a macro GCC can
      optimize the entire thing much better.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bad13639
    • I
      rt2x00: Cleanup TX/RX entry handling · 798b7adb
      Ivo van Doorn 提交于
      Merge the callback functions init_txentry() and
      init_rxentry(). This makes life in rt2x00lib a
      lot simpler and we can cleanup several functions.
      
      rt2x00pci contained "fake" FIELD definitions for
      descriptor words. This is not flexible since it
      assumes the driver will always have the same field
      to indicate if a driver is available or not.
      This should be dependent on the driver, and we
      should add a callback function for this.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      798b7adb
    • I
      rt2x00: Fix BUG_ON() with antenna handling · 6d64360a
      Ivo van Doorn 提交于
      With the new configuration handling, and more specifically
      splitting the configuration of the antenna from the normal
      configuration steps allowed a BUG_ON() to be triggered
      in the driver because the SW_DIVERSITY was send to the
      driver. This fixes that by catching the value early in
      rt2x00config.c and replacing it with a sensible value.
      
      This also fixes a problem where the antenna is not being
      initialized at all when the radio is enabled. Since it
      no longer is part of the mac80211 configuration the
      only place where rt2x00 configured it was the SW diversity
      handler. Obviously this is broken for all non-diversity
      hardware and breaks SW diversity due to a broken initialization.
      
      When the radio is enabled the antenna will be configured
      once as soon as the config() callback function is called.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6d64360a
    • I
      rt2x00: Block set_key() during suspend/shutdown · 8058409c
      Ivo van Doorn 提交于
      mac80211 will call set_key() when the device is
      shutting down. When the device is unplugged the
      keys will be lost automatically due to the power
      loss. When the device is not plugged but the module
      is only unloaded the keys can remain in the device
      hardware, when the module is loaded the keys will
      be cleaned up during initialization.
      
      This should prevent the problem reported by Johannes Berg,
      where unplugging the device while suspended resulted in
      a NULL pointer error during set_key() which was
      caused because of the CSR base address being freed.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8058409c
    • I
      rt2x00: Fix LED state handling · 9a95dba3
      Ivo van Doorn 提交于
      For every global LED state change (register/unregister,
      suspend/resume) we should force the LEDS to turn off.
      This makes sure that the LEDS will always be in a sane
      state after the state switch.
      
      Note that when unregister is called but the LED class
      wasn't resumed yet, we shouldn't change the LED state
      since we might not have access to the device (device
      was unplugged while suspended).
      
      Also remove the checks in the activity, assoc and
      radio LEDS which blocked calls to brightness_set()
      when the state hasn't changed. Some of those LEDS
      could be enabled by themselves when something happens
      in the hardware (e.g. firmware is loaded). We already
      did called rt2x00leds to switch the LED off, but those
      calls were blocked.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9a95dba3
    • I
      rt2x00: Remove RATE_BASIC flag · 3d8606a6
      Ivo van Doorn 提交于
      mac80211 is in charge of determining the basic rates,
      so we are not using the RATE_BASIC flag anymore.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d8606a6
  2. 11 11月, 2008 5 次提交
  3. 01 11月, 2008 6 次提交
  4. 31 10月, 2008 1 次提交
  5. 30 10月, 2008 1 次提交
  6. 28 10月, 2008 1 次提交
  7. 15 10月, 2008 1 次提交
  8. 07 10月, 2008 2 次提交
  9. 01 10月, 2008 1 次提交
  10. 25 9月, 2008 1 次提交
  11. 16 9月, 2008 2 次提交
    • J
      mac80211: fix virtual interfaces vs. injection · 25d834e1
      Johannes Berg 提交于
      Currently, virtual interface pointers passed to drivers might be
      from monitor interfaces and as such completely uninitialised
      because we do not tell the driver about monitor interfaces when
      those are created. Instead of passing them, we should therefore
      indicate to the driver that there is no information; do that by
      passing a NULL value and adjust drivers to cope with it.
      
      As a result, some mac80211 API functions also need to cope with
      a NULL vif pointer so drivers can still call them unconditionally.
      
      Also, when injecting frames we really don't want to pass NULL all
      the time, if we know we are the source address of a frame and have
      a local interface for that address, we can to use that interface.
      This also helps with processing the frame correctly for that
      interface which will help the 802.11w implementation. It's not
      entirely correct for VLANs or WDS interfaces because there the MAC
      address isn't unique, but it's already a lot better than what we
      do now.
      
      Finally, when injecting without a matching local interface, don't
      assign sequence numbers at all.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      25d834e1
    • J
      mac80211: use nl80211 interface types · 05c914fe
      Johannes Berg 提交于
      There's really no reason for mac80211 to be using its
      own interface type defines. Use the nl80211 types and
      simplify the configuration code a bit: there's no need
      to translate them any more now.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      05c914fe
  12. 12 9月, 2008 3 次提交
  13. 06 9月, 2008 1 次提交
  14. 03 9月, 2008 1 次提交
  15. 30 8月, 2008 7 次提交
  16. 23 8月, 2008 1 次提交