Re: [PATCH] Staging: rtl18192u: fix style issues in ieee80211_softmac_wx.c

2015-09-04 Thread Greg KH
On Fri, Sep 04, 2015 at 11:00:06PM +, Mike Dupuis wrote:
> This is a patch to the ieee80211_softmac_wx.c file that corrects several
>  checkpatch.pl warnings and errors.
> Signed-off-by: Mike Dupuis 

You need a blank line before the signed-off-by line.

Also, please break this up into multiple patches, each one only doing
one type of cleanup.  As it is, I can't take it, sorry.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl18192u: fix style issues in ieee80211_softmac_wx.c

2015-09-04 Thread Mike Dupuis
This is a patch to the ieee80211_softmac_wx.c file that corrects several
 checkpatch.pl warnings and errors.
Signed-off-by: Mike Dupuis 

---
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c  |  114 ++--
 1 file changed, 54 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 3e502520..a8acd17 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -28,11 +28,11 @@ const long ieee80211_wlan_frequencies[] = {
 };
 EXPORT_SYMBOL(ieee80211_wlan_frequencies);
 
-int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct 
iw_request_info *a,
-union iwreq_data *wrqu, char *b)
+int ieee80211_wx_set_freq(struct ieee80211_device *ieee,
+   struct iw_request_info *a, union iwreq_data *wrqu, char *b)
 {
int ret;
-   struct iw_freq *fwrq = & wrqu->freq;
+   struct iw_freq *fwrq = &wrqu->freq;
 
down(&ieee->wx_sem);
 
@@ -57,11 +57,11 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
}
}
 
-   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1 ){
+   if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1) {
ret = -EOPNOTSUPP;
goto out;
 
-   }else { /* Set the channel */
+   } else { /* Set the channel */
 
if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) {
ret = -EINVAL;
@@ -70,11 +70,10 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, 
struct iw_request_info
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->state == IEEE80211_LINKED){
-
-   ieee80211_stop_send_beacons(ieee);
-   ieee80211_start_send_beacons(ieee);
+   if (ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == 
IW_MODE_MASTER)
+   if (ieee->state == IEEE80211_LINKED) {
+   ieee80211_stop_send_beacons(ieee);
+   ieee80211_start_send_beacons(ieee);
}
}
 
@@ -89,15 +88,15 @@ int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
 struct iw_request_info *a,
 union iwreq_data *wrqu, char *b)
 {
-   struct iw_freq *fwrq = & wrqu->freq;
+   struct iw_freq *fwrq = &wrqu->freq;
 
if (ieee->current_network.channel == 0)
return -1;
-   //NM 0.7.0 will not accept channel any more.
+   /* NM 0.7.0 will not accept channel any more. */
fwrq->m = ieee80211_wlan_frequencies[ieee->current_network.channel-1] * 
10;
fwrq->e = 1;
-// fwrq->m = ieee->current_network.channel;
-// fwrq->e = 0;
+/* fwrq->m = ieee->current_network.channel; */
+/* fwrq->e = 0; */
 
return 0;
 }
@@ -141,7 +140,7 @@ int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
int ret = 0;
unsigned long flags;
 
-   short ifup = ieee->proto_started;//dev->flags & IFF_UP;
+   short ifup = ieee->proto_started; /* dev->flags & IFF_UP; */
struct sockaddr *temp = (struct sockaddr *)awrq;
 
ieee->sync_scan_hurryup = 1;
@@ -179,7 +178,8 @@ out:
 }
 EXPORT_SYMBOL(ieee80211_wx_set_wap);
 
- int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct 
iw_request_info *a,union iwreq_data *wrqu,char *b)
+int ieee80211_wx_get_essid(struct ieee80211_device *ieee,
+   struct iw_request_info *a, union iwreq_data *wrqu, char *b)
 {
int len, ret = 0;
unsigned long flags;
@@ -223,7 +223,7 @@ int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
u32 target_rate = wrqu->bitrate.value;
 
ieee->rate = target_rate/10;
-   //FIXME: we might want to limit rate also in management protocols.
+   /* FIXME: we might want to limit rate also in management protocols. */
return 0;
 }
 EXPORT_SYMBOL(ieee80211_wx_set_rate);
@@ -233,6 +233,7 @@ int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
 union iwreq_data *wrqu, char *extra)
 {
u32 tmp_rate;
+
tmp_rate = TxCountToDataRate(ieee, 
ieee->softmac_stats.CurrentShowTxate);
 
wrqu->bitrate.value = tmp_rate * 50;
@@ -247,8 +248,7 @@ int ieee80211_wx_set_rts(struct ieee80211_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;
@@ -269,