summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/data_rx.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-01-15 16:55:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-16 22:59:52 +0300
commitd6aeba575f277104a95125584981d37c8f7cf762 (patch)
tree3a52e9a8cbc9725330ae4033d6b55c3100ac6ac5 /drivers/staging/wfx/data_rx.c
parent36cbb5d2a7db063879fc92e8496db9c0b7f84d7d (diff)
downloadlinux-d6aeba575f277104a95125584981d37c8f7cf762.tar.xz
staging: wfx: simplify the link-id allocation
The "link-id" is a slot number provided to the chip. A link-id is allocated to every station associated with the chip (mainly when the chip is in AP mode). It is more or less the same thing than the association ID, but it is limited to 14 values. Firmware uses the link-id to track the power save status of the stations. The current code try to associate a link-id as soon as data are exchanged with station. It is far easier to rely on sta_add() and sta_remove(). Until now the value WFX_LINK_ID_NO_ASSOC, was only used when no more link-id was available. Now, we also use this value for not-yet-associated stations (that was its primary behavior). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200115135338.14374-51-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/data_rx.c')
-rw-r--r--drivers/staging/wfx/data_rx.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c
index e26bc665b2b3..699e2d60fa89 100644
--- a/drivers/staging/wfx/data_rx.c
+++ b/drivers/staging/wfx/data_rx.c
@@ -103,11 +103,9 @@ static int wfx_drop_encrypt_data(struct wfx_dev *wdev,
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;
memset(hdr, 0, sizeof(*hdr));
@@ -117,11 +115,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,
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 (arg->status == HIF_STATUS_MICFAILURE)
hdr->flag |= RX_FLAG_MMIC_ERROR;
else if (arg->status)