提交 cf42039f 编写于 作者: A Arik Nemtsov 提交者: Luciano Coelho

wl12xx: set the AP-started flag only after setting keys

This fix eliminates a potential race between starting the AP role
and setting encryption keys.
Signed-off-by: NArik Nemtsov <arik@wizery.com>
Signed-off-by: NEliad Peller <eliad@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 9b17f1b3
......@@ -3140,12 +3140,12 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
if (ret < 0)
goto out;
set_bit(WL1271_FLAG_AP_STARTED, &wl->flags);
wl1271_debug(DEBUG_AP, "started AP");
ret = wl1271_ap_init_hwenc(wl);
if (ret < 0)
goto out;
set_bit(WL1271_FLAG_AP_STARTED, &wl->flags);
wl1271_debug(DEBUG_AP, "started AP");
}
} else {
if (test_bit(WL1271_FLAG_AP_STARTED, &wl->flags)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册