diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
commit | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (patch) | |
tree | 180f10c2cdd63836e47725cddc8850ca7144091a /drivers/staging/rtl8712 | |
parent | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) | |
download | linux-449fcf3ab0baf3dde9952385e6789f2ca10c3980.tar.gz linux-449fcf3ab0baf3dde9952385e6789f2ca10c3980.tar.bz2 linux-449fcf3ab0baf3dde9952385e6789f2ca10c3980.zip |
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the "big" staging and IIO driver update for 4.15-rc1.
Lots and lots of little changes, almost all minor code cleanups as the
Outreachy application process happened during this development cycle.
Also happened was a lot of IIO driver activity, and the typec USB code
moving out of staging to drivers/usb (same commits are in the USB tree
on a persistent branch to not cause merge issues.)
Overall, it's a wash, I think we added a few hundred more lines than
removed, but really only a few thousand were modified at all.
All of these have been in linux-next for a while. There might be a
merge issue with Al's vfs tree in the pi433 driver (take his changes,
they are always better), and the media tree with some of the odd
atomisp cleanups (take the media tree's version)"
* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
staging: lustre: add SPDX identifiers to all lustre files
staging: greybus: Remove redundant license text
staging: greybus: add SPDX identifiers to all greybus driver files
staging: ccree: simplify ioread/iowrite
staging: ccree: simplify registers access
staging: ccree: simplify error handling logic
staging: ccree: remove dead code
staging: ccree: handle limiting of DMA masks
staging: ccree: copy IV to DMAable memory
staging: fbtft: remove redundant initialization of buf
staging: sm750fb: Fix parameter mistake in poke32
staging: wilc1000: Fix bssid buffer offset in Txq
staging: fbtft: fb_ssd1331: fix mirrored display
staging: android: Fix checkpatch.pl error
staging: greybus: loopback: convert loopback to use generic async operations
staging: greybus: operation: add private data with get/set accessors
staging: greybus: loopback: Fix iteration count on async path
staging: greybus: loopback: Hold per-connection mutex across operations
staging: greybus/loopback: use ktime_get() for time intervals
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
...
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r-- | drivers/staging/rtl8712/hal_init.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/mlme_linux.c | 48 | ||||
-rw-r--r-- | drivers/staging/rtl8712/os_intfs.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_cmd.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_event.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_recv.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 3 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_ioctl_set.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mlme.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_pwrctrl.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_security.c | 5 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_security.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/usb_intf.c | 3 |
13 files changed, 51 insertions, 49 deletions
diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index c83d7ebb164f..de832b0b5eec 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -216,9 +216,9 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) emem_sz = fwhdr.img_SRAM_size; do { memset(ptx_desc, 0, TXDESC_SIZE); - if (emem_sz > MAX_DUMP_FWSZ) /* max=48k */ + if (emem_sz > MAX_DUMP_FWSZ) { /* max=48k */ dump_emem_sz = MAX_DUMP_FWSZ; - else { + } else { dump_emem_sz = emem_sz; ptx_desc->txdw0 |= cpu_to_le32(BIT(28)); } diff --git a/drivers/staging/rtl8712/mlme_linux.c b/drivers/staging/rtl8712/mlme_linux.c index a077069d6227..3c7c4a4faeb2 100644 --- a/drivers/staging/rtl8712/mlme_linux.c +++ b/drivers/staging/rtl8712/mlme_linux.c @@ -32,39 +32,45 @@ #include "drv_types.h" #include "mlme_osdep.h" -static void sitesurvey_ctrl_handler(unsigned long data) +static void sitesurvey_ctrl_handler(struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, + mlmepriv.sitesurveyctrl.sitesurvey_ctrl_timer); _r8712_sitesurvey_ctrl_handler(adapter); mod_timer(&adapter->mlmepriv.sitesurveyctrl.sitesurvey_ctrl_timer, jiffies + msecs_to_jiffies(3000)); } -static void join_timeout_handler (unsigned long data) +static void join_timeout_handler (struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, mlmepriv.assoc_timer); _r8712_join_timeout_handler(adapter); } -static void _scan_timeout_handler (unsigned long data) +static void _scan_timeout_handler (struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, mlmepriv.scan_to_timer); r8712_scan_timeout_handler(adapter); } -static void dhcp_timeout_handler (unsigned long data) +static void dhcp_timeout_handler (struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, mlmepriv.dhcp_timer); _r8712_dhcp_timeout_handler(adapter); } -static void wdg_timeout_handler (unsigned long data) +static void wdg_timeout_handler (struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, mlmepriv.wdg_timer); _r8712_wdg_timeout_handler(adapter); @@ -76,17 +82,12 @@ void r8712_init_mlme_timer(struct _adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - setup_timer(&pmlmepriv->assoc_timer, join_timeout_handler, - (unsigned long)padapter); - setup_timer(&pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer, - sitesurvey_ctrl_handler, - (unsigned long)padapter); - setup_timer(&pmlmepriv->scan_to_timer, _scan_timeout_handler, - (unsigned long)padapter); - setup_timer(&pmlmepriv->dhcp_timer, dhcp_timeout_handler, - (unsigned long)padapter); - setup_timer(&pmlmepriv->wdg_timer, wdg_timeout_handler, - (unsigned long)padapter); + timer_setup(&pmlmepriv->assoc_timer, join_timeout_handler, 0); + timer_setup(&pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer, + sitesurvey_ctrl_handler, 0); + timer_setup(&pmlmepriv->scan_to_timer, _scan_timeout_handler, 0); + timer_setup(&pmlmepriv->dhcp_timer, dhcp_timeout_handler, 0); + timer_setup(&pmlmepriv->wdg_timer, wdg_timeout_handler, 0); } void r8712_os_indicate_connect(struct _adapter *adapter) @@ -118,9 +119,8 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter) adapter->securitypriv.btkip_countermeasure; memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv)); - setup_timer(&adapter->securitypriv.tkip_timer, - r8712_use_tkipkey_handler, - (unsigned long)adapter); + timer_setup(&adapter->securitypriv.tkip_timer, + r8712_use_tkipkey_handler, 0); /* Restore the PMK information to securitypriv structure * for the following connection. */ diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index e698f6ede449..95caf8df9a13 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -313,8 +313,8 @@ u8 r8712_init_drv_sw(struct _adapter *padapter) _r8712_init_recv_priv(&padapter->recvpriv, padapter); memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv)); - setup_timer(&padapter->securitypriv.tkip_timer, - r8712_use_tkipkey_handler, (unsigned long)padapter); + timer_setup(&padapter->securitypriv.tkip_timer, + r8712_use_tkipkey_handler, 0); _r8712_init_sta_priv(&padapter->stapriv); padapter->stapriv.padapter = padapter; r8712_init_bcmc_stainfo(padapter); @@ -385,11 +385,11 @@ static int netdev_open(struct net_device *pnetdev) padapter->bup = true; if (rtl871x_hal_init(padapter) != _SUCCESS) goto netdev_open_error; - if (!r8712_initmac) + if (!r8712_initmac) { /* Use the mac address stored in the Efuse */ memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN); - else { + } else { /* We have to inform f/w to use user-supplied MAC * address. */ diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 0104aced113e..3c88994fdfcd 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -356,11 +356,11 @@ _next: if ((wr_sz % 64) == 0) blnPending = 1; } - if (blnPending) /* 32 bytes for TX Desc - 8 offset */ + if (blnPending) { /* 32 bytes for TX Desc - 8 offset */ pdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) & 0x00ff0000); - else { + } else { pdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & diff --git a/drivers/staging/rtl8712/rtl8712_event.h b/drivers/staging/rtl8712/rtl8712_event.h index b38374025c93..cad7085c3f8a 100644 --- a/drivers/staging/rtl8712/rtl8712_event.h +++ b/drivers/staging/rtl8712/rtl8712_event.h @@ -60,7 +60,6 @@ enum rtl8712_c2h_event { MAX_C2HEVT }; - #ifdef _RTL8712_CMD_C_ static struct fwevent wlanevents[] = { diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index ea3eb94b28b3..8f555e6e1b3f 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -149,7 +149,7 @@ int r8712_free_recvframe(union recv_frame *precvframe, list_add_tail(&(precvframe->u.hdr.list), &pfree_recv_queue->queue); if (padapter != NULL) { if (pfree_recv_queue == &precvpriv->free_recv_queue) - precvpriv->free_recvframe_cnt++; + precvpriv->free_recvframe_cnt++; } spin_unlock_irqrestore(&pfree_recv_queue->lock, irqL); return _SUCCESS; @@ -883,10 +883,10 @@ static void query_rx_phy_status(struct _adapter *padapter, * from 0~100. It is assigned to the BSS List in * GetValueFromBeaconOrProbeRsp(). */ - if (bcck_rate) + if (bcck_rate) { prframe->u.hdr.attrib.signal_strength = (u8)r8712_signal_scale_mapping(pwdb_all); - else { + } else { if (rf_rx_num != 0) prframe->u.hdr.attrib.signal_strength = (u8)(r8712_signal_scale_mapping(total_rssi /= diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 04638f1e4e88..a424f447a725 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -899,9 +899,10 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter, if (!pwlan) goto createbss_cmd_fail; pwlan->last_scanned = jiffies; - } else + } else { list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); + } pnetwork->Length = r8712_get_wlan_bssid_ex_sz(pnetwork); memcpy(&(pwlan->network), pnetwork, pnetwork->Length); pwlan->fixed = true; diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c index 01a150446f5a..8a5ced4fa9d3 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c @@ -78,10 +78,10 @@ static u8 do_join(struct _adapter *padapter) int ret; ret = r8712_select_and_join_from_scan(pmlmepriv); - if (ret == _SUCCESS) + if (ret == _SUCCESS) { mod_timer(&pmlmepriv->assoc_timer, jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT)); - else { + } else { if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { /* submit r8712_createbss_cmd to change to an * ADHOC_MASTER pmlmepriv->lock has been diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index bf1ac22bae1c..111c809afc51 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -574,10 +574,10 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf) set_fwstate(pmlmepriv, _FW_UNDER_LINKING); if (r8712_select_and_join_from_scan(pmlmepriv) - == _SUCCESS) + == _SUCCESS) { mod_timer(&pmlmepriv->assoc_timer, jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT)); - else { + } else { struct wlan_bssid_ex *pdev_network = &(adapter->registrypriv.dev_network); u8 *pibss = diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index e42fc1404c35..ae4c9567bb55 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -164,9 +164,10 @@ static void rpwm_workitem_callback(struct work_struct *work) } } -static void rpwm_check_handler (unsigned long data) +static void rpwm_check_handler (struct timer_list *t) { - struct _adapter *adapter = (struct _adapter *)data; + struct _adapter *adapter = + from_timer(adapter, t, pwrctrlpriv.rpwm_check_timer); _rpwm_check_handler(adapter); } @@ -185,8 +186,7 @@ void r8712_init_pwrctrl_priv(struct _adapter *padapter) r8712_write8(padapter, 0x1025FE58, 0); INIT_WORK(&pwrctrlpriv->SetPSModeWorkItem, SetPSModeWorkItemCallback); INIT_WORK(&pwrctrlpriv->rpwm_workitem, rpwm_workitem_callback); - setup_timer(&pwrctrlpriv->rpwm_check_timer, rpwm_check_handler, - (unsigned long)padapter); + timer_setup(&pwrctrlpriv->rpwm_check_timer, rpwm_check_handler, 0); } /* diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c index bd83fb492c45..56d36f6f9c46 100644 --- a/drivers/staging/rtl8712/rtl871x_security.c +++ b/drivers/staging/rtl8712/rtl871x_security.c @@ -1402,9 +1402,10 @@ u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe) return _SUCCESS; } -void r8712_use_tkipkey_handler(unsigned long data) +void r8712_use_tkipkey_handler(struct timer_list *t) { - struct _adapter *padapter = (struct _adapter *)data; + struct _adapter *padapter = + from_timer(padapter, t, securitypriv.tkip_timer); padapter->securitypriv.busetkipkey = true; } diff --git a/drivers/staging/rtl8712/rtl871x_security.h b/drivers/staging/rtl8712/rtl871x_security.h index fa952e17975b..46b88a41d236 100644 --- a/drivers/staging/rtl8712/rtl871x_security.h +++ b/drivers/staging/rtl8712/rtl871x_security.h @@ -224,7 +224,7 @@ void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe); u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe); u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe); void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe); -void r8712_use_tkipkey_handler(unsigned long data); +void r8712_use_tkipkey_handler(struct timer_list *t); #endif /*__RTL871X_SECURITY_H_ */ diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index b3e266bd57ab..85eadddfaf06 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -590,9 +590,10 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, mac[0] &= 0xFE; dev_info(&udev->dev, "r8712u: MAC Address from user = %pM\n", mac); - } else + } else { dev_info(&udev->dev, "r8712u: MAC Address from efuse = %pM\n", mac); + } ether_addr_copy(pnetdev->dev_addr, mac); } /* step 6. Load the firmware asynchronously */ |