On Fri, 2019-05-31 at 06:54 +0000, Brendan Jackman wrote: > > +static int driver_nl80211_tx_control_port(void *priv, const u8 *dest, > + u16 proto, const u8 *buf, size_t len) > +{ > + struct i802_bss *bss = priv; > + struct nl_msg *msg = NULL; > + int ifindex = if_nametoindex(bss->ifname); > + int ret = 0; > + > + wpa_printf(MSG_DEBUG, > + "nl80211: tx_control_port "MACSTR" proto=0x%04x len=%zu", > + MAC2STR(dest), proto, len); > + > + msg = nl80211_ifindex_msg(bss->drv, ifindex, 0, > + NL80211_CMD_CONTROL_PORT_FRAME); > + if (!msg) > + return -ENOBUFS; > + > + if (nla_put_u16(msg, NL80211_ATTR_CONTROL_PORT_ETHERTYPE, proto)) > + goto fail; > + if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, dest)) > + goto fail; > + if (nla_put(msg, NL80211_ATTR_FRAME, len, buf)) > + goto fail; One of the reasons to have this path was to enable/disable encryption on this particular frame, IIRC. Shouldn't NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT get set here at least in some cases? > +static int supp_tx_control_port(void *ctx, const u8 *dest, u16 proto, > + const u8 *buf, size_t len) > +{ > + struct ibss_rsn_peer *peer = ctx; > + struct wpa_supplicant *wpa_s = peer->ibss_rsn->wpa_s; > + > + wpa_printf(MSG_DEBUG, "SUPP: %s(dest=" MACSTR " proto=0x%04x " > + "len=%lu)", > + __func__, MAC2STR(dest), proto, (unsigned long) len); > + > + if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_TX_CONTROL_PORT) > + return wpa_drv_tx_contol_port(wpa_s, dest, proto, buf, len); Typo - "control". Must be in at least two other places too, otherwise it wouldn't compile :-) Otherwise LGTM! johannes _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap