From 4c2742146de06a39d24e91155e3deec278e11932 Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Wed, 20 Jul 2022 16:03:06 +0000 Subject: [PATCH] wifi: wilc1000: use existing iftype variable to store the interface type For consistency, use an existing 'iftype' element which was already having the interface type. Replace 'mode' with 'iftype' as it was used for the same purpose. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220720160302.231516-8-ajay.kathat@microchip.com --- drivers/net/wireless/microchip/wilc1000/netdev.c | 6 +++--- drivers/net/wireless/microchip/wilc1000/netdev.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c index 2de5838..9b319a4 100644 --- a/drivers/net/wireless/microchip/wilc1000/netdev.c +++ b/drivers/net/wireless/microchip/wilc1000/netdev.c @@ -97,12 +97,12 @@ static struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header) struct ieee80211_hdr *h = (struct ieee80211_hdr *)mac_header; list_for_each_entry_rcu(vif, &wilc->vif_list, list) { - if (vif->mode == WILC_STATION_MODE) + if (vif->iftype == WILC_STATION_MODE) if (ether_addr_equal_unaligned(h->addr2, vif->bssid)) { ndev = vif->ndev; goto out; } - if (vif->mode == WILC_AP_MODE) + if (vif->iftype == WILC_AP_MODE) if (ether_addr_equal_unaligned(h->addr1, vif->bssid)) { ndev = vif->ndev; goto out; @@ -122,7 +122,7 @@ void wilc_wlan_set_bssid(struct net_device *wilc_netdev, const u8 *bssid, else eth_zero_addr(vif->bssid); - vif->mode = mode; + vif->iftype = mode; } int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc) diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h index 822e65d..43c085c 100644 --- a/drivers/net/wireless/microchip/wilc1000/netdev.h +++ b/drivers/net/wireless/microchip/wilc1000/netdev.h @@ -177,7 +177,6 @@ struct wilc_vif { u8 bssid[ETH_ALEN]; struct host_if_drv *hif_drv; struct net_device *ndev; - u8 mode; struct timer_list during_ip_timer; struct timer_list periodic_rssi; struct rf_info periodic_stat; -- 2.7.4