linux/drivers/net/wireless/quantenna/qtnfmac/commands.c

// SPDX-License-Identifier: GPL-2.0+
/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */

#include <linux/types.h>
#include <linux/skbuff.h>

#include "cfg80211.h"
#include "core.h"
#include "qlink.h"
#include "qlink_util.h"
#include "bus.h"
#include "commands.h"

/* Let device itself to select best values for current conditions */
#define QTNF_SCAN_TIME_AUTO

#define QTNF_SCAN_DWELL_ACTIVE_DEFAULT
#define QTNF_SCAN_DWELL_PASSIVE_DEFAULT
#define QTNF_SCAN_SAMPLE_DURATION_DEFAULT

static int qtnf_cmd_check_reply_header(const struct qlink_resp *resp,
				       u16 cmd_id, u8 mac_id, u8 vif_id,
				       size_t resp_size)
{}

static int qtnf_cmd_resp_result_decode(enum qlink_cmd_result qcode)
{}

static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
				    struct sk_buff *cmd_skb,
				    struct sk_buff **response_skb,
				    size_t const_resp_size,
				    size_t *var_resp_size)
{}

static inline int qtnf_cmd_send(struct qtnf_bus *bus, struct sk_buff *cmd_skb)
{}

static struct sk_buff *qtnf_cmd_alloc_new_cmdskb(u8 macid, u8 vifid, u16 cmd_no,
						 size_t cmd_size)
{}

static void qtnf_cmd_tlv_ie_set_add(struct sk_buff *cmd_skb, u8 frame_type,
				    const u8 *buf, size_t len)
{}

static bool qtnf_cmd_start_ap_can_fit(const struct qtnf_vif *vif,
				      const struct cfg80211_ap_settings *s)
{}

static void qtnf_cmd_tlv_ie_ext_add(struct sk_buff *cmd_skb, u8 eid_ext,
				    const void *buf, size_t len)
{}

int qtnf_cmd_send_start_ap(struct qtnf_vif *vif,
			   const struct cfg80211_ap_settings *s)
{}

int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif)
{}

int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg)
{}

int qtnf_cmd_send_frame(struct qtnf_vif *vif, u32 cookie, u16 flags,
			u16 freq, const u8 *buf, size_t len)
{}

int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type,
				 const u8 *buf, size_t len)
{}

static void
qtnf_sta_info_parse_rate(struct rate_info *rate_dst,
			 const struct qlink_sta_info_rate *rate_src)
{}

static void
qtnf_sta_info_parse_flags(struct nl80211_sta_flag_update *dst,
			  const struct qlink_sta_info_state *src)
{}

static void
qtnf_cmd_sta_info_parse(struct station_info *sinfo, const u8 *data,
			size_t resp_size)
{}

int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,
			  struct station_info *sinfo)
{}

static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif,
					 enum nl80211_iftype iftype,
					 int use4addr,
					 u8 *mac_addr,
					 enum qlink_cmd_type cmd_type)
{}

int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype,
			   int use4addr, u8 *mac_addr)
{}

int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
				   enum nl80211_iftype iftype,
				   int use4addr,
				   u8 *mac_addr)
{}

int qtnf_cmd_send_del_intf(struct qtnf_vif *vif)
{}

static int
qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus,
			   const struct qlink_resp_get_hw_info *resp,
			   size_t info_len)
{}

static void
qtnf_parse_wowlan_info(struct qtnf_wmac *mac,
		       const struct qlink_wowlan_capab_data *wowlan)
{}

static int
qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
			     const struct qlink_resp_get_mac_info *resp,
			     size_t tlv_buf_size)
{}

static int
qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac,
			    const struct qlink_resp_get_mac_info *resp_info)
{}

static void qtnf_cmd_resp_band_fill_htcap(const u8 *info,
					  struct ieee80211_sta_ht_cap *bcap)
{}

static void qtnf_cmd_resp_band_fill_vhtcap(const u8 *info,
					   struct ieee80211_sta_vht_cap *bcap)
{}

static void qtnf_cmd_conv_iftype(struct ieee80211_sband_iftype_data
				  *iftype_data,
				  const struct qlink_sband_iftype_data
				  *qlink_data)
{}

static int qtnf_cmd_band_fill_iftype(const u8 *data,
				     struct ieee80211_supported_band *band)
{}

static int
qtnf_cmd_resp_fill_band_info(struct ieee80211_supported_band *band,
			     struct qlink_resp_band_info_get *resp,
			     size_t payload_len)
{}

int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac)
{}

int qtnf_cmd_get_hw_info(struct qtnf_bus *bus)
{}

int qtnf_cmd_band_info_get(struct qtnf_wmac *mac,
			   struct ieee80211_supported_band *band)
{}

int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed)
{}

int qtnf_cmd_send_init_fw(struct qtnf_bus *bus)
{}

void qtnf_cmd_send_deinit_fw(struct qtnf_bus *bus)
{}

int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
			  const u8 *mac_addr, struct key_params *params)
{}

int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
			  const u8 *mac_addr)
{}

int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index,
				  bool unicast, bool multicast)
{}

int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index)
{}

static u32 qtnf_encode_sta_flags(u32 flags)
{}

int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
			     struct station_parameters *params)
{}

int qtnf_cmd_send_del_sta(struct qtnf_vif *vif,
			  struct station_del_parameters *params)
{}

static void qtnf_cmd_channel_tlv_add(struct sk_buff *cmd_skb,
				     const struct ieee80211_channel *sc)
{}

static void qtnf_cmd_randmac_tlv_add(struct sk_buff *cmd_skb,
				     const u8 *mac_addr,
				     const u8 *mac_addr_mask)
{}

int qtnf_cmd_send_scan(struct qtnf_wmac *mac)
{}

int qtnf_cmd_send_connect(struct qtnf_vif *vif,
			  struct cfg80211_connect_params *sme)
{}

int qtnf_cmd_send_external_auth(struct qtnf_vif *vif,
				struct cfg80211_external_auth_params *auth)
{}

int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, u16 reason_code)
{}

int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up)
{}

int qtnf_cmd_reg_notify(struct qtnf_wmac *mac, struct regulatory_request *req,
			bool slave_radar, bool dfs_offload)
{}

static int
qtnf_cmd_resp_proc_chan_stat_info(struct survey_info *survey,
				  const u8 *payload, size_t payload_len)
{}

int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u32 chan_freq,
			    struct survey_info *survey)
{}

int qtnf_cmd_send_chan_switch(struct qtnf_vif *vif,
			      struct cfg80211_csa_settings *params)
{}

int qtnf_cmd_get_channel(struct qtnf_vif *vif, struct cfg80211_chan_def *chdef)
{}

int qtnf_cmd_start_cac(const struct qtnf_vif *vif,
		       const struct cfg80211_chan_def *chdef,
		       u32 cac_time_ms)
{}

int qtnf_cmd_set_mac_acl(const struct qtnf_vif *vif,
			 const struct cfg80211_acl_data *params)
{}

int qtnf_cmd_send_pm_set(const struct qtnf_vif *vif, u8 pm_mode, int timeout)
{}

int qtnf_cmd_get_tx_power(const struct qtnf_vif *vif, int *dbm)
{}

int qtnf_cmd_set_tx_power(const struct qtnf_vif *vif,
			  enum nl80211_tx_power_setting type, int mbm)
{}

int qtnf_cmd_send_wowlan_set(const struct qtnf_vif *vif,
			     const struct cfg80211_wowlan *wowl)
{}

int qtnf_cmd_netdev_changeupper(const struct qtnf_vif *vif, int br_domain)
{}

int qtnf_cmd_send_update_owe(struct qtnf_vif *vif,
			     struct cfg80211_update_owe_info *owe)
{}