linux/drivers/staging/rtl8723bs/os_dep/os_intfs.c

// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 ******************************************************************************/
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_data.h>

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_VERSION();

/* module param defaults */
static int rtw_chip_version;
static int rtw_rfintfs =;
static int rtw_lbkmode;/* RTL8712_AIR_TRX; */


static int rtw_network_mode =;/* Ndis802_11Infrastructure;infra, ad-hoc, auto */
/* struct ndis_802_11_ssid	ssid; */
static int rtw_channel =;/* ad-hoc support requirement */
static int rtw_wireless_mode =;
static int rtw_vrtl_carrier_sense =;
static int rtw_vcs_type =;/*  */
static int rtw_rts_thresh =;/*  */
static int rtw_frag_thresh =;/*  */
static int rtw_preamble =;/* long, short, auto */
static int rtw_scan_mode =;/* active, passive */
static int rtw_adhoc_tx_pwr =;
static int rtw_soft_ap;
/* int smart_ps = 1; */
static int rtw_power_mgnt =;
static int rtw_ips_mode =;
module_param(rtw_ips_mode, int, 0644);
MODULE_PARM_DESC();

static int rtw_smart_ps =;

static int rtw_check_fw_ps =;

static int rtw_usb_rxagg_mode =;/* USB_RX_AGG_DMA = 1, USB_RX_AGG_USB =2 */
module_param(rtw_usb_rxagg_mode, int, 0644);

static int rtw_radio_enable =;
static int rtw_long_retry_lmt =;
static int rtw_short_retry_lmt =;
static int rtw_busy_thresh =;
/* int qos_enable = 0; */
static int rtw_ack_policy =;

static int rtw_software_encrypt;
static int rtw_software_decrypt;

static int rtw_acm_method;/*  0:By SW 1:By HW. */

static int rtw_wmm_enable =;/*  default is set to enable the wmm. */
static int rtw_uapsd_enable;
static int rtw_uapsd_max_sp =;
static int rtw_uapsd_acbk_en;
static int rtw_uapsd_acbe_en;
static int rtw_uapsd_acvi_en;
static int rtw_uapsd_acvo_en;

int rtw_ht_enable =;
/*
 * 0: 20 MHz, 1: 40 MHz
 * 2.4G use bit 0 ~ 3
 * 0x01 means enable 2.4G 40MHz
 */
static int rtw_bw_mode =;
static int rtw_ampdu_enable =;/* for enable tx_ampdu ,0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enable (don't care wifi_spec) */
static int rtw_rx_stbc =;/*  0: disable, 1:enable 2.4g */
static int rtw_ampdu_amsdu;/*  0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
/*  Short GI support Bit Map */
/*  BIT0 - 20MHz, 0: non-support, 1: support */
/*  BIT1 - 40MHz, 0: non-support, 1: support */
/*  BIT2 - 80MHz, 0: non-support, 1: support */
/*  BIT3 - 160MHz, 0: non-support, 1: support */
static int rtw_short_gi =;
/*  BIT0: Enable VHT LDPC Rx, BIT1: Enable VHT LDPC Tx, BIT4: Enable HT LDPC Rx, BIT5: Enable HT LDPC Tx */
static int rtw_ldpc_cap =;
/*  BIT0: Enable VHT STBC Rx, BIT1: Enable VHT STBC Tx, BIT4: Enable HT STBC Rx, BIT5: Enable HT STBC Tx */
static int rtw_stbc_cap =;
/*  BIT0: Enable VHT Beamformer, BIT1: Enable VHT Beamformee, BIT4: Enable HT Beamformer, BIT5: Enable HT Beamformee */
static int rtw_beamform_cap =;

static int rtw_lowrate_two_xmit =;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */

static int rtw_low_power;
static int rtw_wifi_spec;
static int rtw_channel_plan =;

static int rtw_ant_num =; /*  <0: undefined, >0: Antenna number */
module_param(rtw_ant_num, int, 0644);
MODULE_PARM_DESC();

static int rtw_antdiv_cfg =; /*  0:OFF , 1:ON, 2:decide by Efuse config */
static int rtw_antdiv_type; /* 0:decide by efuse  1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2:  for 88EE, 1Tx and 2Rx are diversity.(2 Ant, Tx and RxCG are both on aux port, RxCS is on main port), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */



static int rtw_hw_wps_pbc;

int rtw_mc2u_disable;

static int rtw_80211d;

static int rtw_qos_opt_enable;/* 0: disable, 1:enable */
module_param(rtw_qos_opt_enable, int, 0644);

static char *ifname =;
module_param(ifname, charp, 0644);
MODULE_PARM_DESC();

char *rtw_initmac;  /*  temp mac address if users want to use instead of the mac address in Efuse */

module_param(rtw_initmac, charp, 0644);
module_param(rtw_channel_plan, int, 0644);
module_param(rtw_chip_version, int, 0644);
module_param(rtw_rfintfs, int, 0644);
module_param(rtw_lbkmode, int, 0644);
module_param(rtw_network_mode, int, 0644);
module_param(rtw_channel, int, 0644);
module_param(rtw_wmm_enable, int, 0644);
module_param(rtw_vrtl_carrier_sense, int, 0644);
module_param(rtw_vcs_type, int, 0644);
module_param(rtw_busy_thresh, int, 0644);

module_param(rtw_ht_enable, int, 0644);
module_param(rtw_bw_mode, int, 0644);
module_param(rtw_ampdu_enable, int, 0644);
module_param(rtw_rx_stbc, int, 0644);
module_param(rtw_ampdu_amsdu, int, 0644);

module_param(rtw_lowrate_two_xmit, int, 0644);

module_param(rtw_power_mgnt, int, 0644);
module_param(rtw_smart_ps, int, 0644);
module_param(rtw_low_power, int, 0644);
module_param(rtw_wifi_spec, int, 0644);

module_param(rtw_antdiv_cfg, int, 0644);
module_param(rtw_antdiv_type, int, 0644);


module_param(rtw_hw_wps_pbc, int, 0644);

static uint rtw_max_roaming_times =;
module_param(rtw_max_roaming_times, uint, 0644);
MODULE_PARM_DESC();

module_param(rtw_mc2u_disable, int, 0644);

module_param(rtw_80211d, int, 0644);
MODULE_PARM_DESC();

static uint rtw_notch_filter;
module_param(rtw_notch_filter, uint, 0644);
MODULE_PARM_DESC();

#define CONFIG_RTW_HIQ_FILTER

static uint rtw_hiq_filter =;
module_param(rtw_hiq_filter, uint, 0644);
MODULE_PARM_DESC();

static int rtw_tx_pwr_lmt_enable;
static int rtw_tx_pwr_by_rate;

module_param(rtw_tx_pwr_lmt_enable, int, 0644);
MODULE_PARM_DESC();

module_param(rtw_tx_pwr_by_rate, int, 0644);
MODULE_PARM_DESC();

static int netdev_close(struct net_device *pnetdev);

static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
{}

static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
{}

static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)
{}

/*
 * AC to queue mapping
 *
 * AC_VO -> queue 0
 * AC_VI -> queue 1
 * AC_BE -> queue 2
 * AC_BK -> queue 3
 */
static const u16 rtw_1d_to_queue[8] =;

/* Given a data frame determine the 802.1p/1d tag to use. */
static unsigned int rtw_classify8021d(struct sk_buff *skb)
{}


static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
			    struct net_device *sb_dev)
{}

u16 rtw_recv_select_queue(struct sk_buff *skb)
{}

static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr)
{}

static struct notifier_block rtw_ndev_notifier =;

int rtw_ndev_notifier_register(void)
{}

void rtw_ndev_notifier_unregister(void)
{}


static int rtw_ndev_init(struct net_device *dev)
{}

static void rtw_ndev_uninit(struct net_device *dev)
{}

static const struct net_device_ops rtw_netdev_ops =;

int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
{}

struct net_device *rtw_init_netdev(struct adapter *old_padapter)
{}

void rtw_unregister_netdevs(struct dvobj_priv *dvobj)
{}

u32 rtw_start_drv_threads(struct adapter *padapter)
{}

void rtw_stop_drv_threads(struct adapter *padapter)
{}

static void rtw_init_default_value(struct adapter *padapter)
{}

struct dvobj_priv *devobj_init(void)
{}

void devobj_deinit(struct dvobj_priv *pdvobj)
{}

void rtw_reset_drv_sw(struct adapter *padapter)
{}


u8 rtw_init_drv_sw(struct adapter *padapter)
{}

void rtw_cancel_all_timer(struct adapter *padapter)
{}

u8 rtw_free_drv_sw(struct adapter *padapter)
{}

static int _rtw_drv_register_netdev(struct adapter *padapter, char *name)
{}

int rtw_drv_register_netdev(struct adapter *if1)
{}

static int _netdev_open(struct net_device *pnetdev)
{}

int netdev_open(struct net_device *pnetdev)
{}

static int  ips_netdrv_open(struct adapter *padapter)
{}


int rtw_ips_pwr_up(struct adapter *padapter)
{}

void rtw_ips_pwr_down(struct adapter *padapter)
{}

void rtw_ips_dev_unload(struct adapter *padapter)
{}

static int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
{}

static int netdev_close(struct net_device *pnetdev)
{}

void rtw_ndev_destructor(struct net_device *ndev)
{}

void rtw_dev_unload(struct adapter *padapter)
{}

static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
{}

static void rtw_suspend_normal(struct adapter *padapter)
{}

void rtw_suspend_common(struct adapter *padapter)
{}

static int rtw_resume_process_normal(struct adapter *padapter)
{}

int rtw_resume_common(struct adapter *padapter)
{}