wil6210: support AP isolation
For the AP, configuration may say not to bridge traffic between wireless clients. This is conveyed from user space (ex: hostapd has ap_isolate parameter) with NL80211_CMD_SET_BSS, to the driver's cfg80211 ops method change_bss Add support for this setting. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
c42da9993a
commit
02beaf1a5b
|
@ -917,6 +917,21 @@ static int wil_cfg80211_probe_client(struct wiphy *wiphy,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int wil_cfg80211_change_bss(struct wiphy *wiphy,
|
||||||
|
struct net_device *dev,
|
||||||
|
struct bss_parameters *params)
|
||||||
|
{
|
||||||
|
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||||
|
|
||||||
|
if (params->ap_isolate >= 0) {
|
||||||
|
wil_dbg_misc(wil, "%s(ap_isolate %d => %d)\n", __func__,
|
||||||
|
wil->ap_isolate, params->ap_isolate);
|
||||||
|
wil->ap_isolate = params->ap_isolate;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct cfg80211_ops wil_cfg80211_ops = {
|
static struct cfg80211_ops wil_cfg80211_ops = {
|
||||||
.scan = wil_cfg80211_scan,
|
.scan = wil_cfg80211_scan,
|
||||||
.connect = wil_cfg80211_connect,
|
.connect = wil_cfg80211_connect,
|
||||||
|
@ -937,6 +952,7 @@ static struct cfg80211_ops wil_cfg80211_ops = {
|
||||||
.stop_ap = wil_cfg80211_stop_ap,
|
.stop_ap = wil_cfg80211_stop_ap,
|
||||||
.del_station = wil_cfg80211_del_station,
|
.del_station = wil_cfg80211_del_station,
|
||||||
.probe_client = wil_cfg80211_probe_client,
|
.probe_client = wil_cfg80211_probe_client,
|
||||||
|
.change_bss = wil_cfg80211_change_bss,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void wil_wiphy_init(struct wiphy *wiphy)
|
static void wil_wiphy_init(struct wiphy *wiphy)
|
||||||
|
|
|
@ -1405,6 +1405,7 @@ static const struct dbg_off dbg_wil_off[] = {
|
||||||
WIL_FIELD(fw_version, S_IRUGO, doff_u32),
|
WIL_FIELD(fw_version, S_IRUGO, doff_u32),
|
||||||
WIL_FIELD(hw_version, S_IRUGO, doff_x32),
|
WIL_FIELD(hw_version, S_IRUGO, doff_x32),
|
||||||
WIL_FIELD(recovery_count, S_IRUGO, doff_u32),
|
WIL_FIELD(recovery_count, S_IRUGO, doff_u32),
|
||||||
|
WIL_FIELD(ap_isolate, S_IRUGO, doff_u32),
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -714,6 +714,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
|
||||||
|
|
||||||
/* init after reset */
|
/* init after reset */
|
||||||
wil->pending_connect_cid = -1;
|
wil->pending_connect_cid = -1;
|
||||||
|
wil->ap_isolate = 0;
|
||||||
reinit_completion(&wil->wmi_ready);
|
reinit_completion(&wil->wmi_ready);
|
||||||
reinit_completion(&wil->wmi_call);
|
reinit_completion(&wil->wmi_call);
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,7 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
|
||||||
|
|
||||||
skb_orphan(skb);
|
skb_orphan(skb);
|
||||||
|
|
||||||
if (wdev->iftype == NL80211_IFTYPE_AP) {
|
if (wdev->iftype == NL80211_IFTYPE_AP && !wil->ap_isolate) {
|
||||||
if (mcast) {
|
if (mcast) {
|
||||||
/* send multicast frames both to higher layers in
|
/* send multicast frames both to higher layers in
|
||||||
* local net stack and back to the wireless medium
|
* local net stack and back to the wireless medium
|
||||||
|
|
|
@ -542,6 +542,7 @@ struct wil6210_priv {
|
||||||
u32 monitor_flags;
|
u32 monitor_flags;
|
||||||
u32 privacy; /* secure connection? */
|
u32 privacy; /* secure connection? */
|
||||||
int sinfo_gen;
|
int sinfo_gen;
|
||||||
|
u32 ap_isolate; /* no intra-BSS communication */
|
||||||
/* interrupt moderation */
|
/* interrupt moderation */
|
||||||
u32 tx_max_burst_duration;
|
u32 tx_max_burst_duration;
|
||||||
u32 tx_interframe_timeout;
|
u32 tx_interframe_timeout;
|
||||||
|
|
Loading…
Reference in New Issue