Commit c4309727 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: clean up blank line style issues



Add missing and remove unnecessary blank lines to clear checkpatch
issues.

CHECK: Please use a blank line after function/struct/union/enum declarations
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please don't use multiple blank lines
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200919150823.16923-1-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9079371e
Loading
Loading
Loading
Loading
+1 −11
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ Major Change History:
static u32 edca_setting_DL[HT_IOT_PEER_MAX] = {
static u32 edca_setting_DL[HT_IOT_PEER_MAX] = {
	0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0x00a44f, 0x5ea44f
	0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0x00a44f, 0x5ea44f
};
};

static u32 edca_setting_UL[HT_IOT_PEER_MAX] = {
static u32 edca_setting_UL[HT_IOT_PEER_MAX] = {
	0x5e4322, 0x00a44f, 0x5e4322, 0x604322, 0x5ea44f, 0x5ea44f
	0x5e4322, 0x00a44f, 0x5e4322, 0x604322, 0x5ea44f, 0x5ea44f
};
};
@@ -599,7 +600,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
					priv->rfa_txpowertrackingindex++;
					priv->rfa_txpowertrackingindex++;
					priv->rfa_txpowertrackingindex_real++;
					priv->rfa_txpowertrackingindex_real++;
					rtl8192_setBBreg(dev, rOFDM0_XATxIQImbalance, bMaskDWord, priv->txbbgain_table[priv->rfa_txpowertrackingindex_real].txbbgain_value);
					rtl8192_setBBreg(dev, rOFDM0_XATxIQImbalance, bMaskDWord, priv->txbbgain_table[priv->rfa_txpowertrackingindex_real].txbbgain_value);

				}
				}
			}
			}
			priv->cck_present_attenuation_difference
			priv->cck_present_attenuation_difference
@@ -1268,7 +1268,6 @@ static void dm_InitializeTXPowerTracking_TSSI(struct net_device *dev)
	priv->btxpower_tracking = true;
	priv->btxpower_tracking = true;
	priv->txpower_count       = 0;
	priv->txpower_count       = 0;
	priv->btxpower_trackingInit = false;
	priv->btxpower_trackingInit = false;

}
}


static void dm_InitializeTXPowerTracking_ThermalMeter(struct net_device *dev)
static void dm_InitializeTXPowerTracking_ThermalMeter(struct net_device *dev)
@@ -1773,7 +1772,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
		/* 1.5 Higher EDCCA. */
		/* 1.5 Higher EDCCA. */
		/*PlatformEFIOWrite4Byte(pAdapter, rOFDM0_ECCAThreshold, 0x325);*/
		/*PlatformEFIOWrite4Byte(pAdapter, rOFDM0_ECCAThreshold, 0x325);*/
		return;
		return;

	}
	}


	/* 2. When RSSI increase, We have to judge if it is larger than a threshold
	/* 2. When RSSI increase, We have to judge if it is larger than a threshold
@@ -1836,7 +1834,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(


		/* 2.5 DIG On. */
		/* 2.5 DIG On. */
		rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);	/*  Only clear byte 1 and rewrite. */
		rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);	/*  Only clear byte 1 and rewrite. */

	}
	}


	dm_ctrl_initgain_byrssi_highpwr(dev);
	dm_ctrl_initgain_byrssi_highpwr(dev);
@@ -2157,7 +2154,6 @@ static void dm_check_edca_turbo(
				write_nic_dword(dev, EDCAPARA_BE, edca_setting_UL[pHTInfo->IOTPeer]);
				write_nic_dword(dev, EDCAPARA_BE, edca_setting_UL[pHTInfo->IOTPeer]);
				priv->bis_cur_rdlstate = false;
				priv->bis_cur_rdlstate = false;
			}
			}

		}
		}


		priv->bcurrent_turbo_EDCA = true;
		priv->bcurrent_turbo_EDCA = true;
@@ -2191,7 +2187,6 @@ static void dm_check_edca_turbo(


			write_nic_dword(dev, EDCAPARA_BE, u4bAcParam);
			write_nic_dword(dev, EDCAPARA_BE, u4bAcParam);



			/* Check ACM bit.
			/* Check ACM bit.
			 * If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.
			 * If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.
			 */
			 */
@@ -2296,7 +2291,6 @@ static void dm_check_pbc_gpio(struct net_device *dev)
		RT_TRACE(COMP_IO, "CheckPbcGPIO - PBC is pressed\n");
		RT_TRACE(COMP_IO, "CheckPbcGPIO - PBC is pressed\n");
		priv->bpbc_pressed = true;
		priv->bpbc_pressed = true;
	}
	}

}
}


/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
@@ -2495,7 +2489,6 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
						cck_rx_ver2_min_index = i;
						cck_rx_ver2_min_index = i;
					}
					}
				}
				}

			}
			}
		}
		}
	}
	}
@@ -2715,7 +2708,6 @@ static void dm_EndSWFsync(struct net_device *dev)


	priv->ContinueDiffCount = 0;
	priv->ContinueDiffCount = 0;
	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c52cd);
	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c52cd);

}
}


static void dm_StartSWFsync(struct net_device *dev)
static void dm_StartSWFsync(struct net_device *dev)
@@ -2751,7 +2743,6 @@ static void dm_StartSWFsync(struct net_device *dev)
	add_timer(&priv->fsync_timer);
	add_timer(&priv->fsync_timer);


	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c12cd);
	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c12cd);

}
}


static void dm_EndHWFsync(struct net_device *dev)
static void dm_EndHWFsync(struct net_device *dev)
@@ -2759,7 +2750,6 @@ static void dm_EndHWFsync(struct net_device *dev)
	RT_TRACE(COMP_HALDM, "%s\n", __func__);
	RT_TRACE(COMP_HALDM, "%s\n", __func__);
	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c52cd);
	write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c52cd);
	write_nic_byte(dev, 0xc3b, 0x49);
	write_nic_byte(dev, 0xc3b, 0x49);

}
}


void dm_check_fsync(struct net_device *dev)
void dm_check_fsync(struct net_device *dev)
+1 −0
Original line number Original line Diff line number Diff line
@@ -239,6 +239,7 @@ enum _RTL8192Usb_HW {
#define EPROM_W_BIT  BIT(1)
#define EPROM_W_BIT  BIT(1)
#define EPROM_R_BIT  BIT(0)
#define EPROM_R_BIT  BIT(0)
};
};

//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//       818xB AnaParm & AnaParm2 Register
//       818xB AnaParm & AnaParm2 Register
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
+2 −29
Original line number Original line Diff line number Diff line
@@ -138,7 +138,6 @@ static int r8192_wx_force_reset(struct net_device *dev,
	priv->force_reset = *extra;
	priv->force_reset = *extra;
	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);
	return 0;
	return 0;

}
}


static int r8192_wx_set_rawtx(struct net_device *dev,
static int r8192_wx_set_rawtx(struct net_device *dev,
@@ -155,7 +154,6 @@ static int r8192_wx_set_rawtx(struct net_device *dev,
	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);


	return ret;
	return ret;

}
}


static int r8192_wx_set_crcmon(struct net_device *dev,
static int r8192_wx_set_crcmon(struct net_device *dev,
@@ -218,6 +216,7 @@ struct iw_range_with_scan_capa {
	/* Scan capabilities */
	/* Scan capabilities */
	__u8            scan_capa;
	__u8            scan_capa;
};
};

static int rtl8180_wx_get_range(struct net_device *dev,
static int rtl8180_wx_get_range(struct net_device *dev,
				struct iw_request_info *info,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
				union iwreq_data *wrqu, char *extra)
@@ -294,7 +293,6 @@ static int rtl8180_wx_get_range(struct net_device *dev,
	/* range->max_r_time; */	/* Maximal retry lifetime */
	/* range->max_r_time; */	/* Maximal retry lifetime */


	for (i = 0, val = 0; i < 14; i++) {
	for (i = 0, val = 0; i < 14; i++) {

		/* Include only legal frequencies for some countries */
		/* Include only legal frequencies for some countries */
		if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
		if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
			range->freq[val].i = i + 1;
			range->freq[val].i = i + 1;
@@ -350,11 +348,9 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
	return ret;
	return ret;
}
}



static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
			     union iwreq_data *wrqu, char *b)
			     union iwreq_data *wrqu, char *b)
{
{

	int ret;
	int ret;
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);


@@ -444,7 +440,6 @@ static int r8192_wx_set_frag(struct net_device *dev,
	return 0;
	return 0;
}
}



static int r8192_wx_get_frag(struct net_device *dev,
static int r8192_wx_get_frag(struct net_device *dev,
			     struct iw_request_info *info,
			     struct iw_request_info *info,
			     union iwreq_data *wrqu, char *extra)
			     union iwreq_data *wrqu, char *extra)
@@ -458,13 +453,11 @@ static int r8192_wx_get_frag(struct net_device *dev,
	return 0;
	return 0;
}
}



static int r8192_wx_set_wap(struct net_device *dev,
static int r8192_wx_set_wap(struct net_device *dev,
			 struct iw_request_info *info,
			 struct iw_request_info *info,
			 union iwreq_data *awrq,
			 union iwreq_data *awrq,
			 char *extra)
			 char *extra)
{
{

	int ret;
	int ret;
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);
	/* struct sockaddr *temp = (struct sockaddr *)awrq; */
	/* struct sockaddr *temp = (struct sockaddr *)awrq; */
@@ -475,7 +468,6 @@ static int r8192_wx_set_wap(struct net_device *dev,
	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);


	return ret;
	return ret;

}
}


static int r8192_wx_get_wap(struct net_device *dev,
static int r8192_wx_get_wap(struct net_device *dev,
@@ -522,11 +514,8 @@ static int r8192_wx_set_enc(struct net_device *dev,


	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);




	/* sometimes, the length is zero while we do not type key value */
	/* sometimes, the length is zero while we do not type key value */
	if (wrqu->encoding.length != 0) {
	if (wrqu->encoding.length != 0) {

		for (i = 0; i < 4; i++) {
		for (i = 0; i < 4; i++) {
			hwkey[i] |=  key[4*i+0]&mask;
			hwkey[i] |=  key[4*i+0]&mask;
			if (i == 1 && (4*i+1) == wrqu->encoding.length)
			if (i == 1 && (4*i+1) == wrqu->encoding.length)
@@ -572,7 +561,6 @@ static int r8192_wx_set_enc(struct net_device *dev,
				zero_addr[key_idx],
				zero_addr[key_idx],
				0,                      /* DefaultKey */
				0,                      /* DefaultKey */
				hwkey);                 /* KeyContent */
				hwkey);                 /* KeyContent */

		}
		}


		else if (wrqu->encoding.length == 0xd) {
		else if (wrqu->encoding.length == 0xd) {
@@ -586,21 +574,17 @@ static int r8192_wx_set_enc(struct net_device *dev,
				zero_addr[key_idx],
				zero_addr[key_idx],
				0,                      /* DefaultKey */
				0,                      /* DefaultKey */
				hwkey);                 /* KeyContent */
				hwkey);                 /* KeyContent */

		} else {
		} else {
			netdev_warn(dev, "wrong type in WEP, not WEP40 and WEP104\n");
			netdev_warn(dev, "wrong type in WEP, not WEP40 and WEP104\n");
		}
		}

	}
	}


	return ret;
	return ret;
}
}



static int r8192_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa,
static int r8192_wx_set_scan_type(struct net_device *dev, struct iw_request_info *aa,
					union iwreq_data *wrqu, char *p)
					union iwreq_data *wrqu, char *p)
{
{

	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);
	int *parms = (int *)p;
	int *parms = (int *)p;
	int mode = parms[0];
	int mode = parms[0];
@@ -610,8 +594,6 @@ static int r8192_wx_set_scan_type(struct net_device *dev, struct iw_request_info
	return 1;
	return 1;
}
}




static int r8192_wx_set_retry(struct net_device *dev,
static int r8192_wx_set_retry(struct net_device *dev,
				struct iw_request_info *info,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
				union iwreq_data *wrqu, char *extra)
@@ -663,7 +645,6 @@ static int r8192_wx_get_retry(struct net_device *dev,
{
{
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);



	wrqu->retry.disabled = 0; /* can't be disabled */
	wrqu->retry.disabled = 0; /* can't be disabled */


	if ((wrqu->retry.flags & IW_RETRY_TYPE) ==
	if ((wrqu->retry.flags & IW_RETRY_TYPE) ==
@@ -697,7 +678,6 @@ static int r8192_wx_set_sens(struct net_device *dev,
				struct iw_request_info *info,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
				union iwreq_data *wrqu, char *extra)
{
{

	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);
	short err = 0;
	short err = 0;


@@ -726,7 +706,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct ieee80211_device *ieee = priv->ieee80211;
	struct ieee80211_device *ieee = priv->ieee80211;



	mutex_lock(&priv->wx_mutex);
	mutex_lock(&priv->wx_mutex);
	ret = ieee80211_wx_set_encode_ext(priv->ieee80211, info, wrqu, extra);
	ret = ieee80211_wx_set_encode_ext(priv->ieee80211, info, wrqu, extra);


@@ -758,7 +737,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
		memcpy((u8 *)key, ext->key, 16); /* we only get 16 bytes key.why? WB 2008.7.1 */
		memcpy((u8 *)key, ext->key, 16); /* we only get 16 bytes key.why? WB 2008.7.1 */


		if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) {
		if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) {

			setKey(dev,
			setKey(dev,
					idx,	/* EntryNao */
					idx,	/* EntryNao */
					idx,	/* KeyIndex */
					idx,	/* KeyIndex */
@@ -784,16 +762,14 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
					0,			/* DefaultKey */
					0,			/* DefaultKey */
					key);			/* KeyContent */
					key);			/* KeyContent */
		}
		}


	}
	}


end_hw_sec:
end_hw_sec:


	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);
	return ret;
	return ret;

}
}

static int r8192_wx_set_auth(struct net_device *dev,
static int r8192_wx_set_auth(struct net_device *dev,
					struct iw_request_info *info,
					struct iw_request_info *info,
					union iwreq_data *data, char *extra)
					union iwreq_data *data, char *extra)
@@ -811,7 +787,6 @@ static int r8192_wx_set_mlme(struct net_device *dev,
					struct iw_request_info *info,
					struct iw_request_info *info,
					union iwreq_data *wrqu, char *extra)
					union iwreq_data *wrqu, char *extra)
{
{

	int ret = 0;
	int ret = 0;
	struct r8192_priv *priv = ieee80211_priv(dev);
	struct r8192_priv *priv = ieee80211_priv(dev);


@@ -833,8 +808,6 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
	ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
	ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
	mutex_unlock(&priv->wx_mutex);
	mutex_unlock(&priv->wx_mutex);
	return ret;
	return ret;


}
}


static int dummy(struct net_device *dev, struct iw_request_info *a,
static int dummy(struct net_device *dev, struct iw_request_info *a,
+0 −1
Original line number Original line Diff line number Diff line
@@ -336,7 +336,6 @@ static void cmpk_count_tx_status(struct net_device *dev,
	priv->stats.txretrycount	+= pstx_status->txretry;
	priv->stats.txretrycount	+= pstx_status->txretry;
	priv->stats.txfeedbackretry	+= pstx_status->txretry;
	priv->stats.txfeedbackretry	+= pstx_status->txretry;



	priv->stats.txmulticast		+= pstx_status->txmcok;
	priv->stats.txmulticast		+= pstx_status->txmcok;
	priv->stats.txbroadcast		+= pstx_status->txbcok;
	priv->stats.txbroadcast		+= pstx_status->txbcok;
	priv->stats.txunicast		+= pstx_status->txucok;
	priv->stats.txunicast		+= pstx_status->txucok;
+0 −6
Original line number Original line Diff line number Diff line
@@ -54,11 +54,9 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
		if ((buffer_len - frag_offset) > frag_threshold) {
		if ((buffer_len - frag_offset) > frag_threshold) {
			frag_length = frag_threshold;
			frag_length = frag_threshold;
			bLastIniPkt = 0;
			bLastIniPkt = 0;

		} else {
		} else {
			frag_length = buffer_len - frag_offset;
			frag_length = buffer_len - frag_offset;
			bLastIniPkt = 1;
			bLastIniPkt = 1;

		}
		}


		/* Allocate skb buffer to contain firmware info and tx descriptor info
		/* Allocate skb buffer to contain firmware info and tx descriptor info
@@ -104,7 +102,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
	} while (frag_offset < buffer_len);
	} while (frag_offset < buffer_len);


	return rt_status;
	return rt_status;

}
}


/*
/*
@@ -172,7 +169,6 @@ static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)


static bool CPUcheck_firmware_ready(struct net_device *dev)
static bool CPUcheck_firmware_ready(struct net_device *dev)
{
{

	bool		rt_status = true;
	bool		rt_status = true;
	int		check_time = 200000;
	int		check_time = 200000;
	u32		CPU_status = 0;
	u32		CPU_status = 0;
@@ -197,7 +193,6 @@ static bool CPUcheck_firmware_ready(struct net_device *dev)
	RT_TRACE(COMP_ERR, "ERR in %s()\n", __func__);
	RT_TRACE(COMP_ERR, "ERR in %s()\n", __func__);
	rt_status = false;
	rt_status = false;
	return rt_status;
	return rt_status;

}
}


bool init_firmware(struct net_device *dev)
bool init_firmware(struct net_device *dev)
@@ -338,7 +333,6 @@ bool init_firmware(struct net_device *dev)
	RT_TRACE(COMP_ERR, "ERR in %s()\n", __func__);
	RT_TRACE(COMP_ERR, "ERR in %s()\n", __func__);
	rt_status = false;
	rt_status = false;
	return rt_status;
	return rt_status;

}
}


MODULE_FIRMWARE("RTL8192U/boot.img");
MODULE_FIRMWARE("RTL8192U/boot.img");
Loading