2019-09-19 14:25:45 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/*
|
2021-09-13 15:01:56 +02:00
|
|
|
* Data transmitting implementation.
|
2019-09-19 14:25:45 +00:00
|
|
|
*
|
2020-10-07 12:19:41 +02:00
|
|
|
* Copyright (c) 2017-2020, Silicon Laboratories, Inc.
|
2019-09-19 14:25:45 +00:00
|
|
|
* Copyright (c) 2010, ST-Ericsson
|
|
|
|
*/
|
|
|
|
#ifndef WFX_DATA_TX_H
|
|
|
|
#define WFX_DATA_TX_H
|
|
|
|
|
2021-03-09 15:51:56 +01:00
|
|
|
#include <linux/list.h>
|
|
|
|
#include <net/mac80211.h>
|
|
|
|
|
2019-09-19 14:25:45 +00:00
|
|
|
#include "hif_api_cmd.h"
|
|
|
|
#include "hif_api_mib.h"
|
|
|
|
|
|
|
|
struct wfx_tx_priv;
|
|
|
|
struct wfx_dev;
|
|
|
|
struct wfx_vif;
|
|
|
|
|
2022-01-13 09:55:12 +01:00
|
|
|
struct wfx_tx_policy {
|
2019-09-19 14:25:45 +00:00
|
|
|
struct list_head link;
|
2019-12-17 16:14:30 +00:00
|
|
|
int usage_count;
|
2019-11-11 13:30:53 +00:00
|
|
|
u8 rates[12];
|
2019-12-17 16:14:32 +00:00
|
|
|
bool uploaded;
|
2019-09-19 14:25:45 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 09:55:12 +01:00
|
|
|
struct wfx_tx_policy_cache {
|
|
|
|
struct wfx_tx_policy cache[HIF_TX_RETRY_POLICY_MAX];
|
2021-09-13 15:01:58 +02:00
|
|
|
/* FIXME: use a trees and drop hash from tx_policy */
|
2019-09-19 14:25:45 +00:00
|
|
|
struct list_head used;
|
|
|
|
struct list_head free;
|
|
|
|
spinlock_t lock;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wfx_tx_priv {
|
|
|
|
ktime_t xmit_timestamp;
|
2021-02-08 14:52:54 +01:00
|
|
|
unsigned char icv_size;
|
2023-10-04 19:28:42 +02:00
|
|
|
unsigned char vif_id;
|
2020-08-25 10:58:22 +02:00
|
|
|
};
|
2019-09-19 14:25:45 +00:00
|
|
|
|
2019-10-08 09:43:01 +00:00
|
|
|
void wfx_tx_policy_init(struct wfx_vif *wvif);
|
2019-12-17 16:14:27 +00:00
|
|
|
void wfx_tx_policy_upload_work(struct work_struct *work);
|
2019-09-19 14:25:45 +00:00
|
|
|
|
2022-01-13 09:55:13 +01:00
|
|
|
void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb);
|
2022-01-13 09:55:11 +01:00
|
|
|
void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg);
|
2022-01-13 09:55:13 +01:00
|
|
|
void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop);
|
2019-09-19 14:25:45 +00:00
|
|
|
|
2023-10-04 19:28:38 +02:00
|
|
|
struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb);
|
|
|
|
struct wfx_hif_req_tx *wfx_skb_txreq(struct sk_buff *skb);
|
2023-10-04 19:28:42 +02:00
|
|
|
struct wfx_vif *wfx_skb_wvif(struct wfx_dev *wdev, struct sk_buff *skb);
|
2019-09-19 14:25:45 +00:00
|
|
|
|
2021-09-13 15:02:00 +02:00
|
|
|
#endif
|