From: Tapasweni Pathak Date: Wed, 24 Sep 2014 11:04:56 +0000 (+0530) Subject: staging: rtl8712: add new line after declarations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02a29d2d9209ad24258432057886a5af5816c388;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8712: add new line after declarations This patch fixes checkpatch.pl warning in hal_init.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 39130180c577..720e8a15db96 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -350,6 +350,7 @@ _next: struct dvobj_priv *pdvobj = (struct dvobj_priv *) &padapter->dvobjpriv; u8 blnPending = 0; + pcmdpriv->cmd_issued_cnt++; cmdsz = round_up(pcmd->cmdsz, 8); wr_sz = TXDESC_SIZE + 8 + cmdsz; diff --git a/drivers/staging/rtl8712/rtl8712_io.c b/drivers/staging/rtl8712/rtl8712_io.c index c84aeb9940bc..921fcffb3065 100644 --- a/drivers/staging/rtl8712/rtl8712_io.c +++ b/drivers/staging/rtl8712/rtl8712_io.c @@ -78,8 +78,8 @@ void r8712_write16(struct _adapter *adapter, u32 addr, u16 val) { struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; struct intf_hdl *pintfhdl = &(pio_queue->intf); - void (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val); + _write16 = pintfhdl->io_ops._write16; _write16(pintfhdl, addr, val); } @@ -90,6 +90,7 @@ void r8712_write32(struct _adapter *adapter, u32 addr, u32 val) struct intf_hdl *pintfhdl = (struct intf_hdl *)(&(pio_queue->intf)); void (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val); + _write32 = pintfhdl->io_ops._write32; _write32(pintfhdl, addr, val); } diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 4ebedb4005cf..a3093ac1204b 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -324,6 +324,7 @@ u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf, padding_sz = (8 - (last_txcmdsz % 8)); if ((last_txcmdsz % 8) != 0) { int i; + for (i = 0; i < padding_sz; i++) *(pxmitframe->buf_addr+TXDESC_SIZE+last_txcmdsz+i) = 0; } @@ -554,6 +555,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) } if (pattrib->pctrl == 1) { /* mp tx packets */ struct tx_desc *ptxdesc_mp; + ptxdesc_mp = &txdesc_mp; /* offset 8 */ ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2); @@ -655,6 +657,7 @@ int r8712_xmitframe_complete(struct _adapter *padapter, r8712_xmitframe_aggr_1st(pxmitbuf, pxmitframe); if (p2ndxmitframe != NULL) { u16 total_length; + total_length = r8712_xmitframe_aggr_next( pxmitbuf, p2ndxmitframe); do { diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h index 48ad10b023fd..070cc03ce374 100644 --- a/drivers/staging/rtl8712/rtl871x_io.h +++ b/drivers/staging/rtl8712/rtl871x_io.h @@ -235,6 +235,7 @@ struct io_queue { static inline u32 _RND4(u32 sz) { u32 val; + val = ((sz >> 2) + ((sz & 3) ? 1 : 0)) << 2; return val; } diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 2ec40486d1ba..8e42ce06e5d7 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -241,6 +241,7 @@ static inline char *translate_scan(struct _adapter *padapter, { /* check legal index */ u8 dsconfig = pnetwork->network.Configuration.DSConfig; + if (dsconfig >= 1 && dsconfig <= sizeof( ieee80211_wlan_frequencies) / sizeof(long)) iwe.u.freq.m = (s32)(ieee80211_wlan_frequencies[ @@ -287,6 +288,7 @@ static inline char *translate_scan(struct _adapter *padapter, u16 wpa_len = 0, rsn_len = 0; int n; sint out_len = 0; + out_len = r8712_get_sec_ie(pnetwork->network.IEs, pnetwork->network. IELength, rsn_ie, &rsn_len, @@ -697,6 +699,7 @@ static int r8711_wx_set_freq(struct net_device *dev, (fwrq->m <= (int) 2.487e8)) { int f = fwrq->m / 100000; int c = 0; + while ((c < 14) && (f != frequency_list[c])) c++; fwrq->e = 0; @@ -707,6 +710,7 @@ static int r8711_wx_set_freq(struct net_device *dev, rc = -EOPNOTSUPP; else { int channel = fwrq->m; + if ((channel < 1) || (channel > 14)) rc = -EINVAL; else { @@ -999,12 +1003,14 @@ static int r871x_wx_set_priv(struct net_device *dev, /*Set scan type to active */ /*OK if successful */ struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + pmlmepriv->passive_mode = 1; sprintf(ext, "OK"); } else if (0 == strcasecmp(ext, "SCAN-PASSIVE")) { /*Set scan type to passive */ /*OK if successful */ struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + pmlmepriv->passive_mode = 0; sprintf(ext, "OK"); } else if (0 == strncmp(ext, "DCE-E", 5)) { @@ -1179,10 +1185,12 @@ static int r8711_wx_set_scan(struct net_device *dev, return 0; if (wrqu->data.length == sizeof(struct iw_scan_req)) { struct iw_scan_req *req = (struct iw_scan_req *)extra; + if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { struct ndis_802_11_ssid ssid; unsigned long irqL; u32 len = min_t(u8, req->essid_len, IW_ESSID_MAX_SIZE); + memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid)); memcpy(ssid.Ssid, req->essid, len); diff --git a/drivers/staging/rtl8712/rtl871x_mp.c b/drivers/staging/rtl8712/rtl871x_mp.c index 48a6abfa6229..2ec660ad78af 100644 --- a/drivers/staging/rtl8712/rtl871x_mp.c +++ b/drivers/staging/rtl8712/rtl871x_mp.c @@ -146,6 +146,7 @@ u32 r8712_bb_reg_read(struct _adapter *pAdapter, u16 offset) bb_val = fw_iocmd_read(pAdapter, iocmd); if (shift != 0) { u32 bb_val2 = 0; + bb_val >>= (shift * 8); iocmd.value += 4; bb_val2 = fw_iocmd_read(pAdapter, iocmd); @@ -316,6 +317,7 @@ static void SetOFDMTxPower(struct _adapter *pAdapter, u8 TxPower) void r8712_SetTxPower(struct _adapter *pAdapter) { u8 TxPower = pAdapter->mppriv.curr_txpoweridx; + SetCCKTxPower(pAdapter, TxPower); SetOFDMTxPower(pAdapter, TxPower); } @@ -544,6 +546,7 @@ void r8712_SetSingleCarrierTx(struct _adapter *pAdapter, u8 bStart) void r8712_SetSingleToneTx(struct _adapter *pAdapter, u8 bStart) { u8 rfPath = pAdapter->mppriv.curr_rfpath; + switch (pAdapter->mppriv.antenna_tx) { case ANTENNA_B: rfPath = RF_PATH_B; diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index 89ce527940fe..51dcf5555b62 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -157,6 +157,7 @@ static void rpwm_workitem_callback(struct work_struct *work) struct _adapter *padapter = container_of(pwrpriv, struct _adapter, pwrctrlpriv); u8 cpwm = pwrpriv->cpwm; + if (pwrpriv->cpwm != pwrpriv->rpwm) { _enter_pwrlock(&pwrpriv->lock); cpwm = r8712_read8(padapter, SDIO_HCPWM); @@ -169,6 +170,7 @@ static void rpwm_workitem_callback(struct work_struct *work) static void rpwm_check_handler (void *FunctionContext) { struct _adapter *adapter = (struct _adapter *)FunctionContext; + _rpwm_check_handler(adapter); }