1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/silabs/wfx/data_tx.h
Jérôme Pouiller f7385a2024 wifi: wfx: allow to send frames during ROC
Until now, all the traffic was blocked during scan operation. However,
scan operation is going to be used to implement Remain On Channel (ROC).
In this case, special frames (marked with IEEE80211_TX_CTL_TX_OFFCHAN)
must be sent during the operation.

These frames need to be sent on the virtual interface #2. Until now,
this interface was only used by the device for internal purpose. But
since API 3.9, it can be used to send data during scan operation (we
hijack the scan process to implement ROC).

Thus, we need to change a bit the way we match the frames with the
interface.

Fortunately, the frames received during the scan are marked with the
correct interface number. So there is no change to do on this part.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231004172843.195332-8-jerome.pouiller@silabs.com
2023-10-09 09:53:07 +03:00

53 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Data transmitting implementation.
*
* Copyright (c) 2017-2020, Silicon Laboratories, Inc.
* Copyright (c) 2010, ST-Ericsson
*/
#ifndef WFX_DATA_TX_H
#define WFX_DATA_TX_H
#include <linux/list.h>
#include <net/mac80211.h>
#include "hif_api_cmd.h"
#include "hif_api_mib.h"
struct wfx_tx_priv;
struct wfx_dev;
struct wfx_vif;
struct wfx_tx_policy {
struct list_head link;
int usage_count;
u8 rates[12];
bool uploaded;
};
struct wfx_tx_policy_cache {
struct wfx_tx_policy cache[HIF_TX_RETRY_POLICY_MAX];
/* FIXME: use a trees and drop hash from tx_policy */
struct list_head used;
struct list_head free;
spinlock_t lock;
};
struct wfx_tx_priv {
ktime_t xmit_timestamp;
unsigned char icv_size;
unsigned char vif_id;
};
void wfx_tx_policy_init(struct wfx_vif *wvif);
void wfx_tx_policy_upload_work(struct work_struct *work);
void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb);
void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg);
void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop);
struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb);
struct wfx_hif_req_tx *wfx_skb_txreq(struct sk_buff *skb);
struct wfx_vif *wfx_skb_wvif(struct wfx_dev *wdev, struct sk_buff *skb);
#endif