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>
This commit is contained in:
@@ -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->current_network.channel = fwrq->m;
|
||||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
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) {
|
if (ieee->state == RTLLIB_LINKED) {
|
||||||
|
|
||||||
rtllib_stop_send_beacons(ieee);
|
rtllib_stop_send_beacons(ieee);
|
||||||
rtllib_start_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)
|
if (ieee->current_network.channel == 0)
|
||||||
return -1;
|
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;
|
fwrq->e = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -184,7 +185,8 @@ out:
|
|||||||
return ret;
|
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;
|
int len, ret = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@@ -235,7 +237,8 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
|
|||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
u32 tmp_rate = 0;
|
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;
|
wrqu->bitrate.value = tmp_rate * 500000;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -248,8 +251,7 @@ int rtllib_wx_set_rts(struct rtllib_device *ieee,
|
|||||||
{
|
{
|
||||||
if (wrqu->rts.disabled || !wrqu->rts.fixed)
|
if (wrqu->rts.disabled || !wrqu->rts.fixed)
|
||||||
ieee->rts = DEFAULT_RTS_THRESHOLD;
|
ieee->rts = DEFAULT_RTS_THRESHOLD;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
|
if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
|
||||||
wrqu->rts.value > MAX_RTS_THRESHOLD)
|
wrqu->rts.value > MAX_RTS_THRESHOLD)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -315,12 +317,13 @@ out:
|
|||||||
|
|
||||||
void rtllib_wx_sync_scan_wq(void *data)
|
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;
|
short chan;
|
||||||
enum ht_extchnl_offset chan_offset = 0;
|
enum ht_extchnl_offset chan_offset = 0;
|
||||||
enum ht_channel_width bandwidth = 0;
|
enum ht_channel_width bandwidth = 0;
|
||||||
int b40M = 0;
|
int b40M = 0;
|
||||||
static int count = 0;
|
static int count;
|
||||||
|
|
||||||
if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) {
|
if (!(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) {
|
||||||
rtllib_start_scan_syncro(ieee, 0);
|
rtllib_start_scan_syncro(ieee, 0);
|
||||||
@@ -348,12 +351,15 @@ void rtllib_wx_sync_scan_wq(void *data)
|
|||||||
if (ieee->ScanOperationBackupHandler)
|
if (ieee->ScanOperationBackupHandler)
|
||||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_BACKUP);
|
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;
|
b40M = 1;
|
||||||
chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
|
chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
|
||||||
bandwidth = (enum ht_channel_width)ieee->pHTInfo->bCurBW40MHz;
|
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);
|
RT_TRACE(COMP_DBG, "Scan in 40M, force to 20M first:%d, %d\n",
|
||||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
|
chan_offset, bandwidth);
|
||||||
|
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20,
|
||||||
|
HT_EXTCHNL_OFFSET_NO_EXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtllib_start_scan_syncro(ieee, 0);
|
rtllib_start_scan_syncro(ieee, 0);
|
||||||
@@ -437,7 +443,8 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
|
|||||||
|
|
||||||
proto_started = ieee->proto_started;
|
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) {
|
if (len > IW_ESSID_MAX_SIZE) {
|
||||||
ret = -E2BIG;
|
ret = -E2BIG;
|
||||||
@@ -470,8 +477,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
|
|||||||
ieee->current_network.ssid_len = len;
|
ieee->current_network.ssid_len = len;
|
||||||
ieee->cannot_notify = false;
|
ieee->cannot_notify = false;
|
||||||
ieee->ssid_set = 1;
|
ieee->ssid_set = 1;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
ieee->ssid_set = 0;
|
ieee->ssid_set = 0;
|
||||||
ieee->current_network.ssid[0] = '\0';
|
ieee->current_network.ssid[0] = '\0';
|
||||||
ieee->current_network.ssid_len = 0;
|
ieee->current_network.ssid_len = 0;
|
||||||
@@ -511,8 +517,7 @@ out:
|
|||||||
printk(KERN_INFO"raw TX is %s\n",
|
printk(KERN_INFO"raw TX is %s\n",
|
||||||
ieee->raw_tx ? "enabled" : "disabled");
|
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 (prev == 0 && ieee->raw_tx) {
|
||||||
if (ieee->data_hard_resume)
|
if (ieee->data_hard_resume)
|
||||||
ieee->data_hard_resume(ieee->dev);
|
ieee->data_hard_resume(ieee->dev);
|
||||||
@@ -552,13 +557,11 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (
|
if ((!ieee->sta_wake_up) ||
|
||||||
(!ieee->sta_wake_up) ||
|
|
||||||
(!ieee->enter_sleep_state) ||
|
(!ieee->enter_sleep_state) ||
|
||||||
(!ieee->ps_is_queue_empty)) {
|
(!ieee->ps_is_queue_empty)) {
|
||||||
|
RTLLIB_DEBUG(RTLLIB_DL_ERR, "%s(): PS mode is tryied to be use "
|
||||||
RTLLIB_DEBUG(RTLLIB_DL_ERR,"%s(): PS mode is tryied to be use but driver missed a callback\n\n",__func__);
|
"but driver missed a callback\n\n", __func__);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,14 +574,13 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
|
|||||||
}
|
}
|
||||||
if (wrqu->power.flags & IW_POWER_TIMEOUT) {
|
if (wrqu->power.flags & IW_POWER_TIMEOUT) {
|
||||||
ieee->ps_timeout = wrqu->power.value / 1000;
|
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;
|
ieee->ps_period = wrqu->power.value / 1000;
|
||||||
|
|
||||||
}
|
|
||||||
switch (wrqu->power.flags & IW_POWER_MODE) {
|
switch (wrqu->power.flags & IW_POWER_MODE) {
|
||||||
case IW_POWER_UNICAST_R:
|
case IW_POWER_UNICAST_R:
|
||||||
ieee->ps = RTLLIB_PS_UNICAST;
|
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;
|
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;
|
wrqu->power.flags |= IW_POWER_ALL_R;
|
||||||
else if (ieee->ps & RTLLIB_PS_MBCAST)
|
else if (ieee->ps & RTLLIB_PS_MBCAST)
|
||||||
wrqu->power.flags |= IW_POWER_MULTICAST_R;
|
wrqu->power.flags |= IW_POWER_MULTICAST_R;
|
||||||
|
Reference in New Issue
Block a user