2016-10-19 15:52:55

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 00/12] Avoid CamelCases in hfa384x.h

This patchset fix CamelCases in hfa384x.h header file.

This file is free of CamelCases now.

Sergio Paracuellos (12):
staging: wlan-ng: avoid CamelCase: HFA384x_RID_CNFAPBCNint
staging: wlan-ng: avoid CamelCase: hfa384x_HostScanRequest_data
staging: wlan-ng: avoid CamelCase: hfa384x_WPAData
staging: wlan-ng: avoid CamelCase in fields of struct
hfa384x_dbmcommsquality
staging: wlan-ng: avoid CamelCase: hfa384x_CommTallies16
staging: wlan-ng: avoid CamelCase: hfa384x_ChInfoResult
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResultSub
staging: wlan-ng: avoid CamelCase: hfa384x_HScanResult
staging: wlan-ng: avoid CamelCase: hfa384x_LinkStatus
staging: wlan-ng: avoid CamelCase: hfa384x_AuthRequest
staging: wlan-ng: avoid CamelCase: hfa384x_PSUserCount
staging: wlan-ng: avoid CamelCase: hfa384x_KeyIDChanged

drivers/staging/wlan-ng/hfa384x.h | 50 ++++++++++++++++++------------------
drivers/staging/wlan-ng/prism2mgmt.c | 12 ++++-----
drivers/staging/wlan-ng/prism2mib.c | 2 +-
3 files changed, 32 insertions(+), 32 deletions(-)

--
1.9.1


2016-10-19 15:53:10

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 5/5] staging: wlan-ng: Replace data type declaration with variable of same type in prism2sta.c

sizeof(*var) instead of sizeof(struct XXX) is preferred.
Fix them in prism2sta.c file.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/prism2sta.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index b3ae2bb..351f08d 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1102,8 +1102,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,

kfree(hw->scanresults);

- hw->scanresults = kmemdup(inf, sizeof(struct hfa384x_inf_frame),
- GFP_ATOMIC);
+ hw->scanresults = kmemdup(inf, sizeof(*inf), GFP_ATOMIC);

if (nbss == 0)
nbss = -1;
@@ -1888,8 +1887,8 @@ static struct wlandevice *create_wlan(void)
struct hfa384x *hw = NULL;

/* Alloc our structures */
- wlandev = kzalloc(sizeof(struct wlandevice), GFP_KERNEL);
- hw = kzalloc(sizeof(struct hfa384x), GFP_KERNEL);
+ wlandev = kzalloc(sizeof(*wlandev), GFP_KERNEL);
+ hw = kzalloc(sizeof(*hw), GFP_KERNEL);

if (!wlandev || !hw) {
kfree(wlandev);
--
1.9.1

2016-10-19 15:52:58

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 02/12] staging: wlan-ng: avoid CamelCase: hfa384x_HostScanRequest_data

Replace CamelCase struct name and fields with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 6 +++---
drivers/staging/wlan-ng/prism2mgmt.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 1c7a171..89380ac 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -408,9 +408,9 @@ struct hfa384x_caplevel {
#define HFA384x_CREATEIBSS_JOINCREATEIBSS 0

/*-- Configuration Record: HostScanRequest (data portion only) --*/
-struct hfa384x_HostScanRequest_data {
- u16 channelList;
- u16 txRate;
+struct hfa384x_host_scan_request_data {
+ u16 channel_list;
+ u16 tx_rate;
struct hfa384x_bytestr32 ssid;
} __packed;

diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 8be3a74..3a56308 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -123,7 +123,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp)
int i, timeout;
int istmpenable = 0;

- struct hfa384x_HostScanRequest_data scanreq;
+ struct hfa384x_host_scan_request_data scanreq;

/* gatekeeper check */
if (HFA384x_FIRMWARE_VERSION(hw->ident_sta_fw.major,
@@ -185,7 +185,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp)

/* set up the txrate to be 2MBPS. Should be fastest basicrate... */
word = HFA384x_RATEBIT_2;
- scanreq.txRate = cpu_to_le16(word);
+ scanreq.tx_rate = cpu_to_le16(word);

/* set up the channel list */
word = 0;
@@ -197,7 +197,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp)
/* channel 1 is BIT 0 ... channel 14 is BIT 13 */
word |= (1 << (channel - 1));
}
- scanreq.channelList = cpu_to_le16(word);
+ scanreq.channel_list = cpu_to_le16(word);

/* set up the ssid, if present. */
scanreq.ssid.len = cpu_to_le16(msg->ssid.data.len);
@@ -293,7 +293,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp)

result = hfa384x_drvr_setconfig(hw,
HFA384x_RID_HOSTSCAN, &scanreq,
- sizeof(struct hfa384x_HostScanRequest_data));
+ sizeof(struct hfa384x_host_scan_request_data));
if (result) {
netdev_err(wlandev->netdev,
"setconfig(SCANREQUEST) failed. result=%d\n",
--
1.9.1

2016-10-19 15:53:15

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 12/12] staging: wlan-ng: avoid CamelCase: hfa384x_KeyIDChanged

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index f989ce2..01945a9 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -755,7 +755,7 @@ struct hfa384x_ps_user_count {
u16 usercnt;
} __packed;

-struct hfa384x_KeyIDChanged {
+struct hfa384x_key_id_changed {
u8 sta_addr[ETH_ALEN];
u16 keyid;
} __packed;
@@ -771,7 +771,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_assoc_status assocstatus;
struct hfa384x_auth_request authreq;
struct hfa384x_ps_user_count psusercnt;
- struct hfa384x_KeyIDChanged keyidchanged;
+ struct hfa384x_key_id_changed keyidchanged;
} __packed;

struct hfa384x_inf_frame {
--
1.9.1

2016-10-19 15:53:33

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 11/12] staging: wlan-ng: avoid CamelCase: hfa384x_PSUserCount

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index c81ca93..f989ce2 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -751,7 +751,7 @@ struct hfa384x_auth_request {

/*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/

-struct hfa384x_PSUserCount {
+struct hfa384x_ps_user_count {
u16 usercnt;
} __packed;

@@ -770,7 +770,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_link_status linkstatus;
struct hfa384x_assoc_status assocstatus;
struct hfa384x_auth_request authreq;
- struct hfa384x_PSUserCount psusercnt;
+ struct hfa384x_ps_user_count psusercnt;
struct hfa384x_KeyIDChanged keyidchanged;
} __packed;

--
1.9.1

2016-10-19 15:53:35

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 10/12] staging: wlan-ng: avoid CamelCase: hfa384x_AuthRequest

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 2c08f8b..c81ca93 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -744,7 +744,7 @@ struct hfa384x_assoc_status {

/*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/

-struct hfa384x_AuthRequest {
+struct hfa384x_auth_request {
u8 sta_addr[ETH_ALEN];
u16 algorithm;
} __packed;
@@ -769,7 +769,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_hscan_result hscanresult;
struct hfa384x_link_status linkstatus;
struct hfa384x_assoc_status assocstatus;
- struct hfa384x_AuthRequest authreq;
+ struct hfa384x_auth_request authreq;
struct hfa384x_PSUserCount psusercnt;
struct hfa384x_KeyIDChanged keyidchanged;
} __packed;
--
1.9.1

2016-10-19 15:54:02

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 09/12] staging: wlan-ng: avoid CamelCase: hfa384x_LinkStatus

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index e5b72dc..2c08f8b 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -723,7 +723,7 @@ struct hfa384x_hscan_result {
#define HFA384x_LINK_AP_INRANGE ((u16)5)
#define HFA384x_LINK_ASSOCFAIL ((u16)6)

-struct hfa384x_LinkStatus {
+struct hfa384x_link_status {
u16 linkstatus;
} __packed;

@@ -767,7 +767,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_scan_result scanresult;
struct hfa384x_ch_info_result chinforesult;
struct hfa384x_hscan_result hscanresult;
- struct hfa384x_LinkStatus linkstatus;
+ struct hfa384x_link_status linkstatus;
struct hfa384x_assoc_status assocstatus;
struct hfa384x_AuthRequest authreq;
struct hfa384x_PSUserCount psusercnt;
--
1.9.1

2016-10-19 15:53:07

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 04/12] staging: wlan-ng: avoid CamelCase in fields of struct hfa384x_dbmcommsquality

Replace CamelCase fields of struct with underscores to comply
with the standard kernel coding style

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index a3a0ed5..2034c42 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -462,9 +462,9 @@ struct hfa384x_commsquality {

/*-- Information Record: dmbcommsquality --*/
struct hfa384x_dbmcommsquality {
- u16 CQdbm_currBSS;
- u16 ASLdbm_currBSS;
- u16 ANLdbm_currFC;
+ u16 cq_dbm_curr_bss;
+ u16 asl_dbm_curr_bss;
+ u16 anl_dbm_curr_fc;
} __packed;

/*--------------------------------------------------------------------
--
1.9.1

2016-10-19 15:54:34

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 08/12] staging: wlan-ng: avoid CamelCase: hfa384x_HScanResult

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 46855fe..e5b72dc 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -707,7 +707,7 @@ struct hfa384x_hscan_result_sub {
u16 atim;
} __packed;

-struct hfa384x_HScanResult {
+struct hfa384x_hscan_result {
u16 nresult;
u16 rsvd;
struct hfa384x_hscan_result_sub result[HFA384x_HSCANRESULT_MAX];
@@ -766,7 +766,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_comm_tallies_32 commtallies32;
struct hfa384x_scan_result scanresult;
struct hfa384x_ch_info_result chinforesult;
- struct hfa384x_HScanResult hscanresult;
+ struct hfa384x_hscan_result hscanresult;
struct hfa384x_LinkStatus linkstatus;
struct hfa384x_assoc_status assocstatus;
struct hfa384x_AuthRequest authreq;
--
1.9.1

2016-10-19 15:55:08

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 07/12] staging: wlan-ng: avoid CamelCase: hfa384x_HScanResultSub

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index c5b5208..46855fe 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -694,7 +694,7 @@ struct hfa384x_ch_info_result {
} __packed;

/*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
-struct hfa384x_HScanResultSub {
+struct hfa384x_hscan_result_sub {
u16 chid;
u16 anl;
u16 sl;
@@ -710,7 +710,7 @@ struct hfa384x_HScanResultSub {
struct hfa384x_HScanResult {
u16 nresult;
u16 rsvd;
- struct hfa384x_HScanResultSub result[HFA384x_HSCANRESULT_MAX];
+ struct hfa384x_hscan_result_sub result[HFA384x_HSCANRESULT_MAX];
} __packed;

/*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 3a56308..f63704a 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -373,7 +373,7 @@ int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp)
int result = 0;
struct p80211msg_dot11req_scan_results *req;
struct hfa384x *hw = wlandev->priv;
- struct hfa384x_HScanResultSub *item = NULL;
+ struct hfa384x_hscan_result_sub *item = NULL;

int count;

--
1.9.1

2016-10-19 15:53:03

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 3/5] staging: wlan-ng: Replace data type declaration with variable of same type in p80211conv.c

sizeof(*var) instead of sizeof(struct XXX) is preferred.
Fix it in p80211conv.c file.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/p80211conv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c
index 0247cbc..bbed7ff 100644
--- a/drivers/staging/wlan-ng/p80211conv.c
+++ b/drivers/staging/wlan-ng/p80211conv.c
@@ -615,7 +615,7 @@ int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
}

/* Allocate the rxmeta */
- rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
+ rxmeta = kzalloc(sizeof(*rxmeta), GFP_ATOMIC);

if (!rxmeta) {
netdev_err(wlandev->netdev,
--
1.9.1

2016-10-19 15:55:53

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 06/12] staging: wlan-ng: avoid CamelCase: hfa384x_ChInfoResult

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 9556098..c5b5208 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -688,7 +688,7 @@ struct hfa384x_ch_info_result_sub {
#define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
#define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)

-struct hfa384x_ChInfoResult {
+struct hfa384x_ch_info_result {
u16 scanchannels;
struct hfa384x_ch_info_result_sub result[HFA384x_CHINFORESULT_MAX];
} __packed;
@@ -765,7 +765,7 @@ struct hfa384x_KeyIDChanged {
struct hfa384x_comm_tallies_16 commtallies16;
struct hfa384x_comm_tallies_32 commtallies32;
struct hfa384x_scan_result scanresult;
- struct hfa384x_ChInfoResult chinforesult;
+ struct hfa384x_ch_info_result chinforesult;
struct hfa384x_HScanResult hscanresult;
struct hfa384x_LinkStatus linkstatus;
struct hfa384x_assoc_status assocstatus;
@@ -1366,7 +1366,7 @@ struct hfa384x {
struct {
atomic_t done;
u8 count;
- struct hfa384x_ChInfoResult results;
+ struct hfa384x_ch_info_result results;
} channel_info;

struct hfa384x_inf_frame *scanresults;
--
1.9.1

2016-10-19 15:56:24

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 05/12] staging: wlan-ng: avoid CamelCase: hfa384x_CommTallies16

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 2034c42..9556098 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -610,7 +610,7 @@ struct hfa384x_rx_frame {
*/

/*-- Inquiry Frame, Diagnose: Communication Tallies --*/
-struct hfa384x_CommTallies16 {
+struct hfa384x_comm_tallies_16 {
u16 txunicastframes;
u16 txmulticastframes;
u16 txfragments;
@@ -762,7 +762,7 @@ struct hfa384x_KeyIDChanged {

/*-- Collection of all Inf frames ---------------*/
union hfa384x_infodata {
- struct hfa384x_CommTallies16 commtallies16;
+ struct hfa384x_comm_tallies_16 commtallies16;
struct hfa384x_comm_tallies_32 commtallies32;
struct hfa384x_scan_result scanresult;
struct hfa384x_ChInfoResult chinforesult;
--
1.9.1

2016-10-19 15:56:57

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 4/5] staging: wlan-ng: Replace data type declaration with variable of same type in p80211netdev.c

sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix them in p80211netdev.c

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/p80211netdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 825a63a..3a95b36 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -336,8 +336,8 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
goto failed;
}

- memset(&p80211_hdr, 0, sizeof(union p80211_hdr));
- memset(&p80211_wep, 0, sizeof(struct p80211_metawep));
+ memset(&p80211_hdr, 0, sizeof(p80211_hdr));
+ memset(&p80211_wep, 0, sizeof(p80211_wep));

if (netif_queue_stopped(netdev)) {
netdev_dbg(netdev, "called when queue stopped.\n");
@@ -375,8 +375,8 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
goto failed;
}
/* move the header over */
- memcpy(&p80211_hdr, skb->data, sizeof(union p80211_hdr));
- skb_pull(skb, sizeof(union p80211_hdr));
+ memcpy(&p80211_hdr, skb->data, sizeof(p80211_hdr));
+ skb_pull(skb, sizeof(p80211_hdr));
} else {
if (skb_ether_to_p80211
(wlandev, wlandev->ethconv, skb, &p80211_hdr,
@@ -629,9 +629,9 @@ static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr)
resultcode = &dot11req.resultcode;

/* Set up a dot11req_mibset */
- memset(&dot11req, 0, sizeof(struct p80211msg_dot11req_mibset));
+ memset(&dot11req, 0, sizeof(dot11req));
dot11req.msgcode = DIDmsg_dot11req_mibset;
- dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
+ dot11req.msglen = sizeof(dot11req);
memcpy(dot11req.devname,
((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);

--
1.9.1

2016-10-19 15:57:27

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 03/12] staging: wlan-ng: avoid CamelCase: hfa384x_WPAData

Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 2 +-
drivers/staging/wlan-ng/prism2mib.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 89380ac..a3a0ed5 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -428,7 +428,7 @@ struct hfa384x_authenticate_station_data {
} __packed;

/*-- Configuration Record: WPAData (data portion only) --*/
-struct hfa384x_WPAData {
+struct hfa384x_wpa_data {
u16 datalen;
u8 data[0]; /* max 80 */
} __packed;
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c
index d7792cd..8ea6a64 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -709,7 +709,7 @@ static int prism2mib_priv(struct mibrec *mib,

switch (mib->did) {
case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{
- struct hfa384x_WPAData wpa;
+ struct hfa384x_wpa_data wpa;

if (isget) {
hfa384x_drvr_getconfig(hw,
--
1.9.1

2016-10-19 15:58:00

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 2/5] staging: wlan-ng: Replace data type declaration with variable of same type in hfa384x_usb.c

sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix it in hfa384x_usb.c file.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index fbd9dc6..a83026e 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -531,7 +531,7 @@ static void hfa384x_usb_defer(struct work_struct *data)
*/
void hfa384x_create(struct hfa384x *hw, struct usb_device *usb)
{
- memset(hw, 0, sizeof(struct hfa384x));
+ memset(hw, 0, sizeof(*hw));
hw->usb = usb;

/* set up the endpoints */
--
1.9.1

2016-10-19 15:58:16

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 1/5] staging: wlan-ng: Replace data type declaration with variable of same type in cfg80211.c

sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix it in cfg80211.c file.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 182b2d5..67c48a8 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -323,7 +323,7 @@ static int prism2_scan(struct wiphy *wiphy,

priv->scan_request = request;

- memset(&msg1, 0x00, sizeof(struct p80211msg_dot11req_scan));
+ memset(&msg1, 0x00, sizeof(msg1));
msg1.msgcode = DIDmsg_dot11req_scan;
msg1.bsstype.data = P80211ENUM_bsstype_any;

--
1.9.1

2016-10-19 15:58:34

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 01/12] staging: wlan-ng: avoid CamelCase: HFA384x_RID_CNFAPBCNint

Replace CamelCase define to comply with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/staging/wlan-ng/hfa384x.h | 2 +-
drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 6337b1d..1c7a171 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -286,7 +286,7 @@
#define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
#define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
#define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
-#define HFA384x_RID_CNFAPBCNint ((u16)0xFC33)
+#define HFA384x_RID_CNFAPBCNINT ((u16)0xFC33)
#define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46)
#define HFA384x_RID_CNFWPADATA ((u16)0xFC48)
#define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 90db53d..8be3a74 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -583,7 +583,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp)

/* beacon period */
word = msg->beaconperiod.data;
- result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNint, word);
+ result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNINT, word);
if (result) {
netdev_err(wlandev->netdev,
"Failed to set beacon period=%d.\n", word);
--
1.9.1