1. 23 4月, 2013 1 次提交
    • J
      rt2x00: Use more current logging styles, shrink object size · ec9c4989
      Joe Perches 提交于
      Reduce object space ~2% using more current logging styles.
      
      Neaten and simplify logging macros.
      Use wiphy_<level> where appropriate.
      Coalesce formats.
      
      Convert ERROR/WARNING/INFO macros to rt2x00_<level>
      Convert EEPROM to rt2x00_eeprom_dbg
      Convert PROBE_ERROR to rt2x00_probe_err
      Convert DEBUG to rt2x00_dbg
      Convert EEPROM to rt2x00_eeprom_dbg
      
      $ size drivers/net/wireless/rt2x00/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       245639	  71696	  69584	 386919	  5e767	drivers/net/wireless/rt2x00/built-in.o.new
       240609	  70096	  68944	 379649	  5cb01	drivers/net/wireless/rt2x00/built-in.o.new.nodyndbg
       240609	  70096	  68944	 379649	  5cb01	drivers/net/wireless/rt2x00/built-in.o.new.no_rt2x00_debug
       249198	  70096	  70352	 389646	  5f20e	drivers/net/wireless/rt2x00/built-in.o.old
       249198	  70096	  70352	 389646	  5f20e	drivers/net/wireless/rt2x00/built-in.o.old.nodyndbg
       244222	  70096	  69712	 384030	  5dc1e	drivers/net/wireless/rt2x00/built-in.o.old.no_rt2x00_debug
      Signed-off-by: NJoe Perches <joe@perches.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ec9c4989
  2. 28 2月, 2013 1 次提交
  3. 31 1月, 2013 2 次提交
  4. 23 1月, 2013 1 次提交
    • H
      rt2x00: Improve TX status handling for BlockAckReq frames · 84e9e8eb
      Helmut Schaa 提交于
      Since rt2800 hardware isn't capable of reporting the TX status of
      BlockAckReq frames implement the TX status handling of BARs in
      rt2x00lib. We keep track of all BARs that are send out and try to
      match incoming BAs to the appropriate BARs. This allows us to report a
      more or less accurate TX status for BAR frames which in turn improves
      BA session stability.
      
      This is loosley based on Christian Lamparter's patch for carl9170
      "carl9170: fix HT peer BA session corruption".
      
      We have to walk the list of pending BARs for every rx'red BA even
      though most BAs don't belong to any of these BARs as they are just
      acknowledging an AMPDU. To keep that overhead low use RCU which allows
      us to walk the list of pending BARs without the need to acquire a lock.
      This however requires us to _copy_ relevant information from the BAR
      (RA, TA, control field, start sequence number) into our BAR list entry.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Tested-by: NAndreas Hartmann <andihartmann@01019freenet.de>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      84e9e8eb
  5. 18 12月, 2012 1 次提交
    • G
      rt2x00: zero-out rx_status · 028014c8
      Gabor Juhos 提交于
      In commit 'mac80211: support radiotap vendor namespace RX data'
      new fields were added to 'struct ieee80211_rx_status' and those
      fileds must be zeroed. However the rt2x00 driver stores driver
      specific data in the cb array of the rx skbs, so the fields
      might contain garbage and this can cause unexpected behaviour.
      
      The rt2x00 driver from the compat-wireless-2012-12-01
      tarball caused the following warning:
      
        WARNING: at
        /devel/ramips/build_dir/target-mipsel_r2_uClibc-0.9.33.2/linux-ramips_rt305x/
        compat-wireless-2012-12-01/net/mac80211/rx.c:115 ieee80211_rx_irqsafe+0x274/0xbcc
        [mac80211]()
        Modules linked in: dwc_otg ledtrig_usbdev nf_nat_irc
        nf_nat_ftp nf_conntrack_irc nf_conntrack_ftp ipt_MASQUERADE
        iptable_nat nf_nat pppoe xt_conntrack xt_CT xt_NOTRACK iptable_raw
        xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack pppox
        ipt_REJECT xt_TCPMSS xt_comment xt_multiport xt_mac xt_limit
        iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async
        ppp_generic slhc rt2800pci(O) rt2800lib(O) rt2x00soc(O) rt2x00pci(O)
        rt2x00lib(O) mac80211(O) usbcore usb_common nls_base crc_itu_t
        crc_ccitt eeprom_93cx6 cfg80211(O) compat(O) arc4 aes_generic
        crypto_blkcipher cryptomgr aead crypto_hash crypto_algapi leds_gpio
        button_hotplug(O) gpio_keys_polled input_polldev input_core
        Call Trace:
        [<801e96b4>] dump_stack+0x8/0x34
        [<80010a9c>] warn_slowpath_common+0x78/0xa4
        [<80010ae0>] warn_slowpath_null+0x18/0x24
        [<80a9710c>] ieee80211_rx_irqsafe+0x274/0xbcc [mac80211]
      
      The patch ensures that each field gets initialized with
      zeroes.
      
      Cc: <users@rt2x00.serialmonkey.com>
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      028014c8
  6. 07 12月, 2012 1 次提交
  7. 05 12月, 2012 1 次提交
  8. 01 12月, 2012 1 次提交
  9. 10 11月, 2012 1 次提交
    • J
      mac80211: clarify interface iteration and make it configurable · 8b2c9824
      Johannes Berg 提交于
      During hardware restart, all interfaces are iterated even
      though they haven't been re-added to the driver, document
      this behaviour. The same also happens during resume, which
      is even more confusing since all of the interfaces were
      previously removed from the driver. Make this optional so
      drivers relying on the current behaviour can still use it,
      but to let drivers that don't want this behaviour disable
      it.
      
      Also convert all API users, keeping the old semantics
      except in hwsim, where the new normal ones are desired.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8b2c9824
  10. 26 9月, 2012 1 次提交
  11. 06 9月, 2012 1 次提交
  12. 31 7月, 2012 1 次提交
  13. 07 6月, 2012 1 次提交
  14. 24 4月, 2012 1 次提交
  15. 18 4月, 2012 1 次提交
  16. 11 4月, 2012 1 次提交
  17. 16 3月, 2012 1 次提交
    • S
      rt2x00: rt2800usb: rework txstatus code · f421111b
      Stanislaw Gruszka 提交于
      Currently we read tx status register after each urb data transfer. As
      callback procedure also trigger reading, that causing we have many
      "threads" of reading status. To prevent that introduce TX_STATUS_READING
      flags, and check if we are already in process of sequential reading
      TX_STA_FIFO, before requesting new reads.
      
      Change timer to hrtimer, that make TX_STA_FIFO overruns less possible.
      Use 200 us for initial timeout, and then reschedule in 100 us period,
      this values probably have to be tuned.
      
      Make changes on txdone work. Schedule it from
      rt2800usb_tx_sta_fifo_read_completed() callback when first valid status
      show up. Check in callback if tx status timeout happens, and schedule
      work on that condition too. That make possible to remove tx status
      timeout from generic watchdog. I moved that to rt2800usb.
      
      Loop in txdone work, that should prevent situation when we queue work,
      which is already processed, and after finish work is not rescheduled
      again.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f421111b
  18. 13 3月, 2012 1 次提交
    • S
      rt2x00: fix random stalls · 3780d038
      Stanislaw Gruszka 提交于
      Is possible that we stop queue and then do not wake up it again,
      especially when packets are transmitted fast. That can be easily
      reproduced with modified tx queue entry_num to some small value e.g. 16.
      
      If mac80211 already hold local->queue_stop_reason_lock, then we can wait
      on that lock in both rt2x00queue_pause_queue() and
      rt2x00queue_unpause_queue(). After drooping ->queue_stop_reason_lock
      is possible that __ieee80211_wake_queue() will be performed before
      __ieee80211_stop_queue(), hence we stop queue and newer wake up it
      again.
      
      Another race condition is possible when between rt2x00queue_threshold()
      check and rt2x00queue_pause_queue() we will process all pending tx
      buffers on different cpu. This might happen if for example interrupt
      will be triggered on cpu performing rt2x00mac_tx().
      
      To prevent race conditions serialize pause/unpause by queue->tx_lock.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3780d038
  19. 28 2月, 2012 1 次提交
  20. 22 2月, 2012 1 次提交
  21. 09 2月, 2012 1 次提交
  22. 07 12月, 2011 1 次提交
  23. 15 11月, 2011 1 次提交
  24. 15 9月, 2011 2 次提交
  25. 10 8月, 2011 1 次提交
    • H
      rt2x00: Fix PCI interrupt processing race on SMP systems · abc11994
      Helmut Schaa 提交于
      When toggle_irq is called for PCI devices to disable device interrupts
      it used tasklet_disable to wait for a possibly running tasklet to finish.
      However, on SMP systems the tasklet might still be scheduled on another CPU.
      Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
      before returning from toggle_irq.
      
      Furthermore, it was possible that a tasklet reenabled its interrupt even
      though interrupts have been disabled already. Fix this by checking the
      DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
      during tasklet processing.
      
      While at it also enable/kill the TBTT and PRETBTT tasklets in the
      toggle_irq callback and only use tasklet_kill in stop_queue to wait
      for a currently scheduled beacon update before returning.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      abc11994
  26. 23 6月, 2011 1 次提交
  27. 07 6月, 2011 1 次提交
  28. 11 5月, 2011 1 次提交
  29. 03 5月, 2011 1 次提交
  30. 20 4月, 2011 3 次提交
    • J
      rt2800usb: add timer to handle TX_STA_FIFO · f0187a19
      Johannes Stezenbach 提交于
      TX status is reported by the hardware when a packet has been
      sent (or after TX failed after possible retries), which is some
      time after the DMA completion.  Since the rt2800usb hardware can
      not signal interrupts we have to use a timer, otherwise the
      TX status would only be read by the next packet's TX DMA
      completion, or by the watchdog thread.
      Signed-off-by: NJohannes Stezenbach <js@sig21.net>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f0187a19
    • J
      rt2x00: fix queue timeout checks · 75256f03
      Johannes Stezenbach 提交于
      Add a timestamp to each queue entry which is updated whenever
      the status of the entry changes, and remove the per-queue
      timestamps.  The previous check was incorrect and caused both
      false positives and false negatives.
      
      With the corrected check it comes apparent that the TX status
      usually times out on rt2800usb unless there is sufficient traffic
      (i.e. the next TX will complete the previous TX status).
      Signed-off-by: NJohannes Stezenbach <js@sig21.net>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      75256f03
    • I
      rt2x00: Split rt2x00dev->flags · 7dab73b3
      Ivo van Doorn 提交于
      The number of flags defined for the rt2x00dev->flags field,
      has been growing over the years. Currently we are approaching
      the maximum number of bits which are available in the field.
      
      A secondary problem, is that one part of the field are initialized only
      during boot, because the driver requirements are initialized or device
      requirements are loaded from the EEPROM. In both cases, the flags are
      fixed and will not change during device operation. The other flags are
      the device state, and will change frequently. So far this resulted in the fact
      that for some flags, the atomic bit accessors are used, while for the others
      the non-atomic variants are used.
      
      By splitting the flags up into a "flags" and "cap_flags" we can put all flags
      which are fixed inside "cap_flags". This field can then be read non-atomically.
      In the "flags" field we keep the device state, which is going to be read atomically.
      
      This adds more room for more flags in the future, and sanitizes the field access methods.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Acked-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7dab73b3
  31. 05 4月, 2011 5 次提交
  32. 01 2月, 2011 1 次提交