1. 13 1月, 2009 1 次提交
    • I
      rt2x00: Fix segementation fault · d15cfc3a
      Ivo van Doorn 提交于
      The queue_end() macro points to 1 position after the
      queue, which means that if we want to know if queue
      is at the end of the queue we should first increment
      the position and then check if it is a valid entry.
      
      This fixes a segmentation fault which only occurs when
      the device has enough endpoints to provide a dedicated
      endpoint for all TX queues (which likely won't happen
      for rt2500usb and rt73usb, but will happen for rt2800usb).
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d15cfc3a
  2. 26 11月, 2008 2 次提交
    • I
      rt2x00: Detect USB BULK in/out endpoints · f1ca2167
      Ivo van Doorn 提交于
      Instead of hardcoding the used in/out endpoints
      we should detect them by walking through all
      available endpoints.
      
      rt2800usb will gain the most out of this, because
      the legacy drivers indicate that there are multiple
      endpoints available.
      However this code might benefit at least rt73usb as
      well for the MIMO queues, and if we are really lucky
      rt2500usb will benefit because for the TX and PRIO
      queues.
      
      Even if rt2500usb and rt73usb do not get better performance
      after this patch, the endpoint detection still belongs to
      rt2x00usb, and it shouldn't hurt to always try to detect
      the available endpoints.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f1ca2167
    • I
      rt2x00: Move rt73usb register access wrappers into rt2x00usb · 0f829b1d
      Ivo van Doorn 提交于
      rt2500usb and rt73usb have different register word sizes,
      for that reason the register access wrappers were never
      moved into rt2x00usb.
      With rt2800usb on its way, we should favor the 32bit
      register access and move those wrappers into rt2x00usb.
      That saves duplicate code, since only rt2500usb will
      need the special 16bit wrappers.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0f829b1d
  3. 22 11月, 2008 2 次提交
    • I
      rt2x00: Fix race condition when using inderect registers · 8ff48a8b
      Ivo van Doorn 提交于
      Indirect registers require multiple calls to the CSR
      register in order to access the indirect registers.
      This must be protected under a lock to prevent race
      conditions which could cause invalid data to
      be returned when reading from the indirect register or silent
      failures when writing data to the indirect register.
      
      USB drivers where already protected under a mutex,
      so rename the mutex and make PCI drivers use the mutex
      as well.
      This now means that BBP and RF registers are no longer
      accessible in interrupt context. That is not a bad
      situation since the slow behavior of accessing
      those registers means we don't _want_ to access them
      in interrupt context either.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8ff48a8b
    • 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
  4. 30 8月, 2008 2 次提交
  5. 18 8月, 2008 1 次提交
  6. 02 8月, 2008 1 次提交
    • I
      rt2x00: Fix compile warning · 82f97b8d
      Ivo van Doorn 提交于
      rt2x00usb_vendor_request_large_buff is write-only, so it is
      safe to make the argument a const.
      
      Fixes compile warning:
      drivers/net/wireless/rt2x00/rt73usb.c: In function 'rt73usb_load_firmware':
      drivers/net/wireless/rt2x00/rt73usb.c:916: warning: passing argument 5 of 'rt2x00usb_vendor_request_large_buff' discards qualifiers from pointer target typ
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82f97b8d
  7. 30 7月, 2008 1 次提交
  8. 27 6月, 2008 6 次提交
  9. 15 6月, 2008 7 次提交
  10. 14 6月, 2008 1 次提交
  11. 22 5月, 2008 5 次提交
    • J
      mac80211: move TX info into skb->cb · e039fa4a
      Johannes Berg 提交于
      This patch converts mac80211 and all drivers to have transmit
      information and status in skb->cb rather than allocating extra
      memory for it and copying all the data around. To make it fit,
      a union is used where only data that is necessary for all steps
      is kept outside of the union.
      
      A number of fixes were done by Ivo, as well as the rt2x00 part
      of this patch.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e039fa4a
    • I
      rt2x00: Merge RX and TX entry private data · b8be63ff
      Ivo van Doorn 提交于
      With the pending removal of the tx_control structure
      we can merge the RX and TX entry private data structure
      in advance. This will temporarily increase the required
      memory for the queue, but that overhead will only be limited.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b8be63ff
    • I
      rt2x00: Split rt2x00lib_write_tx_desc() · 7050ec82
      Ivo van Doorn 提交于
      Split rt2x00lib_write_tx_desc() up into a TX descriptor initializor
      and TX descriptor writer.
      
      This split is required to properly allow mac80211 to move its
      tx_control structure into the skb->cb array.
      The rt2x00queue_create_tx_descriptor() function will read all tx control
      information and convert it into a rt2x00 TX descriptor information structure.
      After that function is complete, we have all information we needed from the
      tx control structure and are free to start writing into the skb->cb array
      for our own purposes.
      rt2x00queue_write_tx_descriptor() will be in charge of really sending
      the TX descriptor to the hardware and kicking the TX queue.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7050ec82
    • I
      rt2x00: Preserve descriptor information after memmove() · 70a96109
      Ivo van Doorn 提交于
      Due to usage of memmove() in rt2x00usb the descriptor can become
      corrupted because it is being overwritten by the data part.
      Overall having the descriptor in front of the frame is a bad idea,
      we can however use the skb->cb array for this task, since that
      contains more then enough room to hold the entire descriptor and
      preserve the information long enough.
      
      After this we can also cleanup the alignment code a bit to make it
      work a bit more flexible to allow for all kinds of odd header lengths.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      70a96109
    • I
      rt2x00: Fix TX status reporting · fb55f4d1
      Ivo van Doorn 提交于
      The tx_status enumeration was broken since the introduction
      of rt61pci. That driver uses different values to report the
      status of the tx action.
      This would lead to frames that were reported as success but
      actually failed to be send out, or frames that were neither
      successfull or failure which were reported as failure.
      
      Fix this by change the TX status reporting and more explicitely
      check for failure or success. Note that a third possibility is
      added "unknown". Not all hardware (USB) can report the actual
      TX status, for rt61pci some frames will receive this status
      because the TXdone handler is never called for those frames.
      This unknown will now be handled as neither success or failure,
      so we no longer increment the failure counter while this conclusion
      could not be determined from the real status of the frame.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fb55f4d1
  12. 08 5月, 2008 2 次提交
  13. 14 3月, 2008 3 次提交
  14. 01 3月, 2008 6 次提交