Commit 2e57865e authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: pspoll_mask make no sense

pspoll_mask is here to send data buffered in driver. But since station
is marked buffered, TIM for this station is 1 and mac80211 will call
sta_notify when a ps-poll is received. So pspoll_mask is useless and
sta_alseep_mask is sufficient.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-54-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent df3519a3
...@@ -13,41 +13,6 @@ ...@@ -13,41 +13,6 @@
#include "bh.h" #include "bh.h"
#include "sta.h" #include "sta.h"
static int wfx_handle_pspoll(struct wfx_vif *wvif, struct sk_buff *skb)
{
struct ieee80211_sta *sta;
struct ieee80211_pspoll *pspoll = (struct ieee80211_pspoll *)skb->data;
int link_id = 0;
u32 pspoll_mask = 0;
int i;
if (wvif->state != WFX_STATE_AP)
return 1;
if (!ether_addr_equal(wvif->vif->addr, pspoll->bssid))
return 1;
rcu_read_lock();
sta = ieee80211_find_sta(wvif->vif, pspoll->ta);
if (sta)
link_id = ((struct wfx_sta_priv *)&sta->drv_priv)->link_id;
rcu_read_unlock();
if (link_id)
pspoll_mask = BIT(link_id);
else
return 1;
wvif->pspoll_mask |= pspoll_mask;
/* Do not report pspols if data for given link id is queued already. */
for (i = 0; i < IEEE80211_NUM_ACS; ++i) {
if (wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[i],
pspoll_mask)) {
wfx_bh_request_tx(wvif->wdev);
return 1;
}
}
return 0;
}
static int wfx_drop_encrypt_data(struct wfx_dev *wdev, static int wfx_drop_encrypt_data(struct wfx_dev *wdev,
const struct hif_ind_rx *arg, const struct hif_ind_rx *arg,
struct sk_buff *skb) struct sk_buff *skb)
...@@ -125,10 +90,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, ...@@ -125,10 +90,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,
goto drop; goto drop;
} }
if (ieee80211_is_pspoll(frame->frame_control))
if (wfx_handle_pspoll(wvif, skb))
goto drop;
hdr->band = NL80211_BAND_2GHZ; hdr->band = NL80211_BAND_2GHZ;
hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, hdr->freq = ieee80211_channel_to_frequency(arg->channel_number,
hdr->band); hdr->band);
......
...@@ -286,10 +286,8 @@ static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr, ...@@ -286,10 +286,8 @@ static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr,
int tid = ieee80211_get_tid(hdr); int tid = ieee80211_get_tid(hdr);
spin_lock_bh(&wvif->ps_state_lock); spin_lock_bh(&wvif->ps_state_lock);
if (ieee80211_is_auth(hdr->frame_control)) { if (ieee80211_is_auth(hdr->frame_control))
wvif->sta_asleep_mask &= mask; wvif->sta_asleep_mask &= mask;
wvif->pspoll_mask &= mask;
}
if (tx_priv->link_id == WFX_LINK_ID_AFTER_DTIM && if (tx_priv->link_id == WFX_LINK_ID_AFTER_DTIM &&
!wvif->mcast_buffered) { !wvif->mcast_buffered) {
......
...@@ -493,12 +493,10 @@ static int wfx_tx_queue_mask_get(struct wfx_vif *wvif, ...@@ -493,12 +493,10 @@ static int wfx_tx_queue_mask_get(struct wfx_vif *wvif,
/* Search for unicast traffic */ /* Search for unicast traffic */
tx_allowed_mask = ~wvif->sta_asleep_mask; tx_allowed_mask = ~wvif->sta_asleep_mask;
tx_allowed_mask |= BIT(WFX_LINK_ID_UAPSD); tx_allowed_mask |= BIT(WFX_LINK_ID_UAPSD);
if (wvif->sta_asleep_mask) { if (wvif->sta_asleep_mask)
tx_allowed_mask |= wvif->pspoll_mask;
tx_allowed_mask &= ~BIT(WFX_LINK_ID_AFTER_DTIM); tx_allowed_mask &= ~BIT(WFX_LINK_ID_AFTER_DTIM);
} else { else
tx_allowed_mask |= BIT(WFX_LINK_ID_AFTER_DTIM); tx_allowed_mask |= BIT(WFX_LINK_ID_AFTER_DTIM);
}
idx = wfx_get_prio_queue(wvif, tx_allowed_mask, &total); idx = wfx_get_prio_queue(wvif, tx_allowed_mask, &total);
if (idx < 0) if (idx < 0)
return -ENOENT; return -ENOENT;
...@@ -585,8 +583,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) ...@@ -585,8 +583,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
if (hif_handle_tx_data(wvif, skb, queue)) if (hif_handle_tx_data(wvif, skb, queue))
continue; /* Handled by WSM */ continue; /* Handled by WSM */
wvif->pspoll_mask &= ~BIT(tx_priv->raw_link_id);
/* allow bursting if txop is set */ /* allow bursting if txop is set */
if (wvif->edca_params[queue_num].txop) if (wvif->edca_params[queue_num].txop)
burst = (int)wfx_tx_queue_get_num_queued(queue, tx_allowed_mask) + 1; burst = (int)wfx_tx_queue_get_num_queued(queue, tx_allowed_mask) + 1;
......
...@@ -867,7 +867,6 @@ static void wfx_ps_notify(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd, ...@@ -867,7 +867,6 @@ static void wfx_ps_notify(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd,
case STA_NOTIFY_AWAKE: case STA_NOTIFY_AWAKE:
if (prev) { if (prev) {
wvif->sta_asleep_mask &= ~bit; wvif->sta_asleep_mask &= ~bit;
wvif->pspoll_mask &= ~bit;
if (link_id && !wvif->sta_asleep_mask) if (link_id && !wvif->sta_asleep_mask)
schedule_work(&wvif->mcast_stop_work); schedule_work(&wvif->mcast_stop_work);
wfx_bh_request_tx(wvif->wdev); wfx_bh_request_tx(wvif->wdev);
...@@ -1178,7 +1177,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw, ...@@ -1178,7 +1177,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw,
wvif->mcast_tx = false; wvif->mcast_tx = false;
wvif->aid0_bit_set = false; wvif->aid0_bit_set = false;
wvif->mcast_buffered = false; wvif->mcast_buffered = false;
wvif->pspoll_mask = 0;
/* reset.link_id = 0; */ /* reset.link_id = 0; */
hif_reset(wvif, false); hif_reset(wvif, false);
break; break;
......
...@@ -91,7 +91,6 @@ struct wfx_vif { ...@@ -91,7 +91,6 @@ struct wfx_vif {
struct work_struct tx_policy_upload_work; struct work_struct tx_policy_upload_work;
u32 sta_asleep_mask; u32 sta_asleep_mask;
u32 pspoll_mask;
spinlock_t ps_state_lock; spinlock_t ps_state_lock;
struct work_struct update_tim_work; struct work_struct update_tim_work;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment