]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wfx: remove handling of "early_data"
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 15 Jan 2020 13:55:08 +0000 (13:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 19:59:51 +0000 (20:59 +0100)
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>
drivers/staging/wfx/data_rx.c
drivers/staging/wfx/data_tx.c
drivers/staging/wfx/data_tx.h
drivers/staging/wfx/sta.c

index 0ab71c911f8438dc411c1365f68738810d48eba0..e26bc665b2b38839b667335e71ccc87d843d8794 100644 (file)
@@ -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));
 
@@ -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)
@@ -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;
 
index 704ebfe1cd059a8d1176a9f731c60fcff8710dcd..e669fc4485e6791db4e123d3a1379f8e5e88eed3 100644 (file)
@@ -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))
@@ -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)
index 078d0cfc521a6be0b357523be14ac8862405d9dc..54738c2e3eac6f30a9fee33b41904539719188f3 100644 (file)
@@ -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 {
index 6a43decd5ae638bbedc59c9619af986e1fe0c0c7..4a44d72f0db1722115bfcf05da4da153777c97bd 100644 (file)
@@ -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;
@@ -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;
 }