2022-06-08 23:46:35 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
|
|
|
|
2013-05-19 04:28:07 +00:00
|
|
|
#ifndef __RTW_RF_H_
|
2013-05-08 21:45:39 +00:00
|
|
|
#define __RTW_RF_H_
|
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
#include "rtw_cmd.h"
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define NumRates (13)
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* slot time for 11g */
|
2013-10-19 17:45:47 +00:00
|
|
|
#define SHORT_SLOT_TIME 9
|
|
|
|
#define NON_SHORT_SLOT_TIME 20
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-10-19 17:45:47 +00:00
|
|
|
#define MAX_CHANNEL_NUM 14 /* 2.4 GHz only */
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define NUM_REGULATORYS 1
|
|
|
|
|
|
|
|
struct regulatory_class {
|
2013-08-14 02:01:38 +00:00
|
|
|
u32 starting_freq; /* MHz, */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 channel_set[MAX_CHANNEL_NUM];
|
2013-08-14 02:01:38 +00:00
|
|
|
u8 channel_cck_power[MAX_CHANNEL_NUM]; /* dbm */
|
|
|
|
u8 channel_ofdm_power[MAX_CHANNEL_NUM]; /* dbm */
|
|
|
|
u8 txpower_limit; /* dbm */
|
|
|
|
u8 channel_spacing; /* MHz */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 modem;
|
|
|
|
};
|
|
|
|
|
2013-07-26 21:27:19 +00:00
|
|
|
enum capability {
|
|
|
|
cESS = 0x0001,
|
|
|
|
cIBSS = 0x0002,
|
|
|
|
cPollable = 0x0004,
|
|
|
|
cPollReq = 0x0008,
|
|
|
|
cPrivacy = 0x0010,
|
2013-05-08 21:45:39 +00:00
|
|
|
cShortPreamble = 0x0020,
|
2013-07-26 21:27:19 +00:00
|
|
|
cPBCC = 0x0040,
|
2013-05-08 21:45:39 +00:00
|
|
|
cChannelAgility = 0x0080,
|
|
|
|
cSpectrumMgnt = 0x0100,
|
2013-08-14 02:01:38 +00:00
|
|
|
cQos = 0x0200, /* For HCCA, use with CF-Pollable
|
|
|
|
* and CF-PollReq */
|
2013-05-08 21:45:39 +00:00
|
|
|
cShortSlotTime = 0x0400,
|
2013-07-26 21:27:19 +00:00
|
|
|
cAPSD = 0x0800,
|
2013-08-12 04:36:23 +00:00
|
|
|
cRM = 0x1000, /* RRM (Radio Request Measurement) */
|
2013-05-08 21:45:39 +00:00
|
|
|
cDSSS_OFDM = 0x2000,
|
2013-07-26 21:27:19 +00:00
|
|
|
cDelayedBA = 0x4000,
|
2013-05-08 21:45:39 +00:00
|
|
|
cImmediateBA = 0x8000,
|
2013-07-26 21:27:19 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-14 02:01:38 +00:00
|
|
|
enum _REG_PREAMBLE_MODE {
|
2013-05-08 21:45:39 +00:00
|
|
|
PREAMBLE_LONG = 1,
|
|
|
|
PREAMBLE_AUTO = 2,
|
|
|
|
PREAMBLE_SHORT = 3,
|
|
|
|
};
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* Bandwidth Offset */
|
2013-05-08 21:45:39 +00:00
|
|
|
#define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
|
|
|
|
#define HAL_PRIME_CHNL_OFFSET_LOWER 1
|
|
|
|
#define HAL_PRIME_CHNL_OFFSET_UPPER 2
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* Represent Channel Width in HT Capabilities */
|
|
|
|
/* */
|
2013-07-26 21:27:19 +00:00
|
|
|
enum ht_channel_width {
|
2013-05-08 21:45:39 +00:00
|
|
|
HT_CHANNEL_WIDTH_20 = 0,
|
|
|
|
HT_CHANNEL_WIDTH_40 = 1,
|
2013-07-26 21:27:19 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* */
|
2013-11-29 22:10:20 +00:00
|
|
|
/* Represent Extension Channel Offset in HT Capabilities */
|
2013-08-12 04:36:23 +00:00
|
|
|
/* This is available only in 40Mhz mode. */
|
|
|
|
/* */
|
2013-07-26 21:27:19 +00:00
|
|
|
enum ht_extchnl_offset {
|
2013-05-08 21:45:39 +00:00
|
|
|
HT_EXTCHNL_OFFSET_NO_EXT = 0,
|
|
|
|
HT_EXTCHNL_OFFSET_UPPER = 1,
|
|
|
|
HT_EXTCHNL_OFFSET_NO_DEF = 2,
|
|
|
|
HT_EXTCHNL_OFFSET_LOWER = 3,
|
2013-07-26 21:27:19 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
u32 rtw_ch2freq(u32 ch);
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
#endif /* _RTL8711_RF_H_ */
|