提交 eee514e3 编写于 作者: E Eliad Peller 提交者: Luciano Coelho

wl12xx: make WL1271_FLAG_IBSS_JOINED flag per-vif

This flag should be set per-vif, rather than globally.
Signed-off-by: NEliad Peller <eliad@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 ba8447f6
...@@ -3494,11 +3494,11 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl, ...@@ -3494,11 +3494,11 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
if (changed & BSS_CHANGED_IBSS) { if (changed & BSS_CHANGED_IBSS) {
if (bss_conf->ibss_joined) { if (bss_conf->ibss_joined) {
set_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags); set_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags);
ibss_joined = true; ibss_joined = true;
} else { } else {
if (test_and_clear_bit(WL1271_FLAG_IBSS_JOINED, if (test_and_clear_bit(WLVIF_FLAG_IBSS_JOINED,
&wl->flags)) { &wlvif->flags)) {
wl1271_unjoin(wl, wlvif); wl1271_unjoin(wl, wlvif);
wl12xx_cmd_role_start_dev(wl, wlvif); wl12xx_cmd_role_start_dev(wl, wlvif);
wl12xx_roc(wl, wlvif->dev_role_id); wl12xx_roc(wl, wlvif->dev_role_id);
......
...@@ -73,7 +73,7 @@ void wl1271_scan_complete_work(struct work_struct *work) ...@@ -73,7 +73,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
is_sta = (wlvif->bss_type == BSS_TYPE_STA_BSS); is_sta = (wlvif->bss_type == BSS_TYPE_STA_BSS);
is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS); is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS);
if (((is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) || if (((is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) ||
(is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) && (is_ibss && !test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags))) &&
!test_bit(wlvif->dev_role_id, wl->roc_map)) { !test_bit(wlvif->dev_role_id, wl->roc_map)) {
/* restore remain on channel */ /* restore remain on channel */
wl12xx_cmd_role_start_dev(wl, wlvif); wl12xx_cmd_role_start_dev(wl, wlvif);
......
...@@ -193,7 +193,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, ...@@ -193,7 +193,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
wl1271_tx_update_filters(wl, wlvif, skb); wl1271_tx_update_filters(wl, wlvif, skb);
if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) || if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) && test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
!ieee80211_is_auth(hdr->frame_control) && !ieee80211_is_auth(hdr->frame_control) &&
!ieee80211_is_assoc_req(hdr->frame_control)) !ieee80211_is_assoc_req(hdr->frame_control))
return wlvif->sta.hlid; return wlvif->sta.hlid;
......
...@@ -313,7 +313,6 @@ struct wl1271_ap_key { ...@@ -313,7 +313,6 @@ struct wl1271_ap_key {
}; };
enum wl12xx_flags { enum wl12xx_flags {
WL1271_FLAG_IBSS_JOINED,
WL1271_FLAG_GPIO_POWER, WL1271_FLAG_GPIO_POWER,
WL1271_FLAG_TX_QUEUE_STOPPED, WL1271_FLAG_TX_QUEUE_STOPPED,
WL1271_FLAG_TX_PENDING, WL1271_FLAG_TX_PENDING,
...@@ -339,6 +338,7 @@ enum wl12xx_flags { ...@@ -339,6 +338,7 @@ enum wl12xx_flags {
enum wl12xx_vif_flags { enum wl12xx_vif_flags {
WLVIF_FLAG_STA_ASSOCIATED, WLVIF_FLAG_STA_ASSOCIATED,
WLVIF_FLAG_IBSS_JOINED,
}; };
struct wl1271_link { struct wl1271_link {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册