1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Data transmitting implementation.
5 * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
11 #include <linux/list.h>
12 #include <net/mac80211.h>
14 #include "hif_api_cmd.h"
15 #include "hif_api_mib.h"
22 struct list_head link;
28 struct tx_policy_cache {
29 struct tx_policy cache[HIF_TX_RETRY_POLICY_MAX];
30 /* FIXME: use a trees and drop hash from tx_policy */
31 struct list_head used;
32 struct list_head free;
37 ktime_t xmit_timestamp;
38 unsigned char icv_size;
41 void wfx_tx_policy_init(struct wfx_vif *wvif);
42 void wfx_tx_policy_upload_work(struct work_struct *work);
44 void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
46 void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg);
47 void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
48 u32 queues, bool drop);
50 static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb)
52 struct ieee80211_tx_info *tx_info;
56 tx_info = IEEE80211_SKB_CB(skb);
57 return (struct wfx_tx_priv *)tx_info->rate_driver_data;
60 static inline struct hif_req_tx *wfx_skb_txreq(struct sk_buff *skb)
62 struct hif_msg *hif = (struct hif_msg *)skb->data;
63 struct hif_req_tx *req = (struct hif_req_tx *)hif->body;