summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/aqc111.c
Commit message (Collapse)AuthorAgeFilesLines
* aqc111: cleanup mtu related logicIgor Russkikh2019-05-161-4/+2Star
| | | | | | | | | | | | | Original fix b8b277525e9d was done under impression that invalid data could be written for mtu configuration higher that 16334. But the high limit will anyway be rejected my max_mtu check in caller. Thus, make the code cleaner and allow it doing the configuration without checking for maximum mtu value. Fixes: b8b277525e9d ("aqc111: fix endianness issue in aqc111_change_mtu") Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "aqc111: fix writing to the phy on BE"Igor Russkikh2019-05-161-17/+6Star
| | | | | | | | | | This reverts commit 369b46e9fbcfa5136f2cb5f486c90e5f7fa92630. The required temporary storage is already done inside of write32/16 helpers. Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "aqc111: fix double endianness swap on BE"Igor Russkikh2019-05-161-4/+2Star
| | | | | | | | | | This reverts commit 2cf672709beb005f6e90cb4edbed6f2218ba953e. The required temporary storage is already done inside of write32/16 helpers. Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* aqc111: fix double endianness swap on BEOliver Neukum2019-05-091-2/+4
| | | | | | | | | If you are using a function that does a swap in place, you cannot just reuse the buffer on the assumption that it has not been changed. Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* aqc111: fix writing to the phy on BEOliver Neukum2019-05-091-6/+17
| | | | | | | | | When writing to the phy on BE architectures an internal data structure was directly given, leading to it being byte swapped in the wrong way for the CPU in 50% of all cases. A temporary buffer must be used. Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* aqc111: fix endianness issue in aqc111_change_mtuOliver Neukum2019-05-091-0/+2
| | | | | | | | | | If the MTU is large enough, the first write to the device is just repeated. On BE architectures, however, the first word of the command will be swapped a second time and garbage will be written. Avoid that. Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Extend HWID table by QNAP deviceDmitry Bezrukov2019-03-261-0/+15
| | | | | | | | New device of QNAP based on aqc111u Add this ID to blacklist of cdc_ether driver as well Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Extend HWID table by TRENDnet deviceDmitry Bezrukov2019-01-161-0/+15
| | | | | | | | | New device of TRENDnet based on aqc111u Add this ID to blacklist of cdc_ether driver as well Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Initialize wol_cfg with memset in aqc111_suspendNathan Chancellor2018-12-011-1/+3
| | | | | | | | | | | | | | | | | | Clang warns: drivers/net/usb/aqc111.c:1326:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct aqc111_wol_cfg wol_cfg = { 0 }; ^ {} 1 warning generated. Use memset to initialize the object to take compiler instrumentation out of the equation. Fixes: e58ba4544c77 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add ASIX's HW idsDmitry Bezrukov2018-11-281-0/+40
| | | | | | | | | It enables driver for ASIX products which are also based on aqc111/112U chips. Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for wake on LAN by MAGIC packetDmitry Bezrukov2018-11-281-0/+180
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Implement get/set_link_ksettings callbacksDmitry Bezrukov2018-11-281-0/+124
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Initialize ethtool_ops structureDmitry Bezrukov2018-11-281-0/+28
| | | | | | | | Implement get_drvinfo, set/get_msglevel, get_link callbacks Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add RX VLAN filtering supportDmitry Bezrukov2018-11-281-0/+89
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for VLAN_CTAG_TX/RX offloadDmitry Bezrukov2018-11-281-0/+17
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Implement set_rx_mode callbackDmitry Bezrukov2018-11-281-5/+67
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for TSODmitry Bezrukov2018-11-281-0/+6
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for enable/disable checksum offloadDmitry Bezrukov2018-11-281-1/+44
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for changing MTUDmitry Bezrukov2018-11-281-1/+59
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add checksum offload supportDmitry Bezrukov2018-11-281-0/+38
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Implement RX data pathDmitry Bezrukov2018-11-281-0/+102
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Implement TX data pathDmitry Bezrukov2018-11-281-0/+72
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add support for getting and setting of MAC addressDmitry Bezrukov2018-11-281-0/+47
| | | | | | Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Introduce link managementDmitry Bezrukov2018-11-281-0/+235
| | | | | | | | Add full hardware initialization sequence and link configuration logic Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Introduce PHY accessDmitry Bezrukov2018-11-281-0/+65
| | | | | | | | | | Add helpers to write 32bit values. Implement PHY power up/down sequences. AQC111, PHY is being controlled via vendor command interface. Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Various callbacks implementationDmitry Bezrukov2018-11-281-0/+76
| | | | | | | | | | Reset, stop callbacks, driver unbind callback. More register defines required for these callbacks. Add helpers to read/write 16bit values Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add implementation of read and write commandsDmitry Bezrukov2018-11-281-0/+92
| | | | | | | | Read/write command register defines and functions Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Add bind and empty unbind callbacksDmitry Bezrukov2018-11-281-0/+35
| | | | | | | | Initialize net_device_ops structure Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbEDmitry Bezrukov2018-11-281-0/+48
Initialize usb_driver structure skeleton Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>