diff options
Diffstat (limited to 'drivers/staging/wfx/data_rx.c')
-rw-r--r-- | drivers/staging/wfx/data_rx.c | 85 |
1 files changed, 6 insertions, 79 deletions
diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index e7fcce8d0cc4..5d198457c6ce 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -13,42 +13,9 @@ #include "bh.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, struct hif_ind_rx *arg, struct sk_buff *skb) +static int wfx_drop_encrypt_data(struct wfx_dev *wdev, + const struct hif_ind_rx *arg, + struct sk_buff *skb) { struct ieee80211_hdr *frame = (struct ieee80211_hdr *) skb->data; size_t hdrlen = ieee80211_hdrlen(frame->frame_control); @@ -98,15 +65,12 @@ static int wfx_drop_encrypt_data(struct wfx_dev *wdev, struct hif_ind_rx *arg, s } -void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, - struct sk_buff *skb) +void wfx_rx_cb(struct wfx_vif *wvif, + const struct hif_ind_rx *arg, struct sk_buff *skb) { - int link_id = arg->rx_flags.peer_sta_id; struct ieee80211_rx_status *hdr = IEEE80211_SKB_RXCB(skb); 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)); @@ -116,14 +80,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, ieee80211_is_beacon(frame->frame_control))) goto drop; - 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) hdr->flag |= RX_FLAG_MMIC_ERROR; else if (arg->status) @@ -134,10 +90,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, goto drop; } - if (ieee80211_is_pspoll(frame->frame_control)) - if (wfx_handle_pspoll(wvif, skb)) - goto drop; - hdr->band = NL80211_BAND_2GHZ; hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, hdr->band); @@ -171,20 +123,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, !arg->status && wvif->vif && ether_addr_equal(ieee80211_get_SA(frame), wvif->vif->bss_conf.bssid)) { - const u8 *tim_ie; - u8 *ies = mgmt->u.beacon.variable; - size_t ies_len = skb->len - (ies - skb->data); - - tim_ie = cfg80211_find_ie(WLAN_EID_TIM, ies, ies_len); - if (tim_ie) { - struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *)&tim_ie[2]; - - if (wvif->dtim_period != tim->dtim_period) { - wvif->dtim_period = tim->dtim_period; - schedule_work(&wvif->set_beacon_wakeup_period_work); - } - } - /* Disable beacon filter once we're associated... */ if (wvif->disable_beacon_filter && (wvif->vif->bss_conf.assoc || @@ -193,18 +131,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, 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; |