]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wifi: wilc1000: use existing iftype variable to store the interface type
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 20 Jul 2022 16:03:06 +0000 (16:03 +0000)
committerKalle Valo <kvalo@kernel.org>
Wed, 27 Jul 2022 12:58:11 +0000 (15:58 +0300)
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 <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220720160302.231516-8-ajay.kathat@microchip.com
drivers/net/wireless/microchip/wilc1000/netdev.c
drivers/net/wireless/microchip/wilc1000/netdev.h

index 2de5838a4426aeca140ef2db5b2b30914f438ab4..9b319a455b96d524dc299bde072ea960a267ce94 100644 (file)
@@ -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)
index 822e65d00f5386f4a2607e46a1cf6ed6e7859876..43c085c74b7a5f5e5aee209074e5611b23bc2866 100644 (file)
@@ -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;