From: <Ajay.Kathat@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
<Adham.Abozaeid@microchip.com>, <johannes@sipsolutions.net>,
<Ajay.Kathat@microchip.com>
Subject: [PATCH 4/8] staging: wilc1000: remove use of driver_handler_id & ifc_id
Date: Wed, 26 Jun 2019 12:40:55 +0000 [thread overview]
Message-ID: <1561552810-8933-5-git-send-email-ajay.kathat@microchip.com> (raw)
In-Reply-To: <1561552810-8933-1-git-send-email-ajay.kathat@microchip.com>
From: Ajay Singh <ajay.kathat@microchip.com>
Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to
identify the handler.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
drivers/staging/wilc1000/host_interface.c | 3 +--
drivers/staging/wilc1000/host_interface.h | 1 -
drivers/staging/wilc1000/wilc_netdev.c | 3 +--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 ++---
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 -
5 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index b505990..389f9f8c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1472,7 +1472,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mode,
drv.mode = (ifc_id | (mode << 1));
result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- hif_drv->driver_handler_id);
+ wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to set driver handler\n");
@@ -1644,7 +1644,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
for (i = 0; i < wilc->vif_num; i++)
if (dev == wilc->vif[i]->ndev) {
wilc->vif[i]->hif_drv = hif_drv;
- hif_drv->driver_handler_id = i + 1;
break;
}
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 4fcc7a3..be1d249 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -166,7 +166,6 @@ struct host_if_drv {
struct wilc_vif *remain_on_ch_timer_vif;
bool ifc_up;
- int driver_handler_id;
u8 assoc_resp[WILC_MAX_ASSOC_RESP_FRAME_SIZE];
};
diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c
index 9006111..ad04744 100644
--- a/drivers/staging/wilc1000/wilc_netdev.c
+++ b/drivers/staging/wilc1000/wilc_netdev.c
@@ -636,7 +636,7 @@ static int wilc_mac_open(struct net_device *ndev)
for (i = 0; i < wl->vif_num; i++) {
if (ndev == wl->vif[i]->ndev) {
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
- vif->iftype, vif->ifc_id);
+ vif->iftype, vif->idx);
wilc_set_operation_mode(vif, vif->iftype);
break;
}
@@ -995,7 +995,6 @@ struct wilc_vif *wilc_netdev_ifc_init(struct wilc *wl, const char *name,
ndev->needs_free_netdev = true;
vif->iftype = vif_type;
vif->wilc->vif[wl->vif_num] = vif;
- vif->ifc_id = wl->vif_num;
vif->idx = wl->vif_num;
wl->vif_num += 1;
vif->mac_opened = 0;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 012e325..1580909 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1462,7 +1462,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
if (wl->initialized) {
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
- 0, vif->ifc_id);
+ 0, vif->idx);
wilc_set_operation_mode(vif, WILC_AP_MODE);
wilc_set_power_mgmt(vif, 0, 0);
}
@@ -1693,11 +1693,10 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
wl->vif[i] = NULL;
} else {
vif = wl->vif[i + 1];
- vif->ifc_id = i;
vif->idx = i;
wl->vif[i] = vif;
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
- vif->iftype, vif->ifc_id);
+ vif->iftype, vif->idx);
}
}
wl->vif_num--;
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index fca3380..d5d830d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -203,7 +203,6 @@ struct wilc_vif {
struct host_if_drv *hif_drv;
struct net_device *ndev;
u8 mode;
- u8 ifc_id;
struct timer_list during_ip_timer;
bool obtaining_ip;
struct timer_list periodic_rssi;
--
2.7.4
next prev parent reply other threads:[~2019-06-26 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 12:40 [PATCH 0/8] staging: wilc1000: dynamically add/delete interfaces & cleanup fixes Ajay.Kathat
2019-06-26 12:40 ` [PATCH 1/8] staging: wilc1000: handle p2p operations in caller context Ajay.Kathat
2019-06-26 12:40 ` [PATCH 2/8] staging: wilc1000: fix error path cleanup in wilc_wlan_initialize() Ajay.Kathat
2019-06-26 12:40 ` [PATCH 3/8] staging: wilc1000: added support to dynamically add/remove interfaces Ajay.Kathat
2019-06-26 12:40 ` Ajay.Kathat [this message]
2019-06-26 12:40 ` [PATCH 5/8] staging: wilc1000: remove unnecessary loop to traverse vif interfaces Ajay.Kathat
2019-06-26 12:41 ` [PATCH 6/8] staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct Ajay.Kathat
2019-06-26 12:41 ` [PATCH 7/8] staging: wilc1000: remove extra argument passing to wilc_send_config_pkt() Ajay.Kathat
2019-06-26 12:41 ` [PATCH 8/8] staging: wilc1000: rename 'host_interface' source and header Ajay.Kathat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561552810-8933-5-git-send-email-ajay.kathat@microchip.com \
--to=ajay.kathat@microchip.com \
--cc=Adham.Abozaeid@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox