diff options
author | David Gnedt <david.gnedt@davizone.at> | 2014-01-07 07:11:27 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-09 10:56:37 -0500 |
commit | b90a1165a72fabdc260abaa9eeadcbfd29e267eb (patch) | |
tree | 1923b8dd3291449b8df96b9ef2ca20ffd4523486 | |
parent | 3d49da748bc957ec65aa80ab7322ca463d280466 (diff) |
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: David Gnedt <david.gnedt@davizone.at>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ti/wl1251/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 5a265a24f1fe..4101693920a5 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -687,6 +687,16 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
687 | wl->power_level = conf->power_level; | 687 | wl->power_level = conf->power_level; |
688 | } | 688 | } |
689 | 689 | ||
690 | /* | ||
691 | * Tell stack that connection is lost because hw encryption isn't | ||
692 | * supported in monitor mode. | ||
693 | * This requires temporary enabling of the hw connection monitor flag | ||
694 | */ | ||
695 | if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) { | ||
696 | wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR; | ||
697 | ieee80211_connection_loss(wl->vif); | ||
698 | } | ||
699 | |||
690 | out_sleep: | 700 | out_sleep: |
691 | wl1251_ps_elp_sleep(wl); | 701 | wl1251_ps_elp_sleep(wl); |
692 | 702 | ||
@@ -1119,6 +1129,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1119 | } | 1129 | } |
1120 | 1130 | ||
1121 | if (changed & BSS_CHANGED_ASSOC) { | 1131 | if (changed & BSS_CHANGED_ASSOC) { |
1132 | /* Disable temporary enabled hw connection monitor flag */ | ||
1133 | wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR; | ||
1134 | |||
1122 | if (bss_conf->assoc) { | 1135 | if (bss_conf->assoc) { |
1123 | wl->beacon_int = bss_conf->beacon_int; | 1136 | wl->beacon_int = bss_conf->beacon_int; |
1124 | 1137 | ||