]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Make br_ifindex available in i802_bss
authorKyeyoon Park <kyeyoonp@qca.qualcomm.com>
Wed, 10 Sep 2014 05:25:16 +0000 (22:25 -0700)
committerJouni Malinen <j@w1.fi>
Mon, 27 Oct 2014 23:08:29 +0000 (01:08 +0200)
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.h

index 6dea23efbb87c4908c3ef18f974b9a3393b6dd1b..b8d886b2c0a201cf44d3a1e8d1c08fce1c47e13a 100644 (file)
@@ -6302,12 +6302,13 @@ static int i802_check_bridge(struct wpa_driver_nl80211_data *drv,
                             struct i802_bss *bss,
                             const char *brname, const char *ifname)
 {
-       int ifindex;
+       int br_ifindex;
        char in_br[IFNAMSIZ];
 
        os_strlcpy(bss->brname, brname, IFNAMSIZ);
-       ifindex = if_nametoindex(brname);
-       if (ifindex == 0) {
+       br_ifindex = if_nametoindex(brname);
+       bss->br_ifindex = br_ifindex;
+       if (br_ifindex == 0) {
                /*
                 * Bridge was configured, but the bridge device does
                 * not exist. Try to add it now.
@@ -6379,6 +6380,7 @@ static void *i802_init(struct hostapd_data *hapd,
                brname[0] = '\0';
                br_ifindex = 0;
        }
+       bss->br_ifindex = br_ifindex;
 
        for (i = 0; i < params->num_bridge; i++) {
                if (params->bridge[i]) {
index a7caf5bae093be84ab8201a92246a093eba079ce..60bf390ba82f043eb672d2149c54bd72638aa721 100644 (file)
@@ -53,6 +53,7 @@ struct i802_bss {
        struct wpa_driver_nl80211_data *drv;
        struct i802_bss *next;
        int ifindex;
+       int br_ifindex;
        u64 wdev_id;
        char ifname[IFNAMSIZ + 1];
        char brname[IFNAMSIZ];