Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ef2de5a authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: spaces preferred around operands



Clean up all instances of checkpatch.pl checks:
CHECK: spaces preferred around that '+'
(and other operands)

Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 168a2c10
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -336,7 +336,8 @@ int r8712_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
		/* No RSN IE - fail silently */
		return _FAIL;
	}
	if ((*rsn_ie != _WPA2_IE_ID_) || (*(rsn_ie+1) != (u8)(rsn_ie_len - 2)))
	if ((*rsn_ie != _WPA2_IE_ID_) ||
	    (*(rsn_ie + 1) != (u8)(rsn_ie_len - 2)))
		return _FAIL;
	pos = rsn_ie;
	pos += 4;
+39 −35
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ static u8 efuse_one_byte_read(struct _adapter *padapter, u16 addr, u8 *data)
	       (r8712_read8(padapter, EFUSE_CTRL + 2) & 0xFC));
	r8712_write8(padapter, EFUSE_CTRL + 3, 0x72); /* read cmd */
	/* wait for complete */
	while (!(0x80 & r8712_read8(padapter, EFUSE_CTRL+3)) && (tmpidx < 100))
	while (!(0x80 & r8712_read8(padapter, EFUSE_CTRL + 3)) &&
	       (tmpidx < 100))
		tmpidx++;
	if (tmpidx < 100) {
		*data = r8712_read8(padapter, EFUSE_CTRL);
@@ -108,7 +109,8 @@ static u8 efuse_one_byte_write(struct _adapter *padapter, u16 addr, u8 data)
	r8712_write8(padapter, EFUSE_CTRL, data); /* data */
	r8712_write8(padapter, EFUSE_CTRL + 3, 0xF2); /* write cmd */
	/* wait for complete */
	while ((0x80 &  r8712_read8(padapter, EFUSE_CTRL+3)) && (tmpidx < 100))
	while ((0x80 &  r8712_read8(padapter, EFUSE_CTRL + 3)) &&
	       (tmpidx < 100))
		tmpidx++;
	if (tmpidx < 100)
		bResult = true;
@@ -263,7 +265,8 @@ u8 r8712_efuse_pg_packet_read(struct _adapter *padapter, u8 offset, u8 *data)
				for (tmpidx = 0; tmpidx < word_cnts * 2;
				     tmpidx++) {
					if (efuse_one_byte_read(padapter,
					    efuse_addr+1+tmpidx, &efuse_data)) {
					    efuse_addr + 1 + tmpidx,
					    &efuse_data)) {
						tmpdata[tmpidx] = efuse_data;
					} else {
						ret = false;
@@ -352,7 +355,8 @@ static u8 fix_header(struct _adapter *padapter, u8 header, u16 header_addr)
				ret = false;
				if (0xFF == value) /* write again */
					efuse_one_byte_write(padapter, addr + 1,
							pkt.data[i*2 + 1]);
							     pkt.data[i * 2 +
								      1]);
			}
		}
		addr += 2;
+33 −27
Original line number Diff line number Diff line
@@ -266,7 +266,8 @@ u8 r8712_construct_txaggr_cmd_desc(struct xmit_buf *pxmitbuf)
	/* dw0 */
	ptx_desc->txdw0 = cpu_to_le32(CMD_HDR_SZ & 0xffff);
	ptx_desc->txdw0 |=
		cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000);
		cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) &
			    0x00ff0000);
	ptx_desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);

	/* dw1 */
@@ -322,12 +323,14 @@ u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
		int i;

		for (i = 0; i < padding_sz; i++)
			*(pxmitframe->buf_addr+TXDESC_SIZE+last_txcmdsz+i) = 0;
			*(pxmitframe->buf_addr + TXDESC_SIZE + last_txcmdsz +
			  i) = 0;
	}
	/* Add the new mpdu's length */
	ptx_desc->txdw0 = cpu_to_le32((ptx_desc->txdw0 & 0xffff0000) |
		((ptx_desc->txdw0 & 0x0000ffff) +
			((TXDESC_SIZE+last_txcmdsz+padding_sz)&0x0000ffff)));
			((TXDESC_SIZE + last_txcmdsz + padding_sz) &
			 0x0000ffff)));

	return _SUCCESS;
}
@@ -382,8 +385,9 @@ u8 r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,

	/* use 1st xmitframe as media */
	xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf);
	pcmd_hdr->cmd_dw0 = cpu_to_le32(((total_length-CMD_HDR_SZ)&0x0000ffff)|
					(pcmd_hdr->cmd_dw0&0xffff0000));
	pcmd_hdr->cmd_dw0 = cpu_to_le32(((total_length - CMD_HDR_SZ) &
					 0x0000ffff) | (pcmd_hdr->cmd_dw0 &
							0xffff0000));

	/* urb length in cmd_dw1 */
	pcmd_hdr->cmd_dw1 = cpu_to_le32((pxmitbuf->aggr_nr & 0xff)|
@@ -392,15 +396,17 @@ u8 r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
	pxmitframe->bpending[0] = false;
	pxmitframe->mem_addr = pxmitbuf->pbuf;

	if ((pdvobj->ishighspeed && ((total_length+TXDESC_SIZE)%0x200) == 0) ||
		((!pdvobj->ishighspeed &&
			((total_length+TXDESC_SIZE)%0x40) == 0))) {
	if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) ==
	     0) || ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) %
					      0x40) == 0))) {
		ptxdesc->txdw0 |= cpu_to_le32
			(((TXDESC_SIZE+OFFSET_SZ+8)<<OFFSET_SHT)&0x00ff0000);
			(((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) &
			 0x00ff0000);
		/*32 bytes for TX Desc + 8 bytes pending*/
	} else {
		ptxdesc->txdw0 |= cpu_to_le32
			(((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000);
			(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) &
			 0x00ff0000);
		/*default = 32 bytes for TX Desc*/
	}
	r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD,
+25 −22
Original line number Diff line number Diff line
@@ -118,8 +118,9 @@ static inline void handle_group_key(struct ieee_param *param,
	    param->u.crypt.idx < 3) {
		/* group key idx is 1 or 2 */
		memcpy(padapter->securitypriv.XGrpKey[param->u.crypt.
			idx-1].skey, param->u.crypt.key, (param->u.crypt.key_len
			> 16 ? 16 : param->u.crypt.key_len));
			idx - 1].skey, param->u.crypt.key,
			(param->u.crypt.key_len > 16 ? 16 :
			 param->u.crypt.key_len));
		memcpy(padapter->securitypriv.XGrptxmickey[param->
			u.crypt.idx - 1].skey, &(param->u.crypt.key[16]), 8);
		memcpy(padapter->securitypriv. XGrprxmickey[param->
@@ -1201,7 +1202,8 @@ static int r8711_wx_get_scan(struct net_device *dev,

	if (padapter->bDriverStopped)
		return -EINVAL;
	while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)) {
	while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY |
			     _FW_UNDER_LINKING)) {
		msleep(30);
		cnt++;
		if (cnt > 100)
@@ -1966,7 +1968,8 @@ static int r871x_get_ap_info(struct net_device *dev,

	if (padapter->bDriverStopped || (pdata == NULL))
		return -EINVAL;
	while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)) {
	while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY |
			     _FW_UNDER_LINKING)) {
		msleep(30);
		cnt++;
		if (cnt > 100)
+2 −1
Original line number Diff line number Diff line
@@ -475,7 +475,8 @@ uint oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv)

	if (poid_par_priv->type_of_oid != SET_OID) /* QUERY_OID */
		return RNDIS_STATUS_NOT_ACCEPTED;
	if (poid_par_priv->information_buf_len == (sizeof(unsigned long)*3)) {
	if (poid_par_priv->information_buf_len == (sizeof(unsigned long) *
						   3)) {
		if (Adapter->mppriv.act_in_progress) {
			status = RNDIS_STATUS_NOT_ACCEPTED;
		} else {
Loading