aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/queue.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-20 18:03:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-23 13:26:04 +0200
commit7a44644c9379eb1bbb03ce8054a0b0179f470146 (patch)
tree3d497afa43e8ba56f35bf6331f2de6c3a83eafe5 /drivers/staging/wfx/queue.c
parentstaging: wfx: drop useless update of field basic_rate_set (diff)
downloadlinux-dev-7a44644c9379eb1bbb03ce8054a0b0179f470146.tar.xz
linux-dev-7a44644c9379eb1bbb03ce8054a0b0179f470146.zip
staging: wfx: introduce wfx_set_default_unicast_key()
Currently code handle WEP keys manually. It is far easier to use the set_default_unicast_key() callback provided by mac80211. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200420160311.57323-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/queue.c')
-rw-r--r--drivers/staging/wfx/queue.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index e9573e9d009f..2f6f9faf15be 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -254,36 +254,6 @@ bool wfx_tx_queues_has_cab(struct wfx_vif *wvif)
return false;
}
-static bool wfx_handle_tx_data(struct wfx_dev *wdev, struct sk_buff *skb)
-{
- struct hif_req_tx *req = wfx_skb_txreq(skb);
- struct ieee80211_key_conf *hw_key = wfx_skb_tx_priv(skb)->hw_key;
- struct ieee80211_hdr *frame =
- (struct ieee80211_hdr *)(req->frame + req->data_flags.fc_offset);
- struct wfx_vif *wvif =
- wdev_to_wvif(wdev, ((struct hif_msg *)skb->data)->interface);
-
- if (!wvif)
- return false;
-
- // FIXME: identify the exact scenario matched by this condition. Does it
- // happen yet?
- if (ieee80211_has_protected(frame->frame_control) &&
- hw_key && hw_key->keyidx != wvif->wep_default_key_id &&
- (hw_key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
- hw_key->cipher == WLAN_CIPHER_SUITE_WEP104)) {
- wfx_tx_lock(wdev);
- WARN_ON(wvif->wep_pending_skb);
- wvif->wep_default_key_id = hw_key->keyidx;
- wvif->wep_pending_skb = skb;
- if (!schedule_work(&wvif->wep_key_work))
- wfx_tx_unlock(wdev);
- return true;
- } else {
- return false;
- }
-}
-
static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev)
{
struct wfx_queue *sorted_queues[IEEE80211_NUM_ACS];
@@ -348,9 +318,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
return NULL;
skb_queue_tail(&wdev->tx_pending, skb);
wake_up(&wdev->tx_dequeue);
- // FIXME: is it useful?
- if (wfx_handle_tx_data(wdev, skb))
- continue;
tx_priv = wfx_skb_tx_priv(skb);
tx_priv->xmit_timestamp = ktime_get();
return (struct hif_msg *)skb->data;