1. 30 8月, 2008 2 次提交
    • M
      rt2x00: Only configure hardware when radio is enabled · 2575c11d
      Mattias Nissler 提交于
      Some hardware configuration registers such as antenna and channel configuration
      can only be written when the radio is enabled. Previously, we didn't consider
      this, so some configuration items could be set inconsistently after reenabling
      the radio. This patch changes the config() handler to only reprogram the
      hardware when the radio is enabled. Configuration changes that are made while
      the radio is off are postponed until the radio is switched back on. We also
      leave the radio turned off during initialization and only enable it when
      requested by mac80211. This allows us to get rid of the DIRTY_CONFIG flag,
      because the device is now guaranteed to be completely initialized when brought
      up by mac80211.
      Signed-off-by: NMattias Nissler <mattias.nissler@gmx.de>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2575c11d
    • I
      rt2x00: Fix race conditions in flag handling · 0262ab0d
      Ivo van Doorn 提交于
      Some of the flags should be accessed atomically to
      prevent race conditions. The flags that are most important
      are those that can change often and indicate the actual
      state of the device, queue or queue entry.
      
      The big flag rename was done to move all state flags to
      the same naming type as the other rt2x00dev flags and
      made sure all places where the flags were used were changed. ;)
      
      Thanks to Stephen for most of the queue flags updates,
      which fixes some of the most obvious consequences of the
      race conditions. Among those the notorious:
      
      rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
      rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
      rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
      Signed-off-by: NStephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0262ab0d
  2. 23 8月, 2008 2 次提交
  3. 07 8月, 2008 1 次提交
  4. 02 8月, 2008 1 次提交
  5. 30 7月, 2008 4 次提交
  6. 15 7月, 2008 5 次提交
  7. 09 7月, 2008 1 次提交
  8. 28 6月, 2008 1 次提交
    • I
      rt2x00: Fix lock dependency errror · 980dfcb9
      Ivo van Doorn 提交于
      This fixes a circular locking dependency in the workqueue handling.
      The interface work task uses the mac80211 function
      ieee80211_iterate_active_interfaces() which grabs the RTNL lock.
      
      However when the interface is brough down, this happens under the RTNL
      lock as well, this causes problems because mac80211 will flush the workqueue
      during the ifdown event. This causes mac80211 to wait until the driver has
      completed all work which can't finish because it is waiting on the RTNL lock.
      
      This is fixed by moving rt2x00 workqueue tasks on a different workqueue,
      this workqueue can be flushed when the ieee80211_hw structure is removed
      by the driver (when the driver is unloaded) which does not happen under the
      RTNL lock.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      980dfcb9
  9. 15 6月, 2008 4 次提交
  10. 29 5月, 2008 1 次提交
  11. 22 5月, 2008 3 次提交
  12. 08 5月, 2008 5 次提交
  13. 02 4月, 2008 3 次提交
  14. 26 3月, 2008 1 次提交
    • I
      rt2x00: Fix in_atomic() usage · 3a643d24
      Ivo van Doorn 提交于
      rt73usb and rt2500usb used in_atomic to determine
      if a configuration step should be rescheduled or not.
      Since in_atomic() is not a valid method to determine
      if sleeping is allowed we should fix the way this is handled
      by adding a new flag to rt2x00.
      
      In addition mark LED class support for the drivers broken
      since that also uses the broken in_atomic() method but
      so far no solution exists to have LED triggers work only
      in scheduled context.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3a643d24
  15. 14 3月, 2008 2 次提交
  16. 01 3月, 2008 4 次提交
    • I
      rt2x00: Don't report driver generated frames to tx_status() · baf26a7e
      Ivo van Doorn 提交于
      This adds a new flag for the skb_frame_desc structure which is used to tag
      rts/cts frames that are generated by the driver. Through the tag we can
      recognize frames we have generated ourselves, so we don't report their tx
      status to mac80211.
      
      This patch is based on the original patch by
      Mattias Nissler <mattias.nissler@gmx.de>.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      baf26a7e
    • I
      rt2x00: Fix scheduling while atomic errors in usb drivers · e44df929
      Ivo van Doorn 提交于
      Call rt2x00_config_intf() outside of the spinlock context since
      the call will sleep for USB drivers. By using the ieee80211_if_conf
      values as arguments we make keep access tp rt2x00_intf thread safe
      even without the lock.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e44df929
    • I
      rt2x00: Move beacon and atim queue defines into rt2x00 · 5957da4c
      Ivo van Doorn 提交于
      As Johannes Berg indicated the BEACON and AFTER_BEACON
      queue indeces in mac80211 should be removed because they
      are too hardware specific. This patch adds the queue index
      defines into rt2x00queue.h and removes the dependency of
      the defines inside mac80211.h.
      
      Also move rt2x00pci_beacon_update() into rt2400pci and
      rt2500pci individually since it is no longer a generic
      function since rt61 and rt2800 no longer use that.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5957da4c
    • I
      rt2x00: Add per-interface structure · 6bb40dd1
      Ivo van Doorn 提交于
      Rework the interface handling. Delete the interface structure
      and replace it with a per-interface structure. This changes the
      way rt2x00 handles the active interface drastically.
      
      Copy ieee80211_bss_conf to the this rt2x00_intf structure during
      the bss_info_changed() callback function. This will allow us to
      reference it later, and removes the requirement for the device flag
      SHORT_PREAMBLE flag which is interface specific.
      
      Drivers receive the option to give the maximum number of virtual
      interfaces the device can handle. Virtual interface support:
      rt2400pci: 1 sta or 1 ap, * monitor interfaces
      rt2500pci: 1 sta or 1 ap, * monitor interfaces
      rt2500usb: 1 sta or 1 ap, * monitor interfaces
      rt61pci: 1 sta or 4 ap, * monitor interfaces
      rt73usb: 1 sta or 4 ap, * monitor interfaces
      
      At the moment none of the drivers support AP and STA interfaces
      simultaneously, this is a hardware limitation so future support
      will be very unlikely.
      
      Each interface structure receives its dedicated beacon entry,
      with this we can easily work with beaconing while multiple master
      mode interfaces are currently active.
      
      The configuration handlers for the MAC, BSSID and type are
      often called together since they all belong to the interface
      configuration. Merge the 3 configuration calls and cleanup
      the API between rt2x00lib and the drivers. While we are cleaning
      up the interface configuration anyway, we might as well clean up
      the configuration handler as well.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6bb40dd1