wl12xx: make WL1271_FLAG_AP_STARTED flag per-vif
This flag should be set per-vif, rather than globally. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
eee514e3d6
commit
53d40d0b86
3 changed files with 9 additions and 9 deletions
|
@ -1235,7 +1235,7 @@ static void wl1271_recovery_work(struct work_struct *work)
|
|||
*/
|
||||
wl12xx_for_each_wlvif(wl, wlvif) {
|
||||
if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
|
||||
test_bit(WL1271_FLAG_AP_STARTED, &wl->flags))
|
||||
test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags))
|
||||
wlvif->tx_security_seq +=
|
||||
WL1271_TX_SQN_POST_RECOVERY_PADDING;
|
||||
}
|
||||
|
@ -1662,7 +1662,7 @@ static int wl1271_configure_suspend_ap(struct wl1271 *wl,
|
|||
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
if (!test_bit(WL1271_FLAG_AP_STARTED, &wl->flags))
|
||||
if (!test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags))
|
||||
goto out_unlock;
|
||||
|
||||
ret = wl1271_ps_elp_wakeup(wl);
|
||||
|
@ -2768,7 +2768,7 @@ static int wl1271_set_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
|||
hlid = wlvif->ap.bcast_hlid;
|
||||
}
|
||||
|
||||
if (!test_bit(WL1271_FLAG_AP_STARTED, &wl->flags)) {
|
||||
if (!test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags)) {
|
||||
/*
|
||||
* We do not support removing keys after AP shutdown.
|
||||
* Pretend we do to make mac80211 happy.
|
||||
|
@ -3426,7 +3426,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
|
|||
|
||||
if ((changed & BSS_CHANGED_BEACON_ENABLED)) {
|
||||
if (bss_conf->enable_beacon) {
|
||||
if (!test_bit(WL1271_FLAG_AP_STARTED, &wl->flags)) {
|
||||
if (!test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags)) {
|
||||
ret = wl12xx_cmd_role_start_ap(wl, wlvif);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
@ -3435,16 +3435,16 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
|
|||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
set_bit(WL1271_FLAG_AP_STARTED, &wl->flags);
|
||||
set_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags);
|
||||
wl1271_debug(DEBUG_AP, "started AP");
|
||||
}
|
||||
} else {
|
||||
if (test_bit(WL1271_FLAG_AP_STARTED, &wl->flags)) {
|
||||
if (test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags)) {
|
||||
ret = wl12xx_cmd_role_stop_ap(wl, wlvif);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
clear_bit(WL1271_FLAG_AP_STARTED, &wl->flags);
|
||||
clear_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags);
|
||||
wl1271_debug(DEBUG_AP, "stopped AP");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
|||
} else {
|
||||
struct ieee80211_hdr *hdr;
|
||||
|
||||
if (!test_bit(WL1271_FLAG_AP_STARTED, &wl->flags))
|
||||
if (!test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags))
|
||||
return wl->system_hlid;
|
||||
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
|
|
|
@ -325,7 +325,6 @@ enum wl12xx_flags {
|
|||
WL1271_FLAG_PSPOLL_FAILURE,
|
||||
WL1271_FLAG_STA_STATE_SENT,
|
||||
WL1271_FLAG_FW_TX_BUSY,
|
||||
WL1271_FLAG_AP_STARTED,
|
||||
WL1271_FLAG_IF_INITIALIZED,
|
||||
WL1271_FLAG_DUMMY_PACKET_PENDING,
|
||||
WL1271_FLAG_SUSPENDED,
|
||||
|
@ -339,6 +338,7 @@ enum wl12xx_flags {
|
|||
enum wl12xx_vif_flags {
|
||||
WLVIF_FLAG_STA_ASSOCIATED,
|
||||
WLVIF_FLAG_IBSS_JOINED,
|
||||
WLVIF_FLAG_AP_STARTED,
|
||||
};
|
||||
|
||||
struct wl1271_link {
|
||||
|
|
Loading…
Add table
Reference in a new issue