Commit 2f5e568b authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove use of driver_handler_id & ifc_id

Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to
identify the handler.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9bc061e8
...@@ -1472,7 +1472,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mode, ...@@ -1472,7 +1472,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mode,
drv.mode = (ifc_id | (mode << 1)); drv.mode = (ifc_id | (mode << 1));
result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1, result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
hif_drv->driver_handler_id); wilc_get_vif_idx(vif));
if (result) if (result)
netdev_err(vif->ndev, "Failed to set driver handler\n"); 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) ...@@ -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++) for (i = 0; i < wilc->vif_num; i++)
if (dev == wilc->vif[i]->ndev) { if (dev == wilc->vif[i]->ndev) {
wilc->vif[i]->hif_drv = hif_drv; wilc->vif[i]->hif_drv = hif_drv;
hif_drv->driver_handler_id = i + 1;
break; break;
} }
......
...@@ -166,7 +166,6 @@ struct host_if_drv { ...@@ -166,7 +166,6 @@ struct host_if_drv {
struct wilc_vif *remain_on_ch_timer_vif; struct wilc_vif *remain_on_ch_timer_vif;
bool ifc_up; bool ifc_up;
int driver_handler_id;
u8 assoc_resp[WILC_MAX_ASSOC_RESP_FRAME_SIZE]; u8 assoc_resp[WILC_MAX_ASSOC_RESP_FRAME_SIZE];
}; };
......
...@@ -636,7 +636,7 @@ static int wilc_mac_open(struct net_device *ndev) ...@@ -636,7 +636,7 @@ static int wilc_mac_open(struct net_device *ndev)
for (i = 0; i < wl->vif_num; i++) { for (i = 0; i < wl->vif_num; i++) {
if (ndev == wl->vif[i]->ndev) { if (ndev == wl->vif[i]->ndev) {
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif), 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); wilc_set_operation_mode(vif, vif->iftype);
break; break;
} }
...@@ -995,7 +995,6 @@ struct wilc_vif *wilc_netdev_ifc_init(struct wilc *wl, const char *name, ...@@ -995,7 +995,6 @@ struct wilc_vif *wilc_netdev_ifc_init(struct wilc *wl, const char *name,
ndev->needs_free_netdev = true; ndev->needs_free_netdev = true;
vif->iftype = vif_type; vif->iftype = vif_type;
vif->wilc->vif[wl->vif_num] = vif; vif->wilc->vif[wl->vif_num] = vif;
vif->ifc_id = wl->vif_num;
vif->idx = wl->vif_num; vif->idx = wl->vif_num;
wl->vif_num += 1; wl->vif_num += 1;
vif->mac_opened = 0; vif->mac_opened = 0;
......
...@@ -1462,7 +1462,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -1462,7 +1462,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
if (wl->initialized) { if (wl->initialized) {
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif), 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_operation_mode(vif, WILC_AP_MODE);
wilc_set_power_mgmt(vif, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
} }
...@@ -1693,11 +1693,10 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) ...@@ -1693,11 +1693,10 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
wl->vif[i] = NULL; wl->vif[i] = NULL;
} else { } else {
vif = wl->vif[i + 1]; vif = wl->vif[i + 1];
vif->ifc_id = i;
vif->idx = i; vif->idx = i;
wl->vif[i] = vif; wl->vif[i] = vif;
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif), wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
vif->iftype, vif->ifc_id); vif->iftype, vif->idx);
} }
} }
wl->vif_num--; wl->vif_num--;
......
...@@ -203,7 +203,6 @@ struct wilc_vif { ...@@ -203,7 +203,6 @@ struct wilc_vif {
struct host_if_drv *hif_drv; struct host_if_drv *hif_drv;
struct net_device *ndev; struct net_device *ndev;
u8 mode; u8 mode;
u8 ifc_id;
struct timer_list during_ip_timer; struct timer_list during_ip_timer;
bool obtaining_ip; bool obtaining_ip;
struct timer_list periodic_rssi; struct timer_list periodic_rssi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment