diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-04 07:56:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-04 07:56:22 -0700 |
commit | 5cd4dc44b8a0f656100e3b6916cf73b1623299eb (patch) | |
tree | b95cb361bccf5355f3120f5d21a9f8afe3c15bb4 /drivers/staging/rtl8712 | |
parent | 048ff8629e117d8411a787559417c781bcd78d7e (diff) | |
parent | 10508ae08ed8ce8794785194ad7309f1437d43fd (diff) |
Merge tag 'staging-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here is the big set of staging driver updates and cleanups for
5.16-rc1.
Overall we ended up removing a lot of code this time, a bit over
20,000 lines are now gone thanks to a lot of cleanup work by many
developers.
Nothing huge in here functionality wise, just loads of cleanups:
- r8188eu driver major cleanups and removal of unused and dead code
- wlan-ng minor cleanups
- fbtft driver cleanups
- most driver cleanups
- rtl8* drivers cleanups
- rts5208 driver cleanups
- vt6655 driver cleanups
- vc04_services drivers cleanups
- wfx cleanups on the way to almost getting this merged out of
staging (it's close!)
- tiny mips changes needed for the mt7621 drivers, they have been
acked by the respective subsystem maintainers to go through this
tree.
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (622 commits)
staging: r8188eu: hal: remove goto statement and local variable
staging: rtl8723bs: hal remove the assignment to itself
staging: rtl8723bs: fix unmet dependency on CRYPTO for CRYPTO_LIB_ARC4
staging: vchiq_core: get rid of typedef
staging: fieldbus: anybus: reframe comment to avoid warning
staging: r8188eu: fix missing unlock in rtw_resume()
staging: r8188eu: core: remove the goto from rtw_IOL_accquire_xmit_frame
staging: r8188eu: core: remove goto statement
staging: vt6655: Rename `dwAL7230InitTable` array
staging: vt6655: Rename `dwAL2230PowerTable` array
staging: vt6655: Rename `dwAL7230InitTableAMode` array
staging: vt6655: Rename `dwAL7230ChannelTable2` array
staging: vt6655: Rename `dwAL7230ChannelTable1` array
staging: vt6655: Rename `dwAL7230ChannelTable0` array
staging: vt6655: Rename `dwAL2230ChannelTable1` array
staging: vt6655: Rename `dwAL2230ChannelTable0` array
staging: r8712u: fix control-message timeout
staging: rtl8192u: fix control-message timeouts
staging: mt7621-dts: add missing SPDX license to files
staging: vchiq_core: fix quoted strings split across lines
...
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r-- | drivers/staging/rtl8712/os_intfs.c | 9 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_xmit.h | 10 | ||||
-rw-r--r-- | drivers/staging/rtl8712/usb_intf.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8712/usb_ops_linux.c | 2 |
6 files changed, 16 insertions, 15 deletions
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 9502f6aa5306..d15d52c0d1a7 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -166,7 +166,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p) struct sockaddr *addr = p; if (!padapter->bup) - ether_addr_copy(pnetdev->dev_addr, addr->sa_data); + eth_hw_addr_set(pnetdev, addr->sa_data); return 0; } @@ -381,14 +381,15 @@ static int netdev_open(struct net_device *pnetdev) goto netdev_open_error; if (!r8712_initmac) { /* Use the mac address stored in the Efuse */ - memcpy(pnetdev->dev_addr, - padapter->eeprompriv.mac_addr, ETH_ALEN); + eth_hw_addr_set(pnetdev, + padapter->eeprompriv.mac_addr); } else { /* We have to inform f/w to use user-supplied MAC * address. */ msleep(200); - r8712_setMacAddr_cmd(padapter, (u8 *)pnetdev->dev_addr); + r8712_setMacAddr_cmd(padapter, + (const u8 *)pnetdev->dev_addr); /* * The "myid" function will get the wifi mac address * from eeprompriv structure instead of netdev diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 75716f59044d..acda930722b2 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -554,7 +554,7 @@ void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key) r8712_enqueue_cmd(pcmdpriv, ph2c); } -void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr) +void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr) { struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_obj *ph2c; diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h index bf6f0c6a86e5..ddd69c4ae208 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.h +++ b/drivers/staging/rtl8712/rtl871x_cmd.h @@ -718,7 +718,7 @@ struct DisconnectCtrlEx_param { #define H2C_CMD_OVERFLOW 0x06 #define H2C_RESERVED 0x07 -void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr); +void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr); u8 r8712_sitesurvey_cmd(struct _adapter *padapter, struct ndis_802_11_ssid *pssid); int r8712_createbss_cmd(struct _adapter *padapter); diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h index 2e6afc7bb0a1..cdcbc87a3cad 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.h +++ b/drivers/staging/rtl8712/rtl871x_xmit.h @@ -182,11 +182,11 @@ struct sta_xmit_priv { }; struct hw_txqueue { - /*volatile*/ sint head; - /*volatile*/ sint tail; - /*volatile*/ sint free_sz; /*in units of 64 bytes*/ - /*volatile*/ sint free_cmdsz; - /*volatile*/ sint txsz[8]; + sint head; + sint tail; + sint free_sz; /* in units of 64 bytes */ + sint free_cmdsz; + sint txsz[8]; uint ff_hwaddr; uint cmd_hwaddr; sint ac_tag; diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 505ebeb643dc..ee4c61f85a07 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -563,7 +563,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, dev_info(&udev->dev, "r8712u: MAC Address from efuse = %pM\n", mac); } - ether_addr_copy(pnetdev->dev_addr, mac); + eth_hw_addr_set(pnetdev, mac); } /* step 6. Load the firmware asynchronously */ if (rtl871x_load_fw(padapter)) @@ -595,12 +595,12 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) /* never exit with a firmware callback pending */ wait_for_completion(&padapter->rtl8712_fw_ready); + if (pnetdev->reg_state != NETREG_UNINITIALIZED) + unregister_netdev(pnetdev); /* will call netdev_close() */ usb_set_intfdata(pusb_intf, NULL); release_firmware(padapter->fw); if (drvpriv.drv_registered) padapter->surprise_removed = true; - if (pnetdev->reg_state != NETREG_UNINITIALIZED) - unregister_netdev(pnetdev); /* will call netdev_close() */ r8712_flush_rwctrl_works(padapter); r8712_flush_led_works(padapter); udelay(1); diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c index 655497cead12..f984a5ab2c6f 100644 --- a/drivers/staging/rtl8712/usb_ops_linux.c +++ b/drivers/staging/rtl8712/usb_ops_linux.c @@ -494,7 +494,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value, memcpy(pIo_buf, pdata, len); } status = usb_control_msg(udev, pipe, request, reqtype, value, index, - pIo_buf, len, HZ / 2); + pIo_buf, len, 500); if (status > 0) { /* Success this control transfer. */ if (requesttype == 0x01) { /* For Control read transfer, we have to copy the read |