summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMartin Homuth <martin@martinhomuth.de>2017-12-19 02:18:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 17:23:19 +0300
commit3be4fdf6f6a248d48d504e092e16dd1c5b2bbc9e (patch)
tree138342056dad824a24f354ee2fa3b21499b1dd57 /drivers
parent298291bb0d64c2dab4911479b2e020d0cd28932d (diff)
downloadlinux-3be4fdf6f6a248d48d504e092e16dd1c5b2bbc9e.tar.xz
staging: rtl8712: style fix over 80 characters warnings
This patch fixes various coding style issues in the rtl8712 module as noted by checkpatch.pl by reducing the characters per line to under 80. It fixes the following checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Martin Homuth <martin@martinhomuth.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8712/ieee80211.c6
-rw-r--r--drivers/staging/rtl8712/os_intfs.c5
-rw-r--r--drivers/staging/rtl8712/rtl8712_cmd.c18
-rw-r--r--drivers/staging/rtl8712/rtl8712_xmit.c3
-rw-r--r--drivers/staging/rtl8712/rtl871x_mlme.h3
5 files changed, 22 insertions, 13 deletions
diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 33e82a9dd462..987270395635 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -169,12 +169,13 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
int sz = 0, rate_len;
struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
u8 *ie = pdev_network->IEs;
+ u16 beaconPeriod = (u16)pdev_network->Configuration.BeaconPeriod;
/*timestamp will be inserted by hardware*/
sz += 8;
ie += sz;
/*beacon interval : 2bytes*/
- *(__le16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);
+ *(__le16 *)ie = cpu_to_le16(beaconPeriod);
sz += 2;
ie += 2;
/*capability info*/
@@ -221,7 +222,8 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
pbuf = r8712_get_ie(pbuf, _WPA_IE_ID_, &len, limit);
if (pbuf) {
/*check if oui matches...*/
- if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)))
+ if (memcmp((pbuf + 2), wpa_oui_type,
+ sizeof(wpa_oui_type)))
goto check_next_ie;
/*check version...*/
memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 95caf8df9a13..e7df5d7986fc 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -238,10 +238,13 @@ static u32 start_drv_threads(struct _adapter *padapter)
void r8712_stop_drv_threads(struct _adapter *padapter)
{
+ struct completion *completion =
+ &padapter->cmdpriv.terminate_cmdthread_comp;
+
/*Below is to terminate r8712_cmd_thread & event_thread...*/
complete(&padapter->cmdpriv.cmd_queue_comp);
if (padapter->cmdThread)
- wait_for_completion_interruptible(&padapter->cmdpriv.terminate_cmdthread_comp);
+ wait_for_completion_interruptible(completion);
padapter->cmdpriv.cmd_seq = 1;
}
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index 3c88994fdfcd..9c8e0c50a804 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -321,10 +321,13 @@ int r8712_cmd_thread(void *context)
void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
struct _adapter *padapter = context;
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
+ struct completion *cmd_queue_comp =
+ &pcmdpriv->cmd_queue_comp;
+ struct mutex *pwctrl_lock = &padapter->pwrctrlpriv.mutex_lock;
allow_signal(SIGTERM);
while (1) {
- if (wait_for_completion_interruptible(&pcmdpriv->cmd_queue_comp))
+ if (wait_for_completion_interruptible(cmd_queue_comp))
break;
if (padapter->bDriverStopped || padapter->bSurpriseRemoved)
break;
@@ -343,6 +346,7 @@ _next:
if (pcmd) { /* if pcmd != NULL, cmd will be handled by f/w */
struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
u8 blnPending = 0;
+ u16 cmdcode = pcmd->cmdcode;
pcmdpriv->cmd_issued_cnt++;
cmdsz = round_up(pcmd->cmdsz, 8);
@@ -387,20 +391,18 @@ _next:
r8712_write_mem(padapter, RTL8712_DMA_H2CCMD, wr_sz,
(u8 *)pdesc);
pcmdpriv->cmd_seq++;
- if (pcmd->cmdcode == GEN_CMD_CODE(_CreateBss)) {
+ if (cmdcode == GEN_CMD_CODE(_CreateBss)) {
pcmd->res = H2C_SUCCESS;
- pcmd_callback = cmd_callback[pcmd->
- cmdcode].callback;
+ pcmd_callback = cmd_callback[cmdcode].callback;
if (pcmd_callback)
pcmd_callback(padapter, pcmd);
continue;
}
- if (pcmd->cmdcode == GEN_CMD_CODE(_SetPwrMode)) {
+ if (cmdcode == GEN_CMD_CODE(_SetPwrMode)) {
if (padapter->pwrctrlpriv.bSleep) {
- mutex_lock(&padapter->
- pwrctrlpriv.mutex_lock);
+ mutex_lock(pwctrl_lock);
r8712_set_rpwm(padapter, PS_STATE_S2);
- mutex_unlock(&padapter->pwrctrlpriv.mutex_lock);
+ mutex_unlock(pwctrl_lock);
}
}
r8712_free_cmd_obj(pcmd);
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index 42d014007764..fb64c2891e22 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -573,7 +573,8 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
}
} else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
/* offset 4 */
- ptxdesc->txdw1 |= cpu_to_le32((0x05) & 0x1f);/*CAM_ID(MAC_ID), default=5;*/
+ /* CAM_ID(MAC_ID), default=5; */
+ ptxdesc->txdw1 |= cpu_to_le32((0x05) & 0x1f);
qsel = (uint)(pattrib->qsel & 0x0000001f);
ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
ptxdesc->txdw1 |= cpu_to_le32(BIT(16));/* Non-QoS */
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h
index b21f28140f53..918947f38151 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.h
+++ b/drivers/staging/rtl8712/rtl871x_mlme.h
@@ -55,7 +55,8 @@
* single-tone
*/
#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in cont, tx
- * background due to out of skb
+ * background due
+ * to out of skb
*/
#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx*/
#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in cont, tx with carrier