Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Implementation of mac80211 API.
4 *
5 * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
7 */
8#ifndef WFX_STA_H
9#define WFX_STA_H
10
11#include <net/mac80211.h>
12
13struct wfx_dev;
14struct wfx_vif;
15
16struct wfx_sta_priv {
17 int link_id;
18 int vif_id;
19 int buffered[IEEE80211_NUM_TIDS];
20 // Ensure atomicity of "buffered" and calls to ieee80211_sta_set_buffered()
21 spinlock_t lock;
22};
23
24// mac80211 interface
25int wfx_start(struct ieee80211_hw *hw);
26void wfx_stop(struct ieee80211_hw *hw);
27int wfx_config(struct ieee80211_hw *hw, u32 changed);
28int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
29void wfx_set_default_unicast_key(struct ieee80211_hw *hw,
30 struct ieee80211_vif *vif, int idx);
31u64 wfx_prepare_multicast(struct ieee80211_hw *hw,
32 struct netdev_hw_addr_list *mc_list);
33void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
34 unsigned int *total_flags, u64 unused);
35
36int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
37void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
38int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
39void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
40int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
41void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
42int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
43 u16 queue, const struct ieee80211_tx_queue_params *params);
44void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
45 struct ieee80211_bss_conf *info, u32 changed);
46int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
47 struct ieee80211_sta *sta);
48int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
49 struct ieee80211_sta *sta);
50void wfx_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
51 enum sta_notify_cmd cmd, struct ieee80211_sta *sta);
52int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set);
53int wfx_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
54 struct ieee80211_ampdu_params *params);
55int wfx_add_chanctx(struct ieee80211_hw *hw,
56 struct ieee80211_chanctx_conf *conf);
57void wfx_remove_chanctx(struct ieee80211_hw *hw,
58 struct ieee80211_chanctx_conf *conf);
59void wfx_change_chanctx(struct ieee80211_hw *hw,
60 struct ieee80211_chanctx_conf *conf, u32 changed);
61int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
62 struct ieee80211_chanctx_conf *conf);
63void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw,
64 struct ieee80211_vif *vif,
65 struct ieee80211_chanctx_conf *conf);
66
67// WSM Callbacks
68void wfx_cooling_timeout_work(struct work_struct *work);
69void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd);
70void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd);
71void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi);
72
73// Other Helpers
74void wfx_reset(struct wfx_vif *wvif);
75u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates);
76
77#endif /* WFX_STA_H */