Skip to contentSkip to conversation

staging: wilc1000: remove redundant reset of station statistics

PATCH Superseded [email protected] 2 participants 3 messages Jan 28, 2019 – Jan 29, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: remove redundant reset of station statistics

From: Adham Abozaeid <[email protected]>

Driver sends configuration wids to reset connection statistics in the device, but the device already resets it when starting a new connection

---
 drivers/staging/wilc1000/host_interface.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -19
index fbb61de20304..286685e426c1 100644
@@ -342,29 +342,11 @@ static int wilc_send_connect_wid(struct wilc_vif *vif)
 {
 	int result = 0;
 	struct wid wid_list[8];
-	u32 wid_cnt = 0, dummyval = 0;
+	u32 wid_cnt = 0;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 	struct wilc_conn_info *conn_attr = &hif_drv->conn_info;
 	struct wilc_join_bss_param *bss_param = conn_attr->param;
 
-	wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT;
-	wid_list[wid_cnt].type = WID_INT;
-	wid_list[wid_cnt].size = sizeof(u32);
-	wid_list[wid_cnt].val = (s8 *)(&(dummyval));
-	wid_cnt++;
-
-	wid_list[wid_cnt].id = WID_RECEIVED_FRAGMENT_COUNT;
-	wid_list[wid_cnt].type = WID_INT;
-	wid_list[wid_cnt].size = sizeof(u32);
-	wid_list[wid_cnt].val = (s8 *)(&(dummyval));
-	wid_cnt++;
-
-	wid_list[wid_cnt].id = WID_FAILED_COUNT;
-	wid_list[wid_cnt].type = WID_INT;
-	wid_list[wid_cnt].size = sizeof(u32);
-	wid_list[wid_cnt].val = (s8 *)(&(dummyval));
-	wid_cnt++;
-
 	wid_list[wid_cnt].id = WID_INFO_ELEMENT_ASSOCIATE;
 	wid_list[wid_cnt].type = WID_BIN_DATA;
 	wid_list[wid_cnt].val = conn_attr->req_ies;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 15 lines · On Mon, Jan 28, 2019 at 10:38:20PM +0000, [email protected] wrote:

From: Adham Abozaeid <[email protected]>

Driver sends configuration wids to reset connection statistics in the device, but the device already resets it when starting a new connection

---
 drivers/staging/wilc1000/host_interface.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -0
index fbb61de20304..286685e426c1 100644

drivers/staging/wilc1000/host_interface.c static int wilc_send_connect_wid(struct wilc_vif *vif) · line 344

Quoted 3 lines
drivers/staging/wilc1000/host_interface.c +0 -0
@@ -342,29 +342,11 @@ static int wilc_send_connect_wid(struct wilc_vif *vif)
 {
 	int result = 0;
 	struct wid wid_list[8];
                   ^^^^^^^^^^^

We could make this array smaller as well.

drivers/staging/wilc1000/host_interface.c static int wilc_send_connect_wid(struct wilc_vif *vif) · line 345

Quoted 2 lines
drivers/staging/wilc1000/host_interface.c +1 -1
-	u32 wid_cnt = 0, dummyval = 0;
+	u32 wid_cnt = 0;

regards,
dan carpenter

#2 lore raw
Quoted 20 lines · Dan Carpenter
Quoted 15 lines · On Mon, Jan 28, 2019 at 10:38:20PM +0000, [email protected] wrote:

From: Adham Abozaeid <[email protected]>

Driver sends configuration wids to reset connection statistics in the device, but the device already resets it when starting a new connection

---
 drivers/staging/wilc1000/host_interface.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -0
index fbb61de20304..286685e426c1 100644

drivers/staging/wilc1000/host_interface.c static int wilc_send_connect_wid(struct wilc_vif *vif) · line 344

Quoted 3 lines
drivers/staging/wilc1000/host_interface.c +0 -0
@@ -342,29 +342,11 @@ static int wilc_send_connect_wid(struct wilc_vif *vif)
 {
 	int result = 0;
 	struct wid wid_list[8];
                   ^^^^^^^^^^^
Quoted 1 line

We could make this array smaller as well.

Agree. Will send v2 with smaller array.

Quoted 5 lines

drivers/staging/wilc1000/host_interface.c static int wilc_send_connect_wid(struct wilc_vif *vif) · line 345

Quoted 3 lines
drivers/staging/wilc1000/host_interface.c +1 -1
-	u32 wid_cnt = 0, dummyval = 0;
+	u32 wid_cnt = 0;

regards,
dan carpenter

Thanks,

Adham