提交 b90a1165 编写于 作者: D David Gnedt 提交者: John W. Linville

wl1251: enforce changed hw encryption support on monitor state change

The firmware doesn't support per packet encryption selection, so disable hw
encryption support completely while a monitor interface is present to support
injection of packets (which shouldn't get encrypted by hw).
To enforce the changed hw encryption support force a disassociation on
non-monitor interfaces.
For disassociation a workaround using hw connection monitor is employed,
which temporary enables hw connection manager flag.
Signed-off-by: NDavid Gnedt <david.gnedt@davizone.at>
Signed-off-by: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 3d49da74
......@@ -687,6 +687,16 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
wl->power_level = conf->power_level;
}
/*
* Tell stack that connection is lost because hw encryption isn't
* supported in monitor mode.
* This requires temporary enabling of the hw connection monitor flag
*/
if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) {
wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR;
ieee80211_connection_loss(wl->vif);
}
out_sleep:
wl1251_ps_elp_sleep(wl);
......@@ -1119,6 +1129,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
}
if (changed & BSS_CHANGED_ASSOC) {
/* Disable temporary enabled hw connection monitor flag */
wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR;
if (bss_conf->assoc) {
wl->beacon_int = bss_conf->beacon_int;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册