1. 24 5月, 2017 5 次提交
  2. 15 2月, 2017 1 次提交
    • A
      rt2500usb: don't mark register accesses as inline · 72724166
      Arnd Bergmann 提交于
      When CONFIG_KASAN is set, we get a rather large stack here:
      
      drivers/net/wireless/ralink/rt2x00/rt2500usb.c: In function 'rt2500usb_set_device_state':
      drivers/net/wireless/ralink/rt2x00/rt2500usb.c:1074:1: error: the frame size of 3032 bytes is larger than 100 bytes [-Werror=frame-larger-than=]
      
      If we don't force those functions to be inline, the compiler can figure this
      out better itself and not inline the functions when doing so would be harmful,
      reducing the stack size to a merge 256 bytes.
      
      Note that there is another problem that manifests in this driver, as a result
      of the typecheck() macro causing even larger stack frames.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      72724166
  3. 08 2月, 2017 1 次提交
  4. 09 11月, 2016 1 次提交
  5. 25 1月, 2016 1 次提交
  6. 30 11月, 2015 1 次提交
    • D
      rt2x00: type bug in _rt2500usb_register_read() · 952348a5
      Dan Carpenter 提交于
      This code causes a static checker bug.
      
      drivers/net/wireless/ralink/rt2x00/rt2500usb.c:232 _rt2500usb_register_read()
      warn: passing casted pointer 'value' to 'rt2500usb_register_read()' 32 vs 16.
      
      If the low 16 bits were initialized to zero then this code would only be
      a problem on big endian systems.  But in this case this is case the low
      16 bits are never initialized.  This is called from a function which is
      created using a macro:
      
      RT2X00DEBUGFS_OPS(csr, "0x%.8x\n", u32);
      
      We end up copying uninitialized data to the user which is bogus and an
      information leak.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      952348a5
  7. 18 11月, 2015 1 次提交
  8. 10 6月, 2015 1 次提交
    • J
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg 提交于
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      30686bf7
  9. 24 4月, 2015 1 次提交
    • J
      mac80211: remove support for IFF_PROMISC · df140465
      Johannes Berg 提交于
      This support is essentially useless as typically networks are encrypted,
      frames will be filtered by hardware, and rate scaling will be done with
      the intended recipient in mind. For real monitoring of the network, the
      monitor mode support should be used instead.
      
      Removing it removes a lot of corner cases.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      df140465
  10. 02 12月, 2014 1 次提交
  11. 28 10月, 2014 1 次提交
    • S
      rt2x00: tune multi-registers I/O timeout · e9dc51aa
      Stanislaw Gruszka 提交于
      We provide timeout value to rt2x00usb_vendor_request_buff() based on
      number of registers to process. That value is passed down to
      rt2x00usb_vendor_req_buff_lock() and ends in usb_control_msg(). But we
      do not read/write all registers in rt2x00usb_vendor_req_buff_lock() at
      once. We read/write them in chunks of 64 bytes in the loop, hence passed
      timeout value to low level is too big.
      
      Patch removes timeout argument from rt2x00usb_vendor_request_buff() and
      use short REGISTER_TIMEOUT in rt2x00usb_vendor_req_buff_lock(). That
      timeout value should be fine for 64 bytes and smaller requests. For
      EEPROM read we introduced new timeout value equal to 2 seconds.
      
      Patch fixes process uninterruptible sleep stalls for long period, when
      USB bus has problem to satisfy a request and we wait very long time on
      usb_start_wait_urb().
      Reported-and-tested-by: NSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e9dc51aa
  12. 05 2月, 2014 1 次提交
  13. 04 1月, 2014 1 次提交
  14. 11 12月, 2013 1 次提交
  15. 13 6月, 2013 2 次提交
  16. 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
  17. 25 10月, 2012 1 次提交
  18. 26 9月, 2012 1 次提交
  19. 08 9月, 2012 1 次提交
  20. 06 9月, 2012 2 次提交
  21. 17 7月, 2012 1 次提交
  22. 19 5月, 2012 1 次提交
    • S
      USB: Disable hub-initiated LPM for comms devices. · e1f12eb6
      Sarah Sharp 提交于
      Hub-initiated LPM is not good for USB communications devices.  Comms
      devices should be able to tell when their link can go into a lower power
      state, because they know when an incoming transmission is finished.
      Ideally, these devices would slam their links into a lower power state,
      using the device-initiated LPM, after finishing the last packet of their
      data transfer.
      
      If we enable the idle timeouts for the parent hubs to enable
      hub-initiated LPM, we will get a lot of useless LPM packets on the bus
      as the devices reject LPM transitions when they're in the middle of
      receiving data.  Worse, some devices might blindly accept the
      hub-initiated LPM and power down their radios while they're in the
      middle of receiving a transmission.
      
      The Intel Windows folks are disabling hub-initiated LPM for all USB
      communications devices under a xHCI USB 3.0 host.  In order to keep
      the Linux behavior as close as possible to Windows, we need to do the
      same in Linux.
      
      Set the disable_hub_initiated_lpm flag for for all USB communications
      drivers.  I know there aren't currently any USB 3.0 devices that
      implement these class specifications, but we should be ready if they do.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Hansjoerg Lipp <hjlipp@web.de>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Jan Dumon <j.dumon@option.com>
      Cc: Petko Manolov <petkan@users.sourceforge.net>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Roland Vossen <rvossen@broadcom.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
      Cc: Kan Yan <kanyan@broadcom.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Cc: Daniel Drake <dsd@gentoo.org>
      Cc: Ulrich Kunitz <kune@deine-taler.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      e1f12eb6
  23. 17 4月, 2012 1 次提交
  24. 20 12月, 2011 1 次提交
  25. 19 11月, 2011 1 次提交
    • G
      USB: convert drivers/net/* to use module_usb_driver() · d632eb1b
      Greg Kroah-Hartman 提交于
      This converts the drivers in drivers/net/* to use the
      module_usb_driver() macro which makes the code smaller and a bit
      simpler.
      
      Added bonus is that it removes some unneeded kernel log messages about
      drivers loading and/or unloading.
      
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Petko Manolov <petkan@users.sourceforge.net>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Jiri Pirko <jpirko@redhat.com>
      Cc: Pavel Roskin <proski@gnu.org>
      Cc: Yoann DI-RUZZA <y.diruzza@lim.eu>
      Cc: George <george0505@realtek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d632eb1b
  26. 08 7月, 2011 1 次提交
  27. 03 5月, 2011 1 次提交
  28. 20 4月, 2011 4 次提交
    • I
      rt2x00: Implement get_antenna and set_antenna callback functions · 0ed7b3c0
      Ivo van Doorn 提交于
      Implement the get_antenna and set_antenna callback functions, which will
      allow clients to control the antenna for all non-11n hardware (Antenna handling
      in rt2800 is still a bit magical, so we can't use the set_antenna for those drivers
      yet).
      
      To best support the set_antenna callback some modifications are needed in the
      diversity handling. We should never look at the default antenna settings to determine
      if software diversity is enabled. Instead we should set the diversity flag when
      possible, which will allow the link_tuner to automatically pick up the tuning.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0ed7b3c0
    • I
      rt2x00: Implement get_ringparam callback function · e7dee444
      Ivo van Doorn 提交于
      With the get_ringparam callback function we can export ring parameters
      to ethtool through the mac80211 interface.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e7dee444
    • G
      rt2x00: Allow dynamic addition of PCI/USB IDs. · e01ae27f
      Gertjan van Wingerde 提交于
      Both USB and PCI drivers allow a system administrator to dynamically add
      USB/PCI IDs to the device table that a driver supports via the
      /sys/bus/{usb,pci,pci_express}/drivers/<driver-name>/new_id files.
      
      However, for the rt2x00 drivers using this method currently crashes the
      system with a NULL pointer failure.
      
      This is due to the set-up of rt2x00 where the probe functions require a
      rt2x00_ops structure in the driver_info field of the probed device. As
      this field is empty for the dynamically added devices this fails for
      these devices.
      
      Fix this by introducing driver-specific probe wrappers that do nothing
      but calling the bus-specific probe functions with the rt2x00_ops structure
      as an argument, rather than depending on the driver_info field.
      Signed-off-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e01ae27f
    • 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
  29. 08 4月, 2011 1 次提交
  30. 05 4月, 2011 1 次提交
  31. 05 3月, 2011 1 次提交