linux/drivers/net/wireless/st/cw1200/sta.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Mac80211 STA API for ST-Ericsson CW1200 drivers
 *
 * Copyright (c) 2010, ST-Ericsson
 * Author: Dmitry Tarnyagin <[email protected]>
 */

#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/etherdevice.h>

#include "cw1200.h"
#include "sta.h"
#include "fwio.h"
#include "bh.h"
#include "debug.h"

#ifndef ERP_INFO_BYTE_OFFSET
#define ERP_INFO_BYTE_OFFSET
#endif

static void cw1200_do_join(struct cw1200_common *priv);
static void cw1200_do_unjoin(struct cw1200_common *priv);

static int cw1200_upload_beacon(struct cw1200_common *priv);
static int cw1200_upload_pspoll(struct cw1200_common *priv);
static int cw1200_upload_null(struct cw1200_common *priv);
static int cw1200_upload_qosnull(struct cw1200_common *priv);
static int cw1200_start_ap(struct cw1200_common *priv);
static int cw1200_update_beaconing(struct cw1200_common *priv);
static int cw1200_enable_beaconing(struct cw1200_common *priv,
				   bool enable);
static void __cw1200_sta_notify(struct ieee80211_hw *dev,
				struct ieee80211_vif *vif,
				enum sta_notify_cmd notify_cmd,
				int link_id);
static int __cw1200_flush(struct cw1200_common *priv, bool drop);

static inline void __cw1200_free_event_queue(struct list_head *list)
{}

/* ******************************************************************** */
/* STA API								*/

int cw1200_start(struct ieee80211_hw *dev)
{}

void cw1200_stop(struct ieee80211_hw *dev, bool suspend)
{}

static int cw1200_bssloss_mitigation =;
module_param(cw1200_bssloss_mitigation, int, 0644);
MODULE_PARM_DESC();


void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv,
			     int init, int good, int bad)
{}

int cw1200_add_interface(struct ieee80211_hw *dev,
			 struct ieee80211_vif *vif)
{}

void cw1200_remove_interface(struct ieee80211_hw *dev,
			     struct ieee80211_vif *vif)
{}

int cw1200_change_interface(struct ieee80211_hw *dev,
			    struct ieee80211_vif *vif,
			    enum nl80211_iftype new_type,
			    bool p2p)
{}

int cw1200_config(struct ieee80211_hw *dev, u32 changed)
{}

void cw1200_update_filtering(struct cw1200_common *priv)
{}

void cw1200_update_filtering_work(struct work_struct *work)
{}

void cw1200_set_beacon_wakeup_period_work(struct work_struct *work)
{}

u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
			     struct netdev_hw_addr_list *mc_list)
{}

void cw1200_configure_filter(struct ieee80211_hw *dev,
			     unsigned int changed_flags,
			     unsigned int *total_flags,
			     u64 multicast)
{}

int cw1200_conf_tx(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
		   unsigned int link_id, u16 queue,
		   const struct ieee80211_tx_queue_params *params)
{}

int cw1200_get_stats(struct ieee80211_hw *dev,
		     struct ieee80211_low_level_stats *stats)
{}

int cw1200_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg)
{}

int cw1200_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
		   struct ieee80211_vif *vif, struct ieee80211_sta *sta,
		   struct ieee80211_key_conf *key)
{}

void cw1200_wep_key_work(struct work_struct *work)
{}

int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
{}

/* If successful, LOCKS the TX queue! */
static int __cw1200_flush(struct cw1200_common *priv, bool drop)
{}

void cw1200_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		  u32 queues, bool drop)
{}

/* ******************************************************************** */
/* WSM callbacks							*/

void cw1200_free_event_queue(struct cw1200_common *priv)
{}

void cw1200_event_handler(struct work_struct *work)
{}

void cw1200_bss_loss_work(struct work_struct *work)
{}

void cw1200_bss_params_work(struct work_struct *work)
{}

/* ******************************************************************** */
/* Internal API								*/

/* This function is called to Parse the SDD file
 * to extract listen_interval and PTA related information
 * sdd is a TLV: u8 id, u8 len, u8 data[]
 */
static int cw1200_parse_sdd_file(struct cw1200_common *priv)
{}

int cw1200_setup_mac(struct cw1200_common *priv)
{}

static void cw1200_join_complete(struct cw1200_common *priv)
{}

void cw1200_join_complete_work(struct work_struct *work)
{}

void cw1200_join_complete_cb(struct cw1200_common *priv,
			     struct wsm_join_complete *arg)
{}

/* MUST be called with tx_lock held!  It will be unlocked for us. */
static void cw1200_do_join(struct cw1200_common *priv)
{}

void cw1200_join_timeout(struct work_struct *work)
{}

static void cw1200_do_unjoin(struct cw1200_common *priv)
{}

void cw1200_unjoin_work(struct work_struct *work)
{}

int cw1200_enable_listening(struct cw1200_common *priv)
{}

int cw1200_disable_listening(struct cw1200_common *priv)
{}

void cw1200_update_listening(struct cw1200_common *priv, bool enabled)
{}

int cw1200_set_uapsd_param(struct cw1200_common *priv,
			   const struct wsm_edca_params *arg)
{}

/* ******************************************************************** */
/* AP API								*/

int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		   struct ieee80211_sta *sta)
{}

int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		      struct ieee80211_sta *sta)
{}

static void __cw1200_sta_notify(struct ieee80211_hw *dev,
				struct ieee80211_vif *vif,
				enum sta_notify_cmd notify_cmd,
				int link_id)
{}

void cw1200_sta_notify(struct ieee80211_hw *dev,
		       struct ieee80211_vif *vif,
		       enum sta_notify_cmd notify_cmd,
		       struct ieee80211_sta *sta)
{}

static void cw1200_ps_notify(struct cw1200_common *priv,
		      int link_id, bool ps)
{}

static int cw1200_set_tim_impl(struct cw1200_common *priv, bool aid0_bit_set)
{}

void cw1200_set_tim_work(struct work_struct *work)
{}

int cw1200_set_tim(struct ieee80211_hw *dev, struct ieee80211_sta *sta,
		   bool set)
{}

void cw1200_set_cts_work(struct work_struct *work)
{}

static int cw1200_set_btcoexinfo(struct cw1200_common *priv)
{}

void cw1200_bss_info_changed(struct ieee80211_hw *dev,
			     struct ieee80211_vif *vif,
			     struct ieee80211_bss_conf *info,
			     u64 changed)
{}

void cw1200_multicast_start_work(struct work_struct *work)
{}

void cw1200_multicast_stop_work(struct work_struct *work)
{}

void cw1200_mcast_timeout(struct timer_list *t)
{}

int cw1200_ampdu_action(struct ieee80211_hw *hw,
			struct ieee80211_vif *vif,
			struct ieee80211_ampdu_params *params)
{}

/* ******************************************************************** */
/* WSM callback								*/
void cw1200_suspend_resume(struct cw1200_common *priv,
			  struct wsm_suspend_resume *arg)
{}

/* ******************************************************************** */
/* AP privates								*/

static int cw1200_upload_beacon(struct cw1200_common *priv)
{}

static int cw1200_upload_pspoll(struct cw1200_common *priv)
{}

static int cw1200_upload_null(struct cw1200_common *priv)
{}

static int cw1200_upload_qosnull(struct cw1200_common *priv)
{}

static int cw1200_enable_beaconing(struct cw1200_common *priv,
				   bool enable)
{}

static int cw1200_start_ap(struct cw1200_common *priv)
{}

static int cw1200_update_beaconing(struct cw1200_common *priv)
{}