staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XV
This patch removes all the errors and warnings generated by checkpatch -f for rtllib_softmac_wx.c.. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9d92ece80d
commit
a44be772cb
|
@ -69,9 +69,9 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
|
|||
ieee->current_network.channel = fwrq->m;
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC ||
|
||||
ieee->iw_mode == IW_MODE_MASTER)
|
||||
if (ieee->state == RTLLIB_LINKED) {
|
||||
|
||||
rtllib_stop_send_beacons(ieee);
|
||||
rtllib_start_send_beacons(ieee);
|
||||
}
|
||||
|
@ -92,7 +92,8 @@ int rtllib_wx_get_freq(struct rtllib_device *ieee,
|
|||
|
||||
if (ieee->current_network.channel == 0)
|
||||
return -1;
|
||||
fwrq->m = rtllib_wlan_frequencies[ieee->current_network.channel-1] * 100000;
|
||||
fwrq->m = rtllib_wlan_frequencies[ieee->current_network.channel-1] *
|
||||
100000;
|
||||
fwrq->e = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -184,7 +185,8 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b)
|
||||
int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b)
|
||||
{
|
||||
int len, ret = 0;
|
||||
unsigned long flags;
|
||||
|
@ -235,7 +237,8 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
|
|||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
u32 tmp_rate = 0;
|
||||
tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate);
|
||||
tmp_rate = TxCountToDataRate(ieee,
|
||||
ieee->softmac_stats.CurrentShowTxate);
|
||||
wrqu->bitrate.value = tmp_rate * 500000;
|
||||
|
||||
return 0;
|
||||
|
@ -248,8 +251,7 @@ int rtllib_wx_set_rts(struct rtllib_device *ieee,
|
|||
{
|
||||
if (wrqu->rts.disabled || !wrqu->rts.fixed)
|
||||
ieee->rts = DEFAULT_RTS_THRESHOLD;
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
|
||||
wrqu->rts.value > MAX_RTS_THRESHOLD)
|
||||
return -EINVAL;
|
||||
|
@ -315,12 +317,13 @@ out:
|
|||
|
||||
void rtllib_wx_sync_scan_wq(void *data)
|
||||
{
|
||||
struct rtllib_device *ieee = container_of_work_rsl(data, struct rtllib_device, wx_sync_scan_wq);
|
||||
struct rtllib_device *ieee = container_of_work_rsl(data,
|
||||
struct rtllib_device, wx_sync_scan_wq);
|
||||
short chan;
|
||||
enum ht_extchnl_offset chan_offset = 0;
|
||||
enum ht_channel_width bandwidth = 0;
|
||||
int b40M = 0;
|
||||
static int count = 0;
|
||||
static int count;
|
||||
|
||||
if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) {
|
||||
rtllib_start_scan_syncro(ieee, 0);
|
||||
|
@ -348,12 +351,15 @@ void rtllib_wx_sync_scan_wq(void *data)
|
|||
if (ieee->ScanOperationBackupHandler)
|
||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_BACKUP);
|
||||
|
||||
if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
|
||||
if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT &&
|
||||
ieee->pHTInfo->bCurBW40MHz) {
|
||||
b40M = 1;
|
||||
chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
|
||||
bandwidth = (enum ht_channel_width)ieee->pHTInfo->bCurBW40MHz;
|
||||
RT_TRACE(COMP_DBG, "Scan in 40M, force to 20M first:%d, %d\n", chan_offset, bandwidth);
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
|
||||
RT_TRACE(COMP_DBG, "Scan in 40M, force to 20M first:%d, %d\n",
|
||||
chan_offset, bandwidth);
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20,
|
||||
HT_EXTCHNL_OFFSET_NO_EXT);
|
||||
}
|
||||
|
||||
rtllib_start_scan_syncro(ieee, 0);
|
||||
|
@ -437,7 +443,8 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
|
|||
|
||||
proto_started = ieee->proto_started;
|
||||
|
||||
len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : IW_ESSID_MAX_SIZE;
|
||||
len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length :
|
||||
IW_ESSID_MAX_SIZE;
|
||||
|
||||
if (len > IW_ESSID_MAX_SIZE) {
|
||||
ret = -E2BIG;
|
||||
|
@ -470,8 +477,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
|
|||
ieee->current_network.ssid_len = len;
|
||||
ieee->cannot_notify = false;
|
||||
ieee->ssid_set = 1;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
ieee->ssid_set = 0;
|
||||
ieee->current_network.ssid[0] = '\0';
|
||||
ieee->current_network.ssid_len = 0;
|
||||
|
@ -511,8 +517,7 @@ out:
|
|||
printk(KERN_INFO"raw TX is %s\n",
|
||||
ieee->raw_tx ? "enabled" : "disabled");
|
||||
|
||||
if (ieee->iw_mode == IW_MODE_MONITOR)
|
||||
{
|
||||
if (ieee->iw_mode == IW_MODE_MONITOR) {
|
||||
if (prev == 0 && ieee->raw_tx) {
|
||||
if (ieee->data_hard_resume)
|
||||
ieee->data_hard_resume(ieee->dev);
|
||||
|
@ -552,13 +557,11 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (
|
||||
(!ieee->sta_wake_up) ||
|
||||
if ((!ieee->sta_wake_up) ||
|
||||
(!ieee->enter_sleep_state) ||
|
||||
(!ieee->ps_is_queue_empty)) {
|
||||
|
||||
RTLLIB_DEBUG(RTLLIB_DL_ERR,"%s(): PS mode is tryied to be use but driver missed a callback\n\n",__func__);
|
||||
|
||||
RTLLIB_DEBUG(RTLLIB_DL_ERR, "%s(): PS mode is tryied to be use "
|
||||
"but driver missed a callback\n\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -571,14 +574,13 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
|
|||
}
|
||||
if (wrqu->power.flags & IW_POWER_TIMEOUT) {
|
||||
ieee->ps_timeout = wrqu->power.value / 1000;
|
||||
RT_TRACE(COMP_DBG, "===>%s():ps_timeout is %d\n",__func__,ieee->ps_timeout);
|
||||
RT_TRACE(COMP_DBG, "===>%s():ps_timeout is %d\n", __func__,
|
||||
ieee->ps_timeout);
|
||||
}
|
||||
|
||||
if (wrqu->power.flags & IW_POWER_PERIOD) {
|
||||
|
||||
if (wrqu->power.flags & IW_POWER_PERIOD)
|
||||
ieee->ps_period = wrqu->power.value / 1000;
|
||||
|
||||
}
|
||||
switch (wrqu->power.flags & IW_POWER_MODE) {
|
||||
case IW_POWER_UNICAST_R:
|
||||
ieee->ps = RTLLIB_PS_UNICAST;
|
||||
|
@ -628,7 +630,8 @@ int rtllib_wx_get_power(struct rtllib_device *ieee,
|
|||
wrqu->power.value = ieee->ps_period * 1000;
|
||||
}
|
||||
|
||||
if ((ieee->ps & (RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST)) == (RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST))
|
||||
if ((ieee->ps & (RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST)) ==
|
||||
(RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST))
|
||||
wrqu->power.flags |= IW_POWER_ALL_R;
|
||||
else if (ieee->ps & RTLLIB_PS_MBCAST)
|
||||
wrqu->power.flags |= IW_POWER_MULTICAST_R;
|
||||
|
|
Loading…
Reference in New Issue