Search Linux Wireless

Re: [PATCH] ath10k: add dynamic vlan support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 23.05.2018 um 12:39 schrieb Johannes Berg:
On Wed, 2018-05-23 at 16:09 +0530, Manikanta Pubbisetty wrote:
+ * @IEEE80211_HW_SUPPORTS_SW_ENCRYPT: Device is capable of transmitting
+ *     frames encrypted in software, only valid when SW_CRYPTO_CONTROL
+ *     is enabled. Based on this flag, mac80211 can allow/disallow VLAN
+ *     operations in the BSS.
Based on the name and initial description, this sounds equivalent to
just turning off SW_CRYPTO_CONTROL. I think that's not the intent, but
would need some renaming.
I can rename it to something which is very specific to VLAN support on
sw crypto controlled devices if that is okay.
I don't think that makes sense. If we split the capability of AP_VLAN
and AP_VLAN_FOR_4ADDR at the "root", then we don't need to play with all
these things. Yes, this is slightly awkward for userspace, and perhaps
with the interface combination checks, but I'd like you to look at that.

Makes sense, I had this thought to split the VLAN and 4-addr
functionality, but since we need to fiddle with userspace, I refrained.
Anyways, I will check all the possibilities of splitting these
functionalities.
I'm not sure we really have to - it's likely that wpa_s/hostapd don't
check the capabilities?
mmh not sure. it might not check the capabilitiy, but it sets the interface type to IFTYPE_AP_VLAN
for wds sta interfaces. that might collide

see the following snippet taken from hostapd code

static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
                            const char *bridge_ifname, char *ifname_wds)
{
        struct i802_bss *bss = priv;
        struct wpa_driver_nl80211_data *drv = bss->drv;
        char name[IFNAMSIZ + 1];

        os_snprintf(name, sizeof(name), "%s.sta%d", bss->ifname, aid);
        if (ifname_wds)
                os_strlcpy(ifname_wds, name, IFNAMSIZ + 1);

        wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR
                   " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name);
        if (val) {
                if (!if_nametoindex(name)) {
                        if (nl80211_create_iface(drv, name,
NL80211_IFTYPE_AP_VLAN,
                                                 bss->addr, 1, NULL, NULL, 0) <
                            0)
                                return -1;
                        if (bridge_ifname &&
linux_br_add_if(drv->global->ioctl_sock,
                                            bridge_ifname, name) < 0)
                                return -1;
                }
                if (linux_set_iface_flags(drv->global->ioctl_sock, name, 1)) {                         wpa_printf(MSG_ERROR, "nl80211: Failed to set WDS STA "
                                   "interface %s up", name);
                }
                return i802_set_sta_vlan(priv, addr, name, 0);
        } else {
                if (bridge_ifname)
linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
                                        name);

                i802_set_sta_vlan(priv, addr, bss->ifname, 0);
                nl80211_remove_iface(drv, if_nametoindex(name));
                return 0;
        }
}



johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux