Skip to content

Commit

Permalink
staging: wfx: remove handling of "early_data"
Browse files Browse the repository at this point in the history
It seems that purpose of "early_data" was to prevent sending data to
mac80211 before station was completely associated. It is a useless
precaution.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-46-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jérôme Pouiller authored and Greg Kroah-Hartman committed Jan 16, 2020
1 parent def39be commit 79d5fec
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
17 changes: 1 addition & 16 deletions drivers/staging/wfx/data_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,
struct ieee80211_hdr *frame = (struct ieee80211_hdr *)skb->data;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
struct wfx_link_entry *entry = NULL;
bool early_data = false;

memset(hdr, 0, sizeof(*hdr));

Expand All @@ -121,9 +120,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,
if (link_id && link_id <= WFX_MAX_STA_IN_AP_MODE) {
entry = &wvif->link_id_db[link_id - 1];
entry->timestamp = jiffies;
if (entry->status == WFX_LINK_SOFT &&
ieee80211_is_data(frame->frame_control))
early_data = true;
}

if (arg->status == HIF_STATUS_MICFAILURE)
Expand Down Expand Up @@ -181,18 +177,7 @@ void wfx_rx_cb(struct wfx_vif *wvif,
schedule_work(&wvif->update_filtering_work);
}
}

if (early_data) {
spin_lock_bh(&wvif->ps_state_lock);
/* Double-check status with lock held */
if (entry->status == WFX_LINK_SOFT)
skb_queue_tail(&entry->rx_queue, skb);
else
ieee80211_rx_irqsafe(wvif->wdev->hw, skb);
spin_unlock_bh(&wvif->ps_state_lock);
} else {
ieee80211_rx_irqsafe(wvif->wdev->hw, skb);
}
ieee80211_rx_irqsafe(wvif->wdev->hw, skb);

return;

Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/wfx/data_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ static int wfx_alloc_link_id(struct wfx_vif *wvif, const u8 *mac)
entry->status = WFX_LINK_RESERVE;
ether_addr_copy(entry->mac, mac);
memset(&entry->buffered, 0, WFX_MAX_TID);
skb_queue_head_init(&entry->rx_queue);
wfx_tx_lock(wvif->wdev);

if (!schedule_work(&wvif->link_id_work))
Expand Down Expand Up @@ -400,8 +399,6 @@ void wfx_link_id_gc_work(struct work_struct *work)
next_gc = min_t(unsigned long, next_gc, ttl);
}
}
if (need_reset)
skb_queue_purge(&wvif->link_id_db[i].rx_queue);
}
spin_unlock_bh(&wvif->ps_state_lock);
if (next_gc != -1)
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/wfx/data_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ struct wfx_link_entry {
u8 mac[ETH_ALEN];
u8 old_mac[ETH_ALEN];
u8 buffered[WFX_MAX_TID];
struct sk_buff_head rx_queue;
};

struct tx_policy {
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/wfx/sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *) &sta->drv_priv;
struct wfx_link_entry *entry;
struct sk_buff *skb;

if (wvif->vif->type != NL80211_IFTYPE_AP)
return 0;
Expand All @@ -589,8 +588,6 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK)
wvif->sta_asleep_mask |= BIT(sta_priv->link_id);
entry->status = WFX_LINK_HARD;
while ((skb = skb_dequeue(&entry->rx_queue)))
ieee80211_rx_irqsafe(wdev->hw, skb);
spin_unlock_bh(&wvif->ps_state_lock);
return 0;
}
Expand Down

0 comments on commit 79d5fec

Please sign in to comment.