mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Fix checkpatch errors in include/*.h - part 1
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
f9d86b986b
commit
9dd1827027
45 changed files with 4057 additions and 4114 deletions
|
@ -6836,7 +6836,7 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
|
||||||
_rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength);
|
_rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength);
|
||||||
|
|
||||||
/* get the signal strength */
|
/* get the signal strength */
|
||||||
bssid->Rssi = precv_frame->u.hdr.attrib.phy_info.RecvSignalPower; /* in dBM.raw data */
|
bssid->Rssi = precv_frame->u.hdr.attrib.phy_info.recvpower; /* in dBM.raw data */
|
||||||
bssid->PhyInfo.SignalQuality = precv_frame->u.hdr.attrib.phy_info.SignalQuality;/* in percentage */
|
bssid->PhyInfo.SignalQuality = precv_frame->u.hdr.attrib.phy_info.SignalQuality;/* in percentage */
|
||||||
bssid->PhyInfo.SignalStrength = precv_frame->u.hdr.attrib.phy_info.SignalStrength;/* in percentage */
|
bssid->PhyInfo.SignalStrength = precv_frame->u.hdr.attrib.phy_info.SignalStrength;/* in percentage */
|
||||||
rtw_hal_get_def_var(padapter, HAL_DEF_CURRENT_ANTENNA, &bssid->PhyInfo.Optimum_antenna);
|
rtw_hal_get_def_var(padapter, HAL_DEF_CURRENT_ANTENNA, &bssid->PhyInfo.Optimum_antenna);
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
|
|
||||||
|
|
||||||
/* oid_rtl_seg_81_85 section start **************** */
|
/* oid_rtl_seg_81_85 section start **************** */
|
||||||
NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -53,12 +53,12 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* oid_rtl_seg_81_87_80 section start **************** */
|
/* oid_rtl_seg_81_87_80 section start **************** */
|
||||||
NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct bb_reg_param *pbbreg;
|
struct bb_reg_param *pbbreg;
|
||||||
u16 offset;
|
u16 offset;
|
||||||
u32 value;
|
u32 value;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -92,12 +92,12 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct bb_reg_param *pbbreg;
|
struct bb_reg_param *pbbreg;
|
||||||
u16 offset;
|
u16 offset;
|
||||||
u32 value;
|
u32 value;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -131,13 +131,13 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct rf_reg_param *pbbreg;
|
struct rf_reg_param *pbbreg;
|
||||||
u8 path;
|
u8 path;
|
||||||
u8 offset;
|
u8 offset;
|
||||||
u32 value;
|
u32 value;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -176,14 +176,14 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct rf_reg_param *pbbreg;
|
struct rf_reg_param *pbbreg;
|
||||||
u8 path;
|
u8 path;
|
||||||
u8 offset;
|
u8 offset;
|
||||||
u32 value;
|
u32 value;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -226,10 +226,10 @@ _func_exit_;
|
||||||
|
|
||||||
/* oid_rtl_seg_81_80_00 section start **************** */
|
/* oid_rtl_seg_81_80_00 section start **************** */
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 ratevalue;/* 4 */
|
u32 ratevalue;/* 4 */
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -260,10 +260,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 mode;
|
u32 mode;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -298,9 +298,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -321,10 +321,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 Channel;
|
u32 Channel;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -357,11 +357,11 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u16 bandwidth;
|
u16 bandwidth;
|
||||||
u16 channel_offset;
|
u16 channel_offset;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -396,10 +396,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 antenna;
|
u32 antenna;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -431,10 +431,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 tx_pwr_idx;
|
u32 tx_pwr_idx;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -469,9 +469,9 @@ _func_exit_;
|
||||||
/* */
|
/* */
|
||||||
/* oid_rtl_seg_81_80_20 section start **************** */
|
/* oid_rtl_seg_81_80_20 section start **************** */
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -493,9 +493,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_query_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_query_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -518,9 +518,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_query_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_query_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -544,9 +544,9 @@ _func_exit_;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -564,9 +564,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -588,9 +588,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -609,9 +609,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -637,9 +637,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -668,10 +668,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* oid_rtl_seg_81_80_20 section end **************** */
|
/* oid_rtl_seg_81_80_20 section end **************** */
|
||||||
NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 bStartTest;
|
u32 bStartTest;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -703,10 +703,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 bStartTest;
|
u32 bStartTest;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -738,10 +738,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 bStartTest;
|
u32 bStartTest;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -773,10 +773,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u32 bStartTest;
|
u32 bStartTest;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -797,15 +797,15 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_modulation_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_modulation_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if (poid_par_priv->type_of_oid != SET_OID)
|
if (poid_par_priv->type_of_oid != SET_OID)
|
||||||
|
@ -821,16 +821,16 @@ _func_exit_;
|
||||||
}
|
}
|
||||||
/* oid_rtl_seg_81_80_00 section end **************** */
|
/* oid_rtl_seg_81_80_00 section end **************** */
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct mp_rw_reg *RegRWStruct;
|
struct mp_rw_reg *RegRWStruct;
|
||||||
u32 offset, width;
|
u32 offset, width;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -875,11 +875,11 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct mp_rw_reg *RegRWStruct;
|
struct mp_rw_reg *RegRWStruct;
|
||||||
u32 offset, width, value;
|
u32 offset, width, value;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -934,73 +934,73 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_write16_eeprom_hdl (struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write16_eeprom_hdl (struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv)
|
int oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1021,9 +1021,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
u8 thermal = 0;
|
u8 thermal = 0;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
|
@ -1049,14 +1049,14 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1084,59 +1084,59 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_set_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_h2c_get_rate_table_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_h2c_get_rate_table_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* oid_rtl_seg_87_12_00 section start **************** */
|
/* oid_rtl_seg_87_12_00 section start **************** */
|
||||||
NDIS_STATUS oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return NDIS_STATUS_SUCCESS;
|
return NDIS_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct efuse_access_struct *pefuse;
|
struct efuse_access_struct *pefuse;
|
||||||
u8 *data;
|
u8 *data;
|
||||||
u16 addr = 0, cnts = 0, max_available_size = 0;
|
u16 addr = 0, cnts = 0, max_available_size = 0;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1177,12 +1177,12 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct efuse_access_struct *pefuse;
|
struct efuse_access_struct *pefuse;
|
||||||
u8 *data;
|
u8 *data;
|
||||||
u16 addr = 0, cnts = 0, max_available_size = 0;
|
u16 addr = 0, cnts = 0, max_available_size = 0;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1217,10 +1217,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct pgpkt *ppgpkt;
|
struct pgpkt *ppgpkt;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1268,11 +1268,11 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u16 size;
|
u16 size;
|
||||||
u8 ret;
|
u8 ret;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1297,9 +1297,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
@ -1322,9 +1322,9 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status;
|
int status;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1342,10 +1342,10 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u8 *data;
|
u8 *data;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||||
u16 maplen = 0;
|
u16 maplen = 0;
|
||||||
|
|
||||||
|
@ -1399,16 +1399,16 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
u8 rx_pkt_type;
|
u8 rx_pkt_type;
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1428,17 +1428,17 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
struct mp_xmit_parm *pparm;
|
struct mp_xmit_parm *pparm;
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
@ -1474,9 +1474,9 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
int status = NDIS_STATUS_SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1498,7 +1498,7 @@ _func_exit_;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* */
|
/* */
|
||||||
NDIS_STATUS oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv)
|
int oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,18 +22,18 @@
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------Define Parameters-------------------------------*/
|
/*--------------------------Define Parameters-------------------------------*/
|
||||||
#define LOOP_LIMIT 5
|
#define LOOP_LIMIT 5
|
||||||
#define MAX_STALL_TIME 50 /* us */
|
#define MAX_STALL_TIME 50 /* us */
|
||||||
#define AntennaDiversityValue 0x80 /* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
|
#define AntennaDiversityValue 0x80
|
||||||
#define MAX_TXPWR_IDX_NMODE_92S 63
|
#define MAX_TXPWR_IDX_NMODE_92S 63
|
||||||
#define Reset_Cnt_Limit 3
|
#define Reset_Cnt_Limit 3
|
||||||
|
|
||||||
#define IQK_MAC_REG_NUM 4
|
#define IQK_MAC_REG_NUM 4
|
||||||
#define IQK_ADDA_REG_NUM 16
|
#define IQK_ADDA_REG_NUM 16
|
||||||
#define IQK_BB_REG_NUM 9
|
#define IQK_BB_REG_NUM 9
|
||||||
#define HP_THERMAL_NUM 8
|
#define HP_THERMAL_NUM 8
|
||||||
|
|
||||||
#define MAX_AGGR_NUM 0x07
|
#define MAX_AGGR_NUM 0x07
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------Define Parameters-------------------------------*/
|
/*--------------------------Define Parameters-------------------------------*/
|
||||||
|
@ -53,9 +53,9 @@ enum sw_chnl_cmd_id {
|
||||||
/* 1. Switch channel related */
|
/* 1. Switch channel related */
|
||||||
struct sw_chnl_cmd {
|
struct sw_chnl_cmd {
|
||||||
enum sw_chnl_cmd_id CmdID;
|
enum sw_chnl_cmd_id CmdID;
|
||||||
u32 Para1;
|
u32 Para1;
|
||||||
u32 Para2;
|
u32 Para2;
|
||||||
u32 msDelay;
|
u32 msDelay;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum hw90_block {
|
enum hw90_block {
|
||||||
|
@ -75,12 +75,14 @@ enum rf_radio_path {
|
||||||
|
|
||||||
#define MAX_PG_GROUP 13
|
#define MAX_PG_GROUP 13
|
||||||
|
|
||||||
#define RF_PATH_MAX 2
|
#define RF_PATH_MAX 2
|
||||||
#define MAX_RF_PATH RF_PATH_MAX
|
#define MAX_RF_PATH RF_PATH_MAX
|
||||||
#define MAX_TX_COUNT 4 /* path numbers */
|
#define MAX_TX_COUNT 4 /* path numbers */
|
||||||
|
|
||||||
#define CHANNEL_MAX_NUMBER 14 /* 14 is the max channel number */
|
#define CHANNEL_MAX_NUMBER 14 /* 14 is the max chnl number */
|
||||||
#define MAX_CHNL_GROUP_24G 6 /* ch1~2, ch3~5, ch6~8,ch9~11,ch12~13,CH 14 total three groups */
|
#define MAX_CHNL_GROUP_24G 6 /* ch1~2, ch3~5, ch6~8,
|
||||||
|
*ch9~11, ch12~13, CH 14
|
||||||
|
* total three groups */
|
||||||
#define CHANNEL_GROUP_MAX_88E 6
|
#define CHANNEL_GROUP_MAX_88E 6
|
||||||
|
|
||||||
enum wireless_mode {
|
enum wireless_mode {
|
||||||
|
@ -88,9 +90,9 @@ enum wireless_mode {
|
||||||
WIRELESS_MODE_A = BIT2,
|
WIRELESS_MODE_A = BIT2,
|
||||||
WIRELESS_MODE_B = BIT0,
|
WIRELESS_MODE_B = BIT0,
|
||||||
WIRELESS_MODE_G = BIT1,
|
WIRELESS_MODE_G = BIT1,
|
||||||
WIRELESS_MODE_AUTO = BIT5,
|
WIRELESS_MODE_AUTO = BIT5,
|
||||||
WIRELESS_MODE_N_24G = BIT3,
|
WIRELESS_MODE_N_24G = BIT3,
|
||||||
WIRELESS_MODE_N_5G = BIT4,
|
WIRELESS_MODE_N_5G = BIT4,
|
||||||
WIRELESS_MODE_AC = BIT6
|
WIRELESS_MODE_AC = BIT6
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,69 +108,79 @@ enum phy_rate_tx_offset_area {
|
||||||
|
|
||||||
/* BB/RF related */
|
/* BB/RF related */
|
||||||
enum RF_TYPE_8190P {
|
enum RF_TYPE_8190P {
|
||||||
RF_TYPE_MIN, /* 0 */
|
RF_TYPE_MIN, /* 0 */
|
||||||
RF_8225=1, /* 1 11b/g RF for verification only */
|
RF_8225 = 1, /* 1 11b/g RF for verification only */
|
||||||
RF_8256=2, /* 2 11b/g/n */
|
RF_8256 = 2, /* 2 11b/g/n */
|
||||||
RF_8258=3, /* 3 11a/b/g/n RF */
|
RF_8258 = 3, /* 3 11a/b/g/n RF */
|
||||||
RF_6052=4, /* 4 11b/g/n RF */
|
RF_6052 = 4, /* 4 11b/g/n RF */
|
||||||
/* TODO: We should remove this psudo PHY RF after we get new RF. */
|
/* TODO: We should remove this psudo PHY RF after we get new RF. */
|
||||||
RF_PSEUDO_11N=5, /* 5, It is a temporality RF. */
|
RF_PSEUDO_11N = 5, /* 5, It is a temporality RF. */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bb_reg_def {
|
struct bb_reg_def {
|
||||||
u32 rfintfs; /* set software control: */
|
u32 rfintfs; /* set software control: */
|
||||||
/* 0x870~0x877[8 bytes] */
|
/* 0x870~0x877[8 bytes] */
|
||||||
u32 rfintfi; /* readback data: */
|
u32 rfintfi; /* readback data: */
|
||||||
/* 0x8e0~0x8e7[8 bytes] */
|
/* 0x8e0~0x8e7[8 bytes] */
|
||||||
u32 rfintfo; /* output data: */
|
u32 rfintfo; /* output data: */
|
||||||
/* 0x860~0x86f [16 bytes] */
|
/* 0x860~0x86f [16 bytes] */
|
||||||
u32 rfintfe; /* output enable: */
|
u32 rfintfe; /* output enable: */
|
||||||
/* 0x860~0x86f [16 bytes] */
|
/* 0x860~0x86f [16 bytes] */
|
||||||
u32 rf3wireOffset; /* LSSI data: */
|
u32 rf3wireOffset; /* LSSI data: */
|
||||||
/* 0x840~0x84f [16 bytes] */
|
/* 0x840~0x84f [16 bytes] */
|
||||||
u32 rfLSSI_Select; /* BB Band Select: */
|
u32 rfLSSI_Select; /* BB Band Select: */
|
||||||
/* 0x878~0x87f [8 bytes] */
|
/* 0x878~0x87f [8 bytes] */
|
||||||
u32 rfTxGainStage; /* Tx gain stage: */
|
u32 rfTxGainStage; /* Tx gain stage: */
|
||||||
/* 0x80c~0x80f [4 bytes] */
|
/* 0x80c~0x80f [4 bytes] */
|
||||||
u32 rfHSSIPara1; /* wire parameter control1 : */
|
u32 rfHSSIPara1; /* wire parameter control1 : */
|
||||||
/* 0x820~0x823,0x828~0x82b, 0x830~0x833, 0x838~0x83b [16 bytes] */
|
/* 0x820~0x823,0x828~0x82b,
|
||||||
|
* 0x830~0x833, 0x838~0x83b [16 bytes] */
|
||||||
u32 rfHSSIPara2; /* wire parameter control2 : */
|
u32 rfHSSIPara2; /* wire parameter control2 : */
|
||||||
/* 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes] */
|
/* 0x824~0x827,0x82c~0x82f, 0x834~0x837,
|
||||||
u32 rfSwitchControl; /* Tx Rx antenna control : */
|
* 0x83c~0x83f [16 bytes] */
|
||||||
/* 0x858~0x85f [16 bytes] */
|
u32 rfSwitchControl; /* Tx Rx antenna control : */
|
||||||
|
/* 0x858~0x85f [16 bytes] */
|
||||||
u32 rfAGCControl1; /* AGC parameter control1 : */
|
u32 rfAGCControl1; /* AGC parameter control1 : */
|
||||||
/* 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes] */
|
/* 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63,
|
||||||
|
* 0xc68~0xc6b [16 bytes] */
|
||||||
u32 rfAGCControl2; /* AGC parameter control2 : */
|
u32 rfAGCControl2; /* AGC parameter control2 : */
|
||||||
/* 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes] */
|
/* 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67,
|
||||||
|
* 0xc6c~0xc6f [16 bytes] */
|
||||||
u32 rfRxIQImbalance; /* OFDM Rx IQ imbalance matrix : */
|
u32 rfRxIQImbalance; /* OFDM Rx IQ imbalance matrix : */
|
||||||
/* 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [16 bytes] */
|
/* 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27,
|
||||||
u32 rfRxAFE; /* Rx IQ DC ofset and Rx digital filter, Rx DC notch filter : */
|
* 0xc2c~0xc2f [16 bytes] */
|
||||||
/* 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, 0xc28~0xc2b [16 bytes] */
|
u32 rfRxAFE; /* Rx IQ DC ofset and Rx digital filter,
|
||||||
|
* Rx DC notch filter : */
|
||||||
|
/* 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23,
|
||||||
|
* 0xc28~0xc2b [16 bytes] */
|
||||||
u32 rfTxIQImbalance; /* OFDM Tx IQ imbalance matrix */
|
u32 rfTxIQImbalance; /* OFDM Tx IQ imbalance matrix */
|
||||||
/* 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, 0xc98~0xc9b [16 bytes] */
|
/* 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93,
|
||||||
|
* 0xc98~0xc9b [16 bytes] */
|
||||||
u32 rfTxAFE; /* Tx IQ DC Offset and Tx DFIR type */
|
u32 rfTxAFE; /* Tx IQ DC Offset and Tx DFIR type */
|
||||||
/* 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, 0xc9c~0xc9f [16 bytes] */
|
/* 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97,
|
||||||
|
* 0xc9c~0xc9f [16 bytes] */
|
||||||
u32 rfLSSIReadBack; /* LSSI RF readback data SI mode */
|
u32 rfLSSIReadBack; /* LSSI RF readback data SI mode */
|
||||||
/* 0x8a0~0x8af [16 bytes] */
|
/* 0x8a0~0x8af [16 bytes] */
|
||||||
u32 rfLSSIReadBackPi; /* LSSI RF readback data PI mode 0x8b8-8bc for Path A and B */
|
u32 rfLSSIReadBackPi; /* LSSI RF readback data PI mode 0x8b8-8bc for
|
||||||
|
* Path A and B */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ant_sel_ofdm {
|
struct ant_sel_ofdm {
|
||||||
u32 r_tx_antenna:4;
|
u32 r_tx_antenna:4;
|
||||||
u32 r_ant_l:4;
|
u32 r_ant_l:4;
|
||||||
u32 r_ant_non_ht:4;
|
u32 r_ant_non_ht:4;
|
||||||
u32 r_ant_ht1:4;
|
u32 r_ant_ht1:4;
|
||||||
u32 r_ant_ht2:4;
|
u32 r_ant_ht2:4;
|
||||||
u32 r_ant_ht_s1:4;
|
u32 r_ant_ht_s1:4;
|
||||||
u32 r_ant_non_ht_s1:4;
|
u32 r_ant_non_ht_s1:4;
|
||||||
u32 OFDM_TXSC:2;
|
u32 OFDM_TXSC:2;
|
||||||
u32 Reserved:2;
|
u32 reserved:2;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ant_sel_cck {
|
struct ant_sel_cck {
|
||||||
u8 r_cckrx_enable_2:2;
|
u8 r_cckrx_enable_2:2;
|
||||||
u8 r_cckrx_enable:2;
|
u8 r_cckrx_enable:2;
|
||||||
u8 r_ccktx_enable:4;
|
u8 r_ccktx_enable:4;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*------------------------------Define structure----------------------------*/
|
/*------------------------------Define structure----------------------------*/
|
||||||
|
@ -186,109 +198,79 @@ struct ant_sel_cck {
|
||||||
/* */
|
/* */
|
||||||
/* BB and RF register read/write */
|
/* BB and RF register read/write */
|
||||||
/* */
|
/* */
|
||||||
u32 rtl8188e_PHY_QueryBBReg( struct adapter * Adapter,
|
u32 rtl8188e_PHY_QueryBBReg(struct adapter *adapter, u32 regaddr, u32 mask);
|
||||||
u32 RegAddr,
|
void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr,
|
||||||
u32 BitMask );
|
u32 mask, u32 data);
|
||||||
void rtl8188e_PHY_SetBBReg( struct adapter * Adapter,
|
u32 rtl8188e_PHY_QueryRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||||
u32 RegAddr,
|
u32 regaddr, u32 mask);
|
||||||
u32 BitMask,
|
void rtl8188e_PHY_SetRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||||
u32 Data );
|
u32 regaddr, u32 mask, u32 data);
|
||||||
u32 rtl8188e_PHY_QueryRFReg(struct adapter * Adapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask);
|
|
||||||
void rtl8188e_PHY_SetRFReg(struct adapter * Adapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* Initialization related function */
|
/* Initialization related function */
|
||||||
/* */
|
|
||||||
/* MAC/BB/RF HAL config */
|
/* MAC/BB/RF HAL config */
|
||||||
int PHY_MACConfig8188E( struct adapter * Adapter );
|
int PHY_MACConfig8188E(struct adapter *adapter);
|
||||||
int PHY_BBConfig8188E( struct adapter * Adapter );
|
int PHY_BBConfig8188E(struct adapter *adapter);
|
||||||
int PHY_RFConfig8188E( struct adapter * Adapter );
|
int PHY_RFConfig8188E(struct adapter *adapter);
|
||||||
|
|
||||||
/* RF config */
|
/* RF config */
|
||||||
int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter * Adapter, u8 * pFileName, enum rf_radio_path eRFPath);
|
int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter *adapter, u8 *filename,
|
||||||
int rtl8188e_PHY_ConfigRFWithHeaderFile( struct adapter * Adapter,
|
enum rf_radio_path rfpath);
|
||||||
enum rf_radio_path eRFPath);
|
int rtl8188e_PHY_ConfigRFWithHeaderFile(struct adapter *adapter,
|
||||||
|
enum rf_radio_path rfpath);
|
||||||
|
|
||||||
/* Read initi reg value for tx power setting. */
|
/* Read initi reg value for tx power setting. */
|
||||||
void rtl8192c_PHY_GetHWRegOriginalValue( struct adapter * Adapter );
|
void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter);
|
||||||
|
|
||||||
/* */
|
|
||||||
/* BB TX Power R/W */
|
/* BB TX Power R/W */
|
||||||
/* */
|
void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
|
||||||
void PHY_GetTxPowerLevel8188E(struct adapter * Adapter, u32 *powerlevel);
|
void PHY_SetTxPowerLevel8188E(struct adapter *adapter, u8 channel);
|
||||||
void PHY_SetTxPowerLevel8188E(struct adapter * Adapter, u8 channel);
|
bool PHY_UpdateTxPowerDbm8188E(struct adapter *adapter, int power);
|
||||||
bool PHY_UpdateTxPowerDbm8188E(struct adapter * Adapter, int powerInDbm);
|
|
||||||
|
|
||||||
/* */
|
void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
|
||||||
void
|
|
||||||
PHY_ScanOperationBackup8188E( struct adapter * Adapter,
|
|
||||||
u8 Operation );
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* Switch bandwidth for 8192S */
|
/* Switch bandwidth for 8192S */
|
||||||
/* */
|
void PHY_SetBWMode8188E(struct adapter *adapter,
|
||||||
void PHY_SetBWMode8188E(struct adapter * pAdapter, enum ht_channel_width ChnlWidth, unsigned char Offset);
|
enum ht_channel_width chnlwidth, unsigned char offset);
|
||||||
|
|
||||||
/* */
|
|
||||||
/* Set A2 entry to fw for 8192S */
|
/* Set A2 entry to fw for 8192S */
|
||||||
/* */
|
void FillA2Entry8192C(struct adapter *adapter, u8 index, u8 *val);
|
||||||
extern void FillA2Entry8192C(struct adapter * Adapter, u8 index, u8 *val);
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* channel switch related funciton */
|
/* channel switch related funciton */
|
||||||
/* */
|
void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
|
||||||
void PHY_SwChnl8188E( struct adapter * pAdapter,
|
/* Call after initialization */
|
||||||
u8 channel );
|
void PHY_SwChnlPhy8192C(struct adapter *adapter, u8 channel);
|
||||||
/* Call after initialization */
|
|
||||||
void PHY_SwChnlPhy8192C( struct adapter * pAdapter,
|
|
||||||
u8 channel );
|
|
||||||
|
|
||||||
void ChkFwCmdIoDone( struct adapter * Adapter);
|
void ChkFwCmdIoDone(struct adapter *adapter);
|
||||||
|
|
||||||
/* */
|
|
||||||
/* BB/MAC/RF other monitor API */
|
/* BB/MAC/RF other monitor API */
|
||||||
/* */
|
void PHY_SetMonitorMode8192C(struct adapter *adapter, bool enablemonitormode);
|
||||||
void PHY_SetMonitorMode8192C( struct adapter * pAdapter,
|
|
||||||
bool bEnableMonitorMode );
|
|
||||||
|
|
||||||
bool PHY_CheckIsLegalRfPath8192C( struct adapter * pAdapter,
|
bool PHY_CheckIsLegalRfPath8192C(struct adapter *adapter, u32 rfpath);
|
||||||
u32 eRFPath );
|
|
||||||
|
|
||||||
void PHY_SetRFPathSwitch_8188E( struct adapter * pAdapter, bool bMain);
|
void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
|
||||||
|
|
||||||
extern void
|
void PHY_SwitchEphyParameter(struct adapter *adapter);
|
||||||
PHY_SwitchEphyParameter(
|
|
||||||
struct adapter * Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void
|
void PHY_EnableHostClkReq(struct adapter *adapter);
|
||||||
PHY_EnableHostClkReq(
|
|
||||||
struct adapter * Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
bool
|
bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
|
||||||
SetAntennaConfig92C(
|
|
||||||
struct adapter * Adapter,
|
|
||||||
u8 DefaultAnt
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
|
||||||
storePwrIndexDiffRateOffset(
|
u32 mask, u32 data);
|
||||||
struct adapter * Adapter,
|
|
||||||
u32 RegAddr,
|
|
||||||
u32 BitMask,
|
|
||||||
u32 Data
|
|
||||||
);
|
|
||||||
/*--------------------------Exported Function prototype---------------------*/
|
/*--------------------------Exported Function prototype---------------------*/
|
||||||
|
|
||||||
#define PHY_QueryBBReg(Adapter, RegAddr, BitMask) rtl8188e_PHY_QueryBBReg((Adapter), (RegAddr), (BitMask))
|
#define PHY_QueryBBReg(adapt, regaddr, mask) \
|
||||||
#define PHY_SetBBReg(Adapter, RegAddr, BitMask, Data) rtl8188e_PHY_SetBBReg((Adapter), (RegAddr), (BitMask), (Data))
|
rtl8188e_PHY_QueryBBReg((adapt), (regaddr), (mask))
|
||||||
#define PHY_QueryRFReg(Adapter, eRFPath, RegAddr, BitMask) rtl8188e_PHY_QueryRFReg((Adapter), (eRFPath), (RegAddr), (BitMask))
|
#define PHY_SetBBReg(adapt, regaddr, bitmask, data) \
|
||||||
#define PHY_SetRFReg(Adapter, eRFPath, RegAddr, BitMask, Data) rtl8188e_PHY_SetRFReg((Adapter), (eRFPath), (RegAddr), (BitMask), (Data))
|
rtl8188e_PHY_SetBBReg((adapt), (regaddr), (bitmask), (data))
|
||||||
|
#define PHY_QueryRFReg(adapt, rfpath, regaddr, bitmask) \
|
||||||
|
rtl8188e_PHY_QueryRFReg((adapt), (rfpath), (regaddr), (bitmask))
|
||||||
|
#define PHY_SetRFReg(adapt, rfpath, regaddr, bitmask, data) \
|
||||||
|
rtl8188e_PHY_SetRFReg((adapt), (rfpath), (regaddr), (bitmask), (data))
|
||||||
|
|
||||||
#define PHY_SetMacReg PHY_SetBBReg
|
#define PHY_SetMacReg PHY_SetBBReg
|
||||||
|
|
||||||
#define SIC_HW_SUPPORT 0
|
#define SIC_HW_SUPPORT 0
|
||||||
|
|
||||||
#define SIC_MAX_POLL_CNT 5
|
#define SIC_MAX_POLL_CNT 5
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,114 +53,114 @@
|
||||||
#define RTL8188E_TRANS_SUS_TO_CARDEMU_STEPS 10
|
#define RTL8188E_TRANS_SUS_TO_CARDEMU_STEPS 10
|
||||||
#define RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS 10
|
#define RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS 10
|
||||||
#define RTL8188E_TRANS_PDN_TO_CARDEMU_STEPS 10
|
#define RTL8188E_TRANS_PDN_TO_CARDEMU_STEPS 10
|
||||||
#define RTL8188E_TRANS_ACT_TO_LPS_STEPS 15
|
#define RTL8188E_TRANS_ACT_TO_LPS_STEPS 15
|
||||||
#define RTL8188E_TRANS_LPS_TO_ACT_STEPS 15
|
#define RTL8188E_TRANS_LPS_TO_ACT_STEPS 15
|
||||||
#define RTL8188E_TRANS_END_STEPS 1
|
#define RTL8188E_TRANS_END_STEPS 1
|
||||||
|
|
||||||
|
|
||||||
#define RTL8188E_TRANS_CARDEMU_TO_ACT \
|
#define RTL8188E_TRANS_CARDEMU_TO_ACT \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, BIT1, BIT1},/* wait till 0x04[17] = 1 power ready*/ \
|
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, BIT1},/* wait till 0x04[17] = 1 power ready*/ \
|
||||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0|BIT1, 0}, /* 0x02[1:0] = 0 reset BB*/ \
|
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0|BIT1, 0}, /* 0x02[1:0] = 0 reset BB*/ \
|
||||||
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, BIT7}, /*0x24[23] = 2b'01 schmit trigger */ \
|
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, /*0x24[23] = 2b'01 schmit trigger */ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0}, /* 0x04[15] = 0 disable HWPDN (control by DRV)*/\
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0}, /* 0x04[15] = 0 disable HWPDN (control by DRV)*/\
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4|BIT3, 0}, /*0x04[12:11] = 2b'00 disable WL suspend*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4|BIT3, 0}, /*0x04[12:11] = 2b'00 disable WL suspend*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0}, /*0x04[8] = 1 polling until return 0*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0}, /*0x04[8] = 1 polling until return 0*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, BIT0, 0}, /*wait till 0x04[8] = 0*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT0, 0}, /*wait till 0x04[8] = 0*/ \
|
||||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*LDO normal mode*/ \
|
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, /*LDO normal mode*/ \
|
||||||
{0x0074, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*SDIO Driving*/ \
|
{0x0074, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, /*SDIO Driving*/ \
|
||||||
|
|
||||||
#define RTL8188E_TRANS_ACT_TO_CARDEMU \
|
#define RTL8188E_TRANS_ACT_TO_CARDEMU \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x001F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0},/*0x1F[7:0] = 0 turn off RF*/ \
|
{0x001F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0},/*0x1F[7:0] = 0 turn off RF*/ \
|
||||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*LDO Sleep mode*/ \
|
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, /*LDO Sleep mode*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, BIT1}, /*0x04[9] = 1 turn off MAC by HW state machine*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1}, /*0x04[9] = 1 turn off MAC by HW state machine*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, BIT1, 0}, /*wait till 0x04[9] = 0 polling until return 0 to disable*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, 0}, /*wait till 0x04[9] = 0 polling until return 0 to disable*/ \
|
||||||
|
|
||||||
#define RTL8188E_TRANS_CARDEMU_TO_SUS \
|
#define RTL8188E_TRANS_CARDEMU_TO_SUS \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT3|BIT4, BIT3}, /*0x04[12:11] = 2b'01enable WL suspend*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3}, /*0x04[12:11] = 2b'01enable WL suspend*/ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT3|BIT4, BIT3|BIT4}, /*0x04[12:11] = 2b'11enable WL suspend for PCIe*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3|BIT4}, /*0x04[12:11] = 2b'11enable WL suspend for PCIe*/ \
|
||||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, BIT7}, /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */ \
|
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, BIT7}, /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */ \
|
||||||
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, /*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
||||||
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, /*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_WRITE, BIT0, BIT0}, /*Set SDIO suspend local register*/ \
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0}, /*Set SDIO suspend local register*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_POLLING, BIT1, 0}, /*wait power state to suspend*/
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0}, /*wait power state to suspend*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_SUS_TO_CARDEMU \
|
#define RTL8188E_TRANS_SUS_TO_CARDEMU \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_WRITE, BIT0, 0}, /*Set SDIO suspend local register*/ \
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0}, /*Set SDIO suspend local register*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_POLLING, BIT1, BIT1}, /*wait power state to suspend*/\
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1}, /*wait power state to suspend*/\
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT3|BIT4, 0}, /*0x04[12:11] = 2b'01enable WL suspend*/
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0}, /*0x04[12:11] = 2b'01enable WL suspend*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_CARDEMU_TO_CARDDIS \
|
#define RTL8188E_TRANS_CARDEMU_TO_CARDDIS \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, BIT7}, /*0x24[23] = 2b'01 schmit trigger */ \
|
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, /*0x24[23] = 2b'01 schmit trigger */ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT3|BIT4, BIT3}, /*0x04[12:11] = 2b'01 enable WL suspend*/ \
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3}, /*0x04[12:11] = 2b'01 enable WL suspend*/ \
|
||||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0}, /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */ \
|
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0}, /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */ \
|
||||||
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, /*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
||||||
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, /*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_WRITE, BIT0, BIT0}, /*Set SDIO suspend local register*/ \
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0}, /*Set SDIO suspend local register*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_POLLING, BIT1, 0}, /*wait power state to suspend*/
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0}, /*wait power state to suspend*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_CARDDIS_TO_CARDEMU \
|
#define RTL8188E_TRANS_CARDDIS_TO_CARDEMU \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_WRITE, BIT0, 0}, /*Set SDIO suspend local register*/ \
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0}, /*Set SDIO suspend local register*/ \
|
||||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_POLLING, BIT1, BIT1}, /*wait power state to suspend*/\
|
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1}, /*wait power state to suspend*/\
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT3|BIT4, 0}, /*0x04[12:11] = 2b'01enable WL suspend*/
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0}, /*0x04[12:11] = 2b'01enable WL suspend*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_CARDEMU_TO_PDN \
|
#define RTL8188E_TRANS_CARDEMU_TO_PDN \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0},/* 0x04[16] = 0*/\
|
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0},/* 0x04[16] = 0*/\
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, BIT7},/* 0x04[15] = 1*/
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7},/* 0x04[15] = 1*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_PDN_TO_CARDEMU \
|
#define RTL8188E_TRANS_PDN_TO_CARDEMU \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
||||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0},/* 0x04[15] = 0*/
|
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0},/* 0x04[15] = 0*/
|
||||||
|
|
||||||
/* This is used by driver for LPSRadioOff Procedure, not for FW LPS Step */
|
/* This is used by driver for LPSRadioOff Procedure, not for FW LPS Step */
|
||||||
#define RTL8188E_TRANS_ACT_TO_LPS \
|
#define RTL8188E_TRANS_ACT_TO_LPS \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
||||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x7F},/*Tx Pause*/ \
|
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x7F},/*Tx Pause*/ \
|
||||||
{0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
{0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
||||||
{0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
{0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
||||||
{0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
{0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
||||||
{0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
{0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0},/*Should be zero if no packet is transmitting*/ \
|
||||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0},/*CCK and OFDM are disabled,and clock are gated*/ \
|
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0},/*CCK and OFDM are disabled,and clock are gated*/ \
|
||||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US},/*Delay 1us*/ \
|
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US},/*Delay 1us*/ \
|
||||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x3F},/*Reset MAC TRX*/ \
|
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x3F},/*Reset MAC TRX*/ \
|
||||||
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, 0},/*check if removed later*/ \
|
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0},/*check if removed later*/ \
|
||||||
{0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT5, BIT5},/*Respond TxOK to scheduler*/ \
|
{0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5},/*Respond TxOK to scheduler*/ \
|
||||||
|
|
||||||
|
|
||||||
#define RTL8188E_TRANS_LPS_TO_ACT \
|
#define RTL8188E_TRANS_LPS_TO_ACT \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ \
|
||||||
{0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_SDIO,PWR_CMD_WRITE, 0xFF, 0x84}, /*SDIO RPWM*/\
|
{0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, 0xFF, 0x84}, /*SDIO RPWM*/\
|
||||||
{0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x84}, /*USB RPWM*/\
|
{0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84}, /*USB RPWM*/\
|
||||||
{0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x84}, /*PCIe RPWM*/\
|
{0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84}, /*PCIe RPWM*/\
|
||||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS}, /*Delay*/\
|
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS}, /*Delay*/\
|
||||||
{0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*. 0x08[4] = 0 switch TSF to 40M*/\
|
{0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, /*. 0x08[4] = 0 switch TSF to 40M*/\
|
||||||
{0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_POLLING, BIT7, 0}, /*Polling 0x109[7]=0 TSF in 40M*/\
|
{0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT7, 0}, /*Polling 0x109[7]=0 TSF in 40M*/\
|
||||||
{0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT6|BIT7, 0}, /*. 0x29[7:6] = 2b'00 enable BB clock*/\
|
{0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6|BIT7, 0}, /*. 0x29[7:6] = 2b'00 enable BB clock*/\
|
||||||
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, BIT1}, /*. 0x101[1] = 1*/\
|
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1}, /*. 0x101[1] = 1*/\
|
||||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF}, /*. 0x100[7:0] = 0xFF enable WMAC TRX*/\
|
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF}, /*. 0x100[7:0] = 0xFF enable WMAC TRX*/\
|
||||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0}, /*. 0x02[1:0] = 2b'11 enable BB macro*/\
|
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0}, /*. 0x02[1:0] = 2b'11 enable BB macro*/\
|
||||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0}, /*. 0x522 = 0*/
|
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0}, /*. 0x522 = 0*/
|
||||||
|
|
||||||
#define RTL8188E_TRANS_END \
|
#define RTL8188E_TRANS_END \
|
||||||
/* format */ \
|
/* format */ \
|
||||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
|
||||||
{0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,0,PWR_CMD_END, 0, 0}, /* */
|
{0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,0, PWR_CMD_END, 0, 0}, /* */
|
||||||
|
|
||||||
|
|
||||||
extern struct wl_pwr_cfg rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
extern struct wl_pwr_cfg rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||||
|
|
|
@ -24,82 +24,52 @@ Major Change History:
|
||||||
/* */
|
/* */
|
||||||
/* TX report 2 format in Rx desc */
|
/* TX report 2 format in Rx desc */
|
||||||
/* */
|
/* */
|
||||||
#define GET_TX_RPT2_DESC_PKT_LEN_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc, 0, 9)
|
#define GET_TX_RPT2_DESC_PKT_LEN_88E(__pRxStatusDesc) \
|
||||||
#define GET_TX_RPT2_DESC_MACID_VALID_1_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+16, 0, 32)
|
LE_BITS_TO_4BYTE( __pRxStatusDesc, 0, 9)
|
||||||
#define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+20, 0, 32)
|
#define GET_TX_RPT2_DESC_MACID_VALID_1_88E(__pRxStatusDesc) \
|
||||||
|
LE_BITS_TO_4BYTE( __pRxStatusDesc+16, 0, 32)
|
||||||
|
#define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__pRxStatusDesc) \
|
||||||
|
LE_BITS_TO_4BYTE( __pRxStatusDesc+20, 0, 32)
|
||||||
|
|
||||||
#define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr) LE_BITS_TO_4BYTE( __pAddr, 0, 16)
|
#define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr) \
|
||||||
#define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
LE_BITS_TO_4BYTE( __pAddr, 0, 16)
|
||||||
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) LE_BITS_TO_1BYTE( __pAddr+3, 0, 8)
|
#define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr) \
|
||||||
#define GET_TX_REPORT_TYPE1_RERTY_3(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4, 0, 8)
|
LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
||||||
#define GET_TX_REPORT_TYPE1_RERTY_4(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+1, 0, 8)
|
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) \
|
||||||
#define GET_TX_REPORT_TYPE1_DROP_0(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+2, 0, 8)
|
LE_BITS_TO_1BYTE( __pAddr+3, 0, 8)
|
||||||
#define GET_TX_REPORT_TYPE1_DROP_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+3, 0, 8)
|
#define GET_TX_REPORT_TYPE1_RERTY_3(__pAddr) \
|
||||||
|
LE_BITS_TO_1BYTE( __pAddr+4, 0, 8)
|
||||||
|
#define GET_TX_REPORT_TYPE1_RERTY_4(__pAddr) \
|
||||||
|
LE_BITS_TO_1BYTE( __pAddr+4+1, 0, 8)
|
||||||
|
#define GET_TX_REPORT_TYPE1_DROP_0(__pAddr) \
|
||||||
|
LE_BITS_TO_1BYTE( __pAddr+4+2, 0, 8)
|
||||||
|
#define GET_TX_REPORT_TYPE1_DROP_1(__pAddr) \
|
||||||
|
LE_BITS_TO_1BYTE( __pAddr+4+3, 0, 8)
|
||||||
|
|
||||||
/* End rate adaptive define */
|
/* End rate adaptive define */
|
||||||
|
|
||||||
void
|
void ODM_RASupport_Init(struct odm_dm_struct *dm_odm);
|
||||||
ODM_RASupport_Init(
|
|
||||||
struct odm_dm_struct *pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
int
|
int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm);
|
||||||
ODM_RAInfo_Init_all(
|
|
||||||
struct odm_dm_struct * pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
int
|
int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||||
ODM_RAInfo_Init(
|
|
||||||
struct odm_dm_struct *pDM_Odm,
|
|
||||||
u1Byte MacID
|
|
||||||
);
|
|
||||||
|
|
||||||
u1Byte
|
u1Byte ODM_RA_GetShortGI_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||||
ODM_RA_GetShortGI_8188E(
|
|
||||||
struct odm_dm_struct *pDM_Odm,
|
|
||||||
u1Byte MacID
|
|
||||||
);
|
|
||||||
|
|
||||||
u1Byte
|
u1Byte ODM_RA_GetDecisionRate_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||||
ODM_RA_GetDecisionRate_8188E(
|
|
||||||
struct odm_dm_struct *pDM_Odm,
|
|
||||||
u1Byte MacID
|
|
||||||
);
|
|
||||||
|
|
||||||
u1Byte
|
u1Byte ODM_RA_GetHwPwrStatus_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||||
ODM_RA_GetHwPwrStatus_8188E(
|
void ODM_RA_UpdateRateInfo_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID,
|
||||||
struct odm_dm_struct *pDM_Odm,
|
u1Byte RateID, u4Byte RateMask,
|
||||||
u1Byte MacID
|
u1Byte SGIEnable);
|
||||||
);
|
|
||||||
void
|
|
||||||
ODM_RA_UpdateRateInfo_8188E(
|
|
||||||
struct odm_dm_struct *pDM_Odm,
|
|
||||||
u1Byte MacID,
|
|
||||||
u1Byte RateID,
|
|
||||||
u4Byte RateMask,
|
|
||||||
u1Byte SGIEnable
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void ODM_RA_SetRSSI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid,
|
||||||
ODM_RA_SetRSSI_8188E(
|
u1Byte rssi);
|
||||||
struct odm_dm_struct * pDM_Odm,
|
|
||||||
u1Byte MacID,
|
|
||||||
u1Byte Rssi
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm,
|
||||||
ODM_RA_TxRPT2Handle_8188E(
|
u1Byte *txrpt_buf, u2Byte txrpt_len,
|
||||||
struct odm_dm_struct * pDM_Odm,
|
u4Byte validentry0, u4Byte validentry1);
|
||||||
pu1Byte TxRPT_Buf,
|
|
||||||
u2Byte TxRPT_Len,
|
|
||||||
u4Byte MacIDValidEntry0,
|
|
||||||
u4Byte MacIDValidEntry1
|
|
||||||
);
|
|
||||||
|
|
||||||
|
void ODM_RA_Set_TxRPT_Time(struct odm_dm_struct *dm_odm, u2Byte minRptTime);
|
||||||
|
|
||||||
void
|
|
||||||
ODM_RA_Set_TxRPT_Time(
|
|
||||||
struct odm_dm_struct * pDM_Odm,
|
|
||||||
u2Byte minRptTime
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,27 +27,18 @@
|
||||||
* AGC_TAB_1T.TXT
|
* AGC_TAB_1T.TXT
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
enum HAL_STATUS
|
enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *odm);
|
||||||
ODM_ReadAndConfig_AGC_TAB_1T_8188E(
|
|
||||||
struct odm_dm_struct * pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PHY_REG_1T.TXT
|
* PHY_REG_1T.TXT
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
enum HAL_STATUS
|
enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *odm);
|
||||||
ODM_ReadAndConfig_PHY_REG_1T_8188E(
|
|
||||||
struct odm_dm_struct * pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PHY_REG_PG.TXT
|
* PHY_REG_PG.TXT
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
void
|
void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm);
|
||||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(
|
|
||||||
struct odm_dm_struct * pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
* MAC_REG.TXT
|
* MAC_REG.TXT
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E( struct odm_dm_struct *pDM_Odm);
|
enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *pDM_Odm);
|
||||||
|
|
||||||
#endif /* end of HWIMG_SUPPORT */
|
#endif /* end of HWIMG_SUPPORT */
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
* RadioA_1T.TXT
|
* RadioA_1T.TXT
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct * pDM_Odm);
|
enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *odm);
|
||||||
|
|
||||||
#endif /* end of HWIMG_SUPPORT */
|
#endif /* end of HWIMG_SUPPORT */
|
||||||
|
|
|
@ -27,69 +27,37 @@
|
||||||
#define AVG_THERMAL_NUM_88E 4
|
#define AVG_THERMAL_NUM_88E 4
|
||||||
|
|
||||||
|
|
||||||
void
|
void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *pDM_Odm,
|
||||||
ODM_TxPwrTrackAdjust88E(
|
u1Byte Type, /* 0 = OFDM, 1 = CCK */
|
||||||
struct odm_dm_struct *pDM_Odm,
|
pu1Byte pDirection,/* 1 = +(incr) 2 = -(decr) */
|
||||||
u1Byte Type, /* 0 = OFDM, 1 = CCK */
|
pu4Byte pOutWriteVal); /* Tx tracking CCK/OFDM BB
|
||||||
pu1Byte pDirection, /* 1 = +(increase) 2 = -(decrease) */
|
* swing index adjust */
|
||||||
pu4Byte pOutWriteVal /* Tx tracking CCK/OFDM BB swing index adjust */
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void odm_TXPowerTrackingCallback_ThermalMeter_8188E(struct adapter *Adapter);
|
||||||
odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
|
||||||
struct adapter * Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* 1 7. IQK */
|
/* 1 7. IQK */
|
||||||
|
|
||||||
void
|
void PHY_IQCalibrate_8188E(struct adapter *Adapter, bool ReCovery);
|
||||||
PHY_IQCalibrate_8188E(struct adapter * Adapter, bool bReCovery);
|
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* LC calibrate */
|
/* LC calibrate */
|
||||||
/* */
|
void PHY_LCCalibrate_8188E(struct adapter *pAdapter);
|
||||||
void PHY_LCCalibrate_8188E( struct adapter * pAdapter);
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* AP calibrate */
|
/* AP calibrate */
|
||||||
/* */
|
void PHY_APCalibrate_8188E(struct adapter *pAdapter, s1Byte delta);
|
||||||
void PHY_APCalibrate_8188E(struct adapter * pAdapter, s1Byte delta);
|
|
||||||
|
|
||||||
void
|
void PHY_DigitalPredistortion_8188E(struct adapter * pAdapter);
|
||||||
PHY_DigitalPredistortion_8188E( struct adapter * pAdapter);
|
|
||||||
|
|
||||||
|
void _PHY_SaveADDARegisters(struct adapter *pAdapter, pu4Byte ADDAReg,
|
||||||
|
pu4Byte ADDABackup, u4Byte RegisterNum);
|
||||||
|
|
||||||
void
|
void _PHY_PathADDAOn(struct adapter *pAdapter, pu4Byte ADDAReg,
|
||||||
_PHY_SaveADDARegisters(
|
bool isPathAOn, bool is2T);
|
||||||
struct adapter * pAdapter,
|
|
||||||
pu4Byte ADDAReg,
|
|
||||||
pu4Byte ADDABackup,
|
|
||||||
u4Byte RegisterNum
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void _PHY_MACSettingCalibration(struct adapter *pAdapter, pu4Byte MACReg,
|
||||||
_PHY_PathADDAOn(
|
pu4Byte MACBackup);
|
||||||
struct adapter * pAdapter,
|
|
||||||
pu4Byte ADDAReg,
|
|
||||||
bool isPathAOn,
|
|
||||||
bool is2T
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
|
||||||
_PHY_MACSettingCalibration(
|
|
||||||
struct adapter * pAdapter,
|
|
||||||
pu4Byte MACReg,
|
|
||||||
pu4Byte MACBackup
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
_PHY_PathAStandBy(
|
|
||||||
struct adapter *pAdapter
|
|
||||||
);
|
|
||||||
|
|
||||||
|
void _PHY_PathAStandBy(struct adapter *pAdapter);
|
||||||
|
|
||||||
#endif /* #ifndef __HAL_PHY_RF_8188E_H__ */
|
#endif /* #ifndef __HAL_PHY_RF_8188E_H__ */
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
/* msk: N/A */
|
/* msk: N/A */
|
||||||
/* value: the unit of delay, 0: us, 1: ms */
|
/* value: the unit of delay, 0: us, 1: ms */
|
||||||
|
|
||||||
#define PWR_CMD_END 0x04
|
#define PWR_CMD_END 0x04
|
||||||
/* offset: N/A */
|
/* offset: N/A */
|
||||||
/* msk: N/A */
|
/* msk: N/A */
|
||||||
/* value: N/A */
|
/* value: N/A */
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
/*---------------------------------------------*/
|
/*---------------------------------------------*/
|
||||||
/* 3 The value of cut_msk: 8 bits */
|
/* 3 The value of cut_msk: 8 bits */
|
||||||
/*---------------------------------------------*/
|
/*---------------------------------------------*/
|
||||||
#define PWR_CUT_TESTCHIP_MSK BIT(0)
|
#define PWR_CUT_TESTCHIP_MSK BIT(0)
|
||||||
#define PWR_CUT_A_MSK BIT(1)
|
#define PWR_CUT_A_MSK BIT(1)
|
||||||
#define PWR_CUT_B_MSK BIT(2)
|
#define PWR_CUT_B_MSK BIT(2)
|
||||||
#define PWR_CUT_C_MSK BIT(3)
|
#define PWR_CUT_C_MSK BIT(3)
|
||||||
|
@ -115,20 +115,14 @@ struct wl_pwr_cfg {
|
||||||
#define GET_PWR_CFG_CUT_MASK(__PWR_CMD) __PWR_CMD.cut_msk
|
#define GET_PWR_CFG_CUT_MASK(__PWR_CMD) __PWR_CMD.cut_msk
|
||||||
#define GET_PWR_CFG_FAB_MASK(__PWR_CMD) __PWR_CMD.fab_msk
|
#define GET_PWR_CFG_FAB_MASK(__PWR_CMD) __PWR_CMD.fab_msk
|
||||||
#define GET_PWR_CFG_INTF_MASK(__PWR_CMD) __PWR_CMD.interface_msk
|
#define GET_PWR_CFG_INTF_MASK(__PWR_CMD) __PWR_CMD.interface_msk
|
||||||
#define GET_PWR_CFG_BASE(__PWR_CMD) __PWR_CMD.base
|
#define GET_PWR_CFG_BASE(__PWR_CMD) __PWR_CMD.base
|
||||||
#define GET_PWR_CFG_CMD(__PWR_CMD) __PWR_CMD.cmd
|
#define GET_PWR_CFG_CMD(__PWR_CMD) __PWR_CMD.cmd
|
||||||
#define GET_PWR_CFG_MASK(__PWR_CMD) __PWR_CMD.msk
|
#define GET_PWR_CFG_MASK(__PWR_CMD) __PWR_CMD.msk
|
||||||
#define GET_PWR_CFG_VALUE(__PWR_CMD) __PWR_CMD.value
|
#define GET_PWR_CFG_VALUE(__PWR_CMD) __PWR_CMD.value
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* Prototype of protected function. */
|
||||||
/* Prototype of protected function. */
|
u8 HalPwrSeqCmdParsing(struct adapter *padapter, u8 CutVersion, u8 FabVersion,
|
||||||
/* */
|
u8 InterfaceType, struct wl_pwr_cfg PwrCfgCmd[]);
|
||||||
u8 HalPwrSeqCmdParsing(
|
|
||||||
struct adapter * padapter,
|
|
||||||
u8 CutVersion,
|
|
||||||
u8 FabVersion,
|
|
||||||
u8 InterfaceType,
|
|
||||||
struct wl_pwr_cfg PwrCfgCmd[]);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,33 +21,33 @@
|
||||||
#define __HAL_VERSION_DEF_H__
|
#define __HAL_VERSION_DEF_H__
|
||||||
|
|
||||||
enum HAL_IC_TYPE {
|
enum HAL_IC_TYPE {
|
||||||
CHIP_8192S = 0,
|
CHIP_8192S = 0,
|
||||||
CHIP_8188C = 1,
|
CHIP_8188C = 1,
|
||||||
CHIP_8192C = 2,
|
CHIP_8192C = 2,
|
||||||
CHIP_8192D = 3,
|
CHIP_8192D = 3,
|
||||||
CHIP_8723A = 4,
|
CHIP_8723A = 4,
|
||||||
CHIP_8188E = 5,
|
CHIP_8188E = 5,
|
||||||
CHIP_8881A = 6,
|
CHIP_8881A = 6,
|
||||||
CHIP_8812A = 7,
|
CHIP_8812A = 7,
|
||||||
CHIP_8821A = 8,
|
CHIP_8821A = 8,
|
||||||
CHIP_8723B = 9,
|
CHIP_8723B = 9,
|
||||||
CHIP_8192E = 10,
|
CHIP_8192E = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HAL_CHIP_TYPE {
|
enum HAL_CHIP_TYPE {
|
||||||
TEST_CHIP = 0,
|
TEST_CHIP = 0,
|
||||||
NORMAL_CHIP = 1,
|
NORMAL_CHIP = 1,
|
||||||
FPGA = 2,
|
FPGA = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HAL_CUT_VERSION {
|
enum HAL_CUT_VERSION {
|
||||||
A_CUT_VERSION = 0,
|
A_CUT_VERSION = 0,
|
||||||
B_CUT_VERSION = 1,
|
B_CUT_VERSION = 1,
|
||||||
C_CUT_VERSION = 2,
|
C_CUT_VERSION = 2,
|
||||||
D_CUT_VERSION = 3,
|
D_CUT_VERSION = 3,
|
||||||
E_CUT_VERSION = 4,
|
E_CUT_VERSION = 4,
|
||||||
F_CUT_VERSION = 5,
|
F_CUT_VERSION = 5,
|
||||||
G_CUT_VERSION = 6,
|
G_CUT_VERSION = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HAL_VENDOR {
|
enum HAL_VENDOR {
|
||||||
|
@ -76,64 +76,92 @@ struct HAL_VERSION {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Get element */
|
/* Get element */
|
||||||
#define GET_CVID_IC_TYPE(version) (((version).ICType))
|
#define GET_CVID_IC_TYPE(version) (((version).ICType))
|
||||||
#define GET_CVID_CHIP_TYPE(version) (((version).ChipType))
|
#define GET_CVID_CHIP_TYPE(version) (((version).ChipType))
|
||||||
#define GET_CVID_RF_TYPE(version) (((version).RFType))
|
#define GET_CVID_RF_TYPE(version) (((version).RFType))
|
||||||
#define GET_CVID_MANUFACTUER(version) (((version).VendorType))
|
#define GET_CVID_MANUFACTUER(version) (((version).VendorType))
|
||||||
#define GET_CVID_CUT_VERSION(version) (((version).CUTVersion))
|
#define GET_CVID_CUT_VERSION(version) (((version).CUTVersion))
|
||||||
#define GET_CVID_ROM_VERSION(version) (((version).ROMVer) & ROM_VERSION_MASK)
|
#define GET_CVID_ROM_VERSION(version) (((version).ROMVer) & ROM_VERSION_MASK)
|
||||||
|
|
||||||
/* */
|
|
||||||
/* Common Macro. -- */
|
/* Common Macro. -- */
|
||||||
/* */
|
|
||||||
/* HAL_VERSION VersionID */
|
/* HAL_VERSION VersionID */
|
||||||
|
|
||||||
/* HAL_IC_TYPE_E */
|
/* HAL_IC_TYPE_E */
|
||||||
#define IS_81XXC(version) (((GET_CVID_IC_TYPE(version) == CHIP_8192C)||(GET_CVID_IC_TYPE(version) == CHIP_8188C))? true : false)
|
#define IS_81XXC(version) \
|
||||||
#define IS_8723_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723A)? true : false)
|
(((GET_CVID_IC_TYPE(version) == CHIP_8192C) || \
|
||||||
#define IS_92D(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192D)? true : false)
|
(GET_CVID_IC_TYPE(version) == CHIP_8188C)) ? true : false)
|
||||||
#define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E)? true : false)
|
#define IS_8723_SERIES(version) \
|
||||||
|
((GET_CVID_IC_TYPE(version) == CHIP_8723A) ? true : false)
|
||||||
|
#define IS_92D(version) \
|
||||||
|
((GET_CVID_IC_TYPE(version) == CHIP_8192D) ? true : false)
|
||||||
|
#define IS_8188E(version) \
|
||||||
|
((GET_CVID_IC_TYPE(version) == CHIP_8188E) ? true : false)
|
||||||
|
|
||||||
/* HAL_CHIP_TYPE_E */
|
/* HAL_CHIP_TYPE_E */
|
||||||
#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==TEST_CHIP)? true: false)
|
#define IS_TEST_CHIP(version) \
|
||||||
#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==NORMAL_CHIP)? true: false)
|
((GET_CVID_CHIP_TYPE(version) == TEST_CHIP) ? true : false)
|
||||||
|
#define IS_NORMAL_CHIP(version) \
|
||||||
|
((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? true : false)
|
||||||
|
|
||||||
/* HAL_CUT_VERSION_E */
|
/* HAL_CUT_VERSION_E */
|
||||||
#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
|
#define IS_A_CUT(version) \
|
||||||
#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false)
|
((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
|
||||||
#define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false)
|
#define IS_B_CUT(version) \
|
||||||
#define IS_D_CUT(version) ((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? true : false)
|
((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false)
|
||||||
#define IS_E_CUT(version) ((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? true : false)
|
#define IS_C_CUT(version) \
|
||||||
|
((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false)
|
||||||
|
#define IS_D_CUT(version) \
|
||||||
|
((GET_CVID_CUT_VERSION(version) == D_CUT_VERSION) ? true : false)
|
||||||
|
#define IS_E_CUT(version) \
|
||||||
|
((GET_CVID_CUT_VERSION(version) == E_CUT_VERSION) ? true : false)
|
||||||
|
|
||||||
|
|
||||||
/* HAL_VENDOR_E */
|
/* HAL_VENDOR_E */
|
||||||
#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC)? true: false)
|
#define IS_CHIP_VENDOR_TSMC(version) \
|
||||||
#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC)? true: false)
|
((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? true : false)
|
||||||
|
#define IS_CHIP_VENDOR_UMC(version) \
|
||||||
|
((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? true : false)
|
||||||
|
|
||||||
/* HAL_RF_TYPE_E */
|
/* HAL_RF_TYPE_E */
|
||||||
#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? true : false )
|
#define IS_1T1R(version) \
|
||||||
#define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? true : false)
|
((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? true : false)
|
||||||
#define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? true : false)
|
#define IS_1T2R(version) \
|
||||||
|
((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? true : false)
|
||||||
|
#define IS_2T2R(version) \
|
||||||
|
((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? true : false)
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* Chip version Macro. -- */
|
/* Chip version Macro. -- */
|
||||||
/* */
|
#define IS_81XXC_TEST_CHIP(version) \
|
||||||
#define IS_81XXC_TEST_CHIP(version) ((IS_81XXC(version) && (!IS_NORMAL_CHIP(version)))? true: false)
|
((IS_81XXC(version) && (!IS_NORMAL_CHIP(version))) ? true : false)
|
||||||
|
|
||||||
#define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? true : false)
|
#define IS_92C_SERIAL(version) \
|
||||||
#define IS_81xxC_VENDOR_UMC_A_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_A_CUT(version) ? true : false) : false): false)
|
((IS_81XXC(version) && IS_2T2R(version)) ? true : false)
|
||||||
#define IS_81xxC_VENDOR_UMC_B_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_B_CUT(version) ? true : false) : false): false)
|
#define IS_81xxC_VENDOR_UMC_A_CUT(version) \
|
||||||
#define IS_81xxC_VENDOR_UMC_C_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_C_CUT(version) ? true : false) : false): false)
|
(IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? \
|
||||||
|
(IS_A_CUT(version) ? true : false) : false): false)
|
||||||
|
#define IS_81xxC_VENDOR_UMC_B_CUT(version) \
|
||||||
|
(IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? \
|
||||||
|
(IS_B_CUT(version) ? true : false) : false): false)
|
||||||
|
#define IS_81xxC_VENDOR_UMC_C_CUT(version) \
|
||||||
|
(IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? \
|
||||||
|
(IS_C_CUT(version) ? true : false) : false): false)
|
||||||
|
|
||||||
#define IS_NORMAL_CHIP92D(version) (( IS_92D(version))?((GET_CVID_CHIP_TYPE(version)==NORMAL_CHIP)? true: false):false)
|
#define IS_NORMAL_CHIP92D(version) \
|
||||||
|
(( IS_92D(version)) ? \
|
||||||
|
((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP)? true : false) : false)
|
||||||
|
|
||||||
#define IS_92D_SINGLEPHY(version) ((IS_92D(version)) ? (IS_2T2R(version) ? true: false) : false)
|
#define IS_92D_SINGLEPHY(version) \
|
||||||
#define IS_92D_C_CUT(version) ((IS_92D(version)) ? (IS_C_CUT(version) ? true : false) : false)
|
((IS_92D(version)) ? (IS_2T2R(version) ? true: false) : false)
|
||||||
#define IS_92D_D_CUT(version) ((IS_92D(version)) ? (IS_D_CUT(version) ? true : false) : false)
|
#define IS_92D_C_CUT(version) \
|
||||||
#define IS_92D_E_CUT(version) ((IS_92D(version)) ? (IS_E_CUT(version) ? true : false) : false)
|
((IS_92D(version)) ? (IS_C_CUT(version) ? true : false) : false)
|
||||||
|
#define IS_92D_D_CUT(version) \
|
||||||
|
((IS_92D(version)) ? (IS_D_CUT(version) ? true : false) : false)
|
||||||
|
#define IS_92D_E_CUT(version) \
|
||||||
|
((IS_92D(version)) ? (IS_E_CUT(version) ? true : false) : false)
|
||||||
|
|
||||||
#define IS_8723A_A_CUT(version) ((IS_8723_SERIES(version)) ? ( IS_A_CUT(version)?true : false) : false)
|
#define IS_8723A_A_CUT(version) \
|
||||||
#define IS_8723A_B_CUT(version) ((IS_8723_SERIES(version)) ? ( IS_B_CUT(version)?true : false) : false)
|
((IS_8723_SERIES(version)) ? ( IS_A_CUT(version)?true : false) : false)
|
||||||
|
#define IS_8723A_B_CUT(version) \
|
||||||
|
((IS_8723_SERIES(version)) ? ( IS_B_CUT(version)?true : false) : false)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,22 +25,22 @@
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#define NDIS_OID uint
|
#define NDIS_OID uint
|
||||||
#define NDIS_STATUS uint
|
|
||||||
|
|
||||||
#define UCHAR u8
|
#define UCHAR u8
|
||||||
#define USHORT u16
|
#define USHORT u16
|
||||||
#define UINT u32
|
#define UINT u32
|
||||||
#define ULONG u32
|
#define ULONG u32
|
||||||
|
|
||||||
typedef void (*proc_t)(void*);
|
typedef void (*proc_t)(void *);
|
||||||
|
|
||||||
#define FIELD_OFFSET(s,field) ((ssize_t)&((s*)(0))->field)
|
#define FIELD_OFFSET(s, field) ((ssize_t)&((s *)(0))->field)
|
||||||
|
|
||||||
#define MEM_ALIGNMENT_OFFSET (sizeof (size_t))
|
#define MEM_ALIGNMENT_OFFSET (sizeof(size_t))
|
||||||
#define MEM_ALIGNMENT_PADDING (sizeof(size_t) - 1)
|
#define MEM_ALIGNMENT_PADDING (sizeof(size_t) - 1)
|
||||||
|
|
||||||
/* port from fw by thomas */
|
/* port from fw */
|
||||||
/* TODO: Belows are Sync from SD7-Driver. It is necessary to check correctness */
|
/* TODO: Macros Below are Sync from SD7-Driver. It is necessary
|
||||||
|
* to check correctness */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call endian free function when
|
* Call endian free function when
|
||||||
|
@ -67,13 +67,20 @@ typedef void (*proc_t)(void*);
|
||||||
EF4BYTE(*(_ptr))
|
EF4BYTE(*(_ptr))
|
||||||
|
|
||||||
/* Write data to memory */
|
/* Write data to memory */
|
||||||
#define WRITEEF1BYTE(_ptr, _val) \
|
#define WRITEEF1BYTE(_ptr, _val) \
|
||||||
(*((u8 *)(_ptr))) = EF1BYTE(_val)
|
do { \
|
||||||
|
(*((u8 *)(_ptr))) = EF1BYTE(_val) \
|
||||||
|
} while (0)
|
||||||
/* Write le data to memory in host ordering */
|
/* Write le data to memory in host ordering */
|
||||||
#define WRITEEF2BYTE(_ptr, _val) \
|
#define WRITEEF2BYTE(_ptr, _val) \
|
||||||
(*((u16 *)(_ptr))) = EF2BYTE(_val)
|
do { \
|
||||||
#define WRITEEF4BYTE(_ptr, _val) \
|
(*((u16 *)(_ptr))) = EF2BYTE(_val) \
|
||||||
(*((u32 *)(_ptr))) = EF2BYTE(_val)
|
} while (0)
|
||||||
|
|
||||||
|
#define WRITEEF4BYTE(_ptr, _val) \
|
||||||
|
do { \
|
||||||
|
(*((u32 *)(_ptr))) = EF2BYTE(_val) \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* Create a bit mask
|
/* Create a bit mask
|
||||||
* Examples:
|
* Examples:
|
||||||
|
@ -155,23 +162,31 @@ value to host byte ordering.*/
|
||||||
* Set subfield of little-endian 4-byte value to specified value.
|
* Set subfield of little-endian 4-byte value to specified value.
|
||||||
*/
|
*/
|
||||||
#define SET_BITS_TO_LE_4BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
#define SET_BITS_TO_LE_4BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||||
*((u32 *)(__pstart)) = \
|
do { \
|
||||||
( \
|
*((u32 *)(__pstart)) = \
|
||||||
|
( \
|
||||||
LE_BITS_CLEARED_TO_4BYTE(__pstart, __bitoffset, __bitlen) | \
|
LE_BITS_CLEARED_TO_4BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||||
((((u32)__val) & BIT_LEN_MASK_32(__bitlen)) << (__bitoffset)) \
|
((((u32)__val) & BIT_LEN_MASK_32(__bitlen)) << (__bitoffset)) \
|
||||||
);
|
); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define SET_BITS_TO_LE_2BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
#define SET_BITS_TO_LE_2BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||||
*((u16 *)(__pstart)) = \
|
do { \
|
||||||
( \
|
*((u16 *)(__pstart)) = \
|
||||||
|
( \
|
||||||
LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
|
LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||||
((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
|
((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
|
||||||
);
|
); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define SET_BITS_TO_LE_1BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
#define SET_BITS_TO_LE_1BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||||
*((u8 *)(__pstart)) = EF1BYTE \
|
do { \
|
||||||
( \
|
*((u8 *)(__pstart)) = EF1BYTE \
|
||||||
|
( \
|
||||||
LE_BITS_CLEARED_TO_1BYTE(__pstart, __bitoffset, __bitlen) | \
|
LE_BITS_CLEARED_TO_1BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||||
((((u8)__val) & BIT_LEN_MASK_8(__bitlen)) << (__bitoffset)) \
|
((((u8)__val) & BIT_LEN_MASK_8(__bitlen)) << (__bitoffset)) \
|
||||||
);
|
); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* Get the N-bytes aligment offset from the current length */
|
/* Get the N-bytes aligment offset from the current length */
|
||||||
#define N_BYTE_ALIGMENT(__value, __aligment) ((__aligment == 1) ? \
|
#define N_BYTE_ALIGMENT(__value, __aligment) ((__aligment == 1) ? \
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#ifndef __CIRC_BUF_H_
|
#ifndef __CIRC_BUF_H_
|
||||||
#define __CIRC_BUF_H_ 1
|
#define __CIRC_BUF_H_ 1
|
||||||
|
|
||||||
#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))
|
//#define CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size)-1))
|
||||||
|
|
||||||
#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
|
//#define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), ((head)+1), (size))
|
||||||
|
|
||||||
#endif /* _CIRC_BUF_H_ */
|
#endif /* _CIRC_BUF_H_ */
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
extern int _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
extern int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
|
||||||
extern int _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
extern int _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
||||||
extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv);
|
extern void _rtw_free_evt_priv(struct evt_priv *pevtpriv);
|
||||||
extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
|
extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
|
||||||
extern int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
|
extern int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
|
||||||
extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue);
|
extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*-------------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
|
||||||
For type defines and data structure defines
|
For type defines and data structure defines
|
||||||
|
|
||||||
--------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __DRV_TYPES_H__
|
#ifndef __DRV_TYPES_H__
|
||||||
|
@ -31,15 +31,6 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <wlan_bssdef.h>
|
#include <wlan_bssdef.h>
|
||||||
#include <drv_types_linux.h>
|
#include <drv_types_linux.h>
|
||||||
|
|
||||||
enum _NIC_VERSION {
|
|
||||||
|
|
||||||
RTL8711_NIC,
|
|
||||||
RTL8712_NIC,
|
|
||||||
RTL8713_NIC,
|
|
||||||
RTL8716_NIC
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <rtw_ht.h>
|
#include <rtw_ht.h>
|
||||||
#include <rtw_cmd.h>
|
#include <rtw_cmd.h>
|
||||||
#include <wlan_bssdef.h>
|
#include <wlan_bssdef.h>
|
||||||
|
@ -62,26 +53,29 @@ enum _NIC_VERSION {
|
||||||
#include <rtw_p2p.h>
|
#include <rtw_p2p.h>
|
||||||
#include <rtw_ap.h>
|
#include <rtw_ap.h>
|
||||||
#include <rtw_mp.h>
|
#include <rtw_mp.h>
|
||||||
|
|
||||||
#include <rtw_br_ext.h>
|
#include <rtw_br_ext.h>
|
||||||
#define SPEC_DEV_ID_NONE BIT(0)
|
|
||||||
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
|
||||||
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
|
|
||||||
#define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
|
|
||||||
#define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
|
|
||||||
#define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
|
|
||||||
|
|
||||||
struct specific_device_id{
|
|
||||||
|
|
||||||
u32 flags;
|
|
||||||
|
|
||||||
u16 idVendor;
|
|
||||||
u16 idProduct;
|
|
||||||
|
|
||||||
|
enum _NIC_VERSION {
|
||||||
|
RTL8711_NIC,
|
||||||
|
RTL8712_NIC,
|
||||||
|
RTL8713_NIC,
|
||||||
|
RTL8716_NIC
|
||||||
};
|
};
|
||||||
|
|
||||||
struct registry_priv
|
#define SPEC_DEV_ID_NONE BIT(0)
|
||||||
{
|
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
||||||
|
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
|
||||||
|
#define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
|
||||||
|
#define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
|
||||||
|
#define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
|
||||||
|
|
||||||
|
struct specific_device_id {
|
||||||
|
u32 flags;
|
||||||
|
u16 idVendor;
|
||||||
|
u16 idProduct;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct registry_priv {
|
||||||
u8 chip_version;
|
u8 chip_version;
|
||||||
u8 rfintfs;
|
u8 rfintfs;
|
||||||
u8 lbkmode;
|
u8 lbkmode;
|
||||||
|
@ -96,7 +90,7 @@ struct registry_priv
|
||||||
u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
|
u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
|
||||||
u8 vcs_type;/* RTS/CTS, CTS-to-self */
|
u8 vcs_type;/* RTS/CTS, CTS-to-self */
|
||||||
u16 rts_thresh;
|
u16 rts_thresh;
|
||||||
u16 frag_thresh;
|
u16 frag_thresh;
|
||||||
u8 adhoc_tx_pwr;
|
u8 adhoc_tx_pwr;
|
||||||
u8 soft_ap;
|
u8 soft_ap;
|
||||||
u8 power_mgnt;
|
u8 power_mgnt;
|
||||||
|
@ -128,8 +122,8 @@ struct registry_priv
|
||||||
u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
|
u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
|
||||||
u8 lowrate_two_xmit;
|
u8 lowrate_two_xmit;
|
||||||
|
|
||||||
u8 rf_config ;
|
u8 rf_config;
|
||||||
u8 low_power ;
|
u8 low_power;
|
||||||
|
|
||||||
u8 wifi_spec;/* !turbo_mode */
|
u8 wifi_spec;/* !turbo_mode */
|
||||||
|
|
||||||
|
@ -151,28 +145,27 @@ struct registry_priv
|
||||||
|
|
||||||
u8 hw_wps_pbc;/* 0:disable,1:enable */
|
u8 hw_wps_pbc;/* 0:disable,1:enable */
|
||||||
|
|
||||||
u8 max_roaming_times; /* the max number driver will try to roaming */
|
u8 max_roaming_times; /* the max number driver will try */
|
||||||
|
|
||||||
u8 fw_iol; /* enable iol without other concern */
|
u8 fw_iol; /* enable iol without other concern */
|
||||||
|
|
||||||
u8 enable80211d;
|
u8 enable80211d;
|
||||||
|
|
||||||
u8 ifname[16];
|
u8 ifname[16];
|
||||||
u8 if2name[16];
|
u8 if2name[16];
|
||||||
|
|
||||||
u8 notch_filter;
|
u8 notch_filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* For registry parameters */
|
/* For registry parameters */
|
||||||
#define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv,field))
|
#define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv, field))
|
||||||
#define RGTRY_SZ(field) sizeof(((struct registry_priv*) 0)->field)
|
#define RGTRY_SZ(field) sizeof(((struct registry_priv *)0)->field)
|
||||||
#define BSSID_OFT(field) ((ULONG)FIELD_OFFSET(struct wlan_bssid_ex,field))
|
#define BSSID_OFT(field) ((ULONG)FIELD_OFFSET(struct wlan_bssid_ex, field))
|
||||||
#define BSSID_SZ(field) sizeof(((Pstruct wlan_bssid_ex) 0)->field)
|
#define BSSID_SZ(field) sizeof(((struct wlan_bssid_ex *)0)->field)
|
||||||
|
|
||||||
#define MAX_CONTINUAL_URB_ERR 4
|
#define MAX_CONTINUAL_URB_ERR 4
|
||||||
|
|
||||||
struct dvobj_priv
|
struct dvobj_priv {
|
||||||
{
|
|
||||||
struct adapter *if1;
|
struct adapter *if1;
|
||||||
struct adapter *if2;
|
struct adapter *if2;
|
||||||
|
|
||||||
|
@ -198,8 +191,8 @@ struct dvobj_priv
|
||||||
struct semaphore usb_suspend_sema;
|
struct semaphore usb_suspend_sema;
|
||||||
struct mutex usb_vendor_req_mutex;
|
struct mutex usb_vendor_req_mutex;
|
||||||
|
|
||||||
u8 * usb_alloc_vendor_req_buf;
|
u8 *usb_alloc_vendor_req_buf;
|
||||||
u8 * usb_vendor_req_buf;
|
u8 *usb_vendor_req_buf;
|
||||||
|
|
||||||
struct usb_interface *pusbintf;
|
struct usb_interface *pusbintf;
|
||||||
struct usb_device *pusbdev;
|
struct usb_device *pusbdev;
|
||||||
|
@ -209,7 +202,8 @@ struct dvobj_priv
|
||||||
|
|
||||||
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||||
{
|
{
|
||||||
/* todo: get interface type from dvobj and the return the dev accordingly */
|
/* todo: get interface type from dvobj and the return
|
||||||
|
* the dev accordingly */
|
||||||
return &dvobj->pusbintf->dev;
|
return &dvobj->pusbintf->dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +226,8 @@ enum driver_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct adapter {
|
struct adapter {
|
||||||
int DriverState;/* for disable driver using module, use dongle to replace module. */
|
int DriverState;/* for disable driver using module, use dongle toi
|
||||||
|
* replace module. */
|
||||||
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
|
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
|
||||||
int bDongle;/* build-in module or external dongle */
|
int bDongle;/* build-in module or external dongle */
|
||||||
u16 chip_type;
|
u16 chip_type;
|
||||||
|
@ -244,7 +239,6 @@ struct adapter {
|
||||||
struct mlme_ext_priv mlmeextpriv;
|
struct mlme_ext_priv mlmeextpriv;
|
||||||
struct cmd_priv cmdpriv;
|
struct cmd_priv cmdpriv;
|
||||||
struct evt_priv evtpriv;
|
struct evt_priv evtpriv;
|
||||||
/* struct io_queue *pio_queue; */
|
|
||||||
struct io_priv iopriv;
|
struct io_priv iopriv;
|
||||||
struct xmit_priv xmitpriv;
|
struct xmit_priv xmitpriv;
|
||||||
struct recv_priv recvpriv;
|
struct recv_priv recvpriv;
|
||||||
|
@ -270,7 +264,7 @@ struct adapter {
|
||||||
|
|
||||||
s32 bDriverStopped;
|
s32 bDriverStopped;
|
||||||
s32 bSurpriseRemoved;
|
s32 bSurpriseRemoved;
|
||||||
s32 bCardDisableWOHSM;
|
s32 bCardDisableWOHSM;
|
||||||
|
|
||||||
u32 IsrContent;
|
u32 IsrContent;
|
||||||
u32 ImrContent;
|
u32 ImrContent;
|
||||||
|
@ -285,8 +279,8 @@ struct adapter {
|
||||||
void *evtThread;
|
void *evtThread;
|
||||||
void *xmitThread;
|
void *xmitThread;
|
||||||
void *recvThread;
|
void *recvThread;
|
||||||
void (*intf_start)(struct adapter * adapter);
|
void (*intf_start)(struct adapter *adapter);
|
||||||
void (*intf_stop)(struct adapter * adapter);
|
void (*intf_stop)(struct adapter *adapter);
|
||||||
struct net_device *pnetdev;
|
struct net_device *pnetdev;
|
||||||
|
|
||||||
/* used by rtw_rereg_nd_name related function */
|
/* used by rtw_rereg_nd_name related function */
|
||||||
|
@ -308,12 +302,12 @@ struct adapter {
|
||||||
u8 bReadPortCancel;
|
u8 bReadPortCancel;
|
||||||
u8 bWritePortCancel;
|
u8 bWritePortCancel;
|
||||||
u8 bRxRSSIDisplay;
|
u8 bRxRSSIDisplay;
|
||||||
/* Added by Albert 2012/10/26 */
|
/* The driver will show up the desired channel number
|
||||||
/* The driver will show up the desired channel number when this flag is 1. */
|
* when this flag is 1. */
|
||||||
u8 bNotifyChannelChange;
|
u8 bNotifyChannelChange;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
/* Added by Albert 2012/12/06 */
|
/* The driver will show the current P2P status when the
|
||||||
/* The driver will show the current P2P status when the upper application reads it. */
|
* upper application reads it. */
|
||||||
u8 bShowGetP2PState;
|
u8 bShowGetP2PState;
|
||||||
#endif
|
#endif
|
||||||
struct adapter *pbuddy_adapter;
|
struct adapter *pbuddy_adapter;
|
||||||
|
@ -331,7 +325,7 @@ struct adapter {
|
||||||
unsigned char br_ip[4];
|
unsigned char br_ip[4];
|
||||||
struct br_ext_info ethBrExtInfo;
|
struct br_ext_info ethBrExtInfo;
|
||||||
|
|
||||||
u8 fix_rate;
|
u8 fix_rate;
|
||||||
|
|
||||||
unsigned char in_cta_test;
|
unsigned char in_cta_test;
|
||||||
};
|
};
|
||||||
|
@ -340,10 +334,9 @@ struct adapter {
|
||||||
|
|
||||||
int rtw_handle_dualmac(struct adapter *adapter, bool init);
|
int rtw_handle_dualmac(struct adapter *adapter, bool init);
|
||||||
|
|
||||||
__inline static u8 *myid(struct eeprom_priv *peepriv)
|
static inline u8 *myid(struct eeprom_priv *peepriv)
|
||||||
{
|
{
|
||||||
return (peepriv->mac_addr);
|
return peepriv->mac_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* __DRV_TYPES_H__ */
|
#endif /* __DRV_TYPES_H__ */
|
||||||
|
|
|
@ -21,21 +21,22 @@
|
||||||
#ifndef __INC_ETHERNET_H
|
#ifndef __INC_ETHERNET_H
|
||||||
#define __INC_ETHERNET_H
|
#define __INC_ETHERNET_H
|
||||||
|
|
||||||
#define ETHERNET_ADDRESS_LENGTH 6 /* Ethernet Address Length */
|
#define ETHERNET_ADDRESS_LENGTH 6 /* Ethernet Address Length */
|
||||||
#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */
|
#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */
|
||||||
#define LLC_HEADER_SIZE 6 /* LLC Header Length */
|
#define LLC_HEADER_SIZE 6 /* LLC Header Length */
|
||||||
#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */
|
#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */
|
||||||
#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Minimum Ethernet Packet Size */
|
#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min Ethernet Packet Size */
|
||||||
#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* Maximum Ethernet Packet Size */
|
#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* Max Ethernet Packet Size */
|
||||||
|
|
||||||
#define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01) != 0) /* Is Multicast Address? */
|
/* Is Multicast Address? */
|
||||||
#define RT_ETH_IS_BROADCAST(_pAddr) ( \
|
#define RT_ETH_IS_MULTICAST(_addr) ((((UCHAR *)(_addr))[0]&0x01) != 0)
|
||||||
((UCHAR *)(_pAddr))[0]==0xff && \
|
#define RT_ETH_IS_BROADCAST(_addr) ( \
|
||||||
((UCHAR *)(_pAddr))[1]==0xff && \
|
((UCHAR *)(_addr))[0] == 0xff && \
|
||||||
((UCHAR *)(_pAddr))[2]==0xff && \
|
((UCHAR *)(_addr))[1] == 0xff && \
|
||||||
((UCHAR *)(_pAddr))[3]==0xff && \
|
((UCHAR *)(_addr))[2] == 0xff && \
|
||||||
((UCHAR *)(_pAddr))[4]==0xff && \
|
((UCHAR *)(_addr))[3] == 0xff && \
|
||||||
((UCHAR *)(_pAddr))[5]==0xff) /* Is Broadcast Address? */
|
((UCHAR *)(_addr))[4] == 0xff && \
|
||||||
|
((UCHAR *)(_addr))[5] == 0xff) /* Is Broadcast Address? */
|
||||||
|
|
||||||
|
|
||||||
#endif /* #ifndef __INC_ETHERNET_H */
|
#endif /* #ifndef __INC_ETHERNET_H */
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
#include <TypeDef.h>
|
#include <TypeDef.h>
|
||||||
|
|
||||||
|
|
||||||
void _lbk_cmd(struct adapter * Adapter);
|
void _lbk_cmd(struct adapter *adapter);
|
||||||
|
|
||||||
void _lbk_rsp(struct adapter * Adapter);
|
void _lbk_rsp(struct adapter *adapter);
|
||||||
|
|
||||||
void _lbk_evt(IN struct adapter * Adapter);
|
void _lbk_evt(IN struct adapter *adapter);
|
||||||
|
|
||||||
void h2c_event_callback(unsigned char *dev, unsigned char *pbuf);
|
void h2c_event_callback(unsigned char *dev, unsigned char *pbuf);
|
||||||
|
|
|
@ -26,84 +26,83 @@
|
||||||
/* CCK */
|
/* CCK */
|
||||||
#define RATR_1M 0x00000001
|
#define RATR_1M 0x00000001
|
||||||
#define RATR_2M 0x00000002
|
#define RATR_2M 0x00000002
|
||||||
#define RATR_55M 0x00000004
|
#define RATR_55M 0x00000004
|
||||||
#define RATR_11M 0x00000008
|
#define RATR_11M 0x00000008
|
||||||
/* OFDM */
|
/* OFDM */
|
||||||
#define RATR_6M 0x00000010
|
#define RATR_6M 0x00000010
|
||||||
#define RATR_9M 0x00000020
|
#define RATR_9M 0x00000020
|
||||||
#define RATR_12M 0x00000040
|
#define RATR_12M 0x00000040
|
||||||
#define RATR_18M 0x00000080
|
#define RATR_18M 0x00000080
|
||||||
#define RATR_24M 0x00000100
|
#define RATR_24M 0x00000100
|
||||||
#define RATR_36M 0x00000200
|
#define RATR_36M 0x00000200
|
||||||
#define RATR_48M 0x00000400
|
#define RATR_48M 0x00000400
|
||||||
#define RATR_54M 0x00000800
|
#define RATR_54M 0x00000800
|
||||||
/* MCS 1 Spatial Stream */
|
/* MCS 1 Spatial Stream */
|
||||||
#define RATR_MCS0 0x00001000
|
#define RATR_MCS0 0x00001000
|
||||||
#define RATR_MCS1 0x00002000
|
#define RATR_MCS1 0x00002000
|
||||||
#define RATR_MCS2 0x00004000
|
#define RATR_MCS2 0x00004000
|
||||||
#define RATR_MCS3 0x00008000
|
#define RATR_MCS3 0x00008000
|
||||||
#define RATR_MCS4 0x00010000
|
#define RATR_MCS4 0x00010000
|
||||||
#define RATR_MCS5 0x00020000
|
#define RATR_MCS5 0x00020000
|
||||||
#define RATR_MCS6 0x00040000
|
#define RATR_MCS6 0x00040000
|
||||||
#define RATR_MCS7 0x00080000
|
#define RATR_MCS7 0x00080000
|
||||||
/* MCS 2 Spatial Stream */
|
/* MCS 2 Spatial Stream */
|
||||||
#define RATR_MCS8 0x00100000
|
#define RATR_MCS8 0x00100000
|
||||||
#define RATR_MCS9 0x00200000
|
#define RATR_MCS9 0x00200000
|
||||||
#define RATR_MCS10 0x00400000
|
#define RATR_MCS10 0x00400000
|
||||||
#define RATR_MCS11 0x00800000
|
#define RATR_MCS11 0x00800000
|
||||||
#define RATR_MCS12 0x01000000
|
#define RATR_MCS12 0x01000000
|
||||||
#define RATR_MCS13 0x02000000
|
#define RATR_MCS13 0x02000000
|
||||||
#define RATR_MCS14 0x04000000
|
#define RATR_MCS14 0x04000000
|
||||||
#define RATR_MCS15 0x08000000
|
#define RATR_MCS15 0x08000000
|
||||||
|
|
||||||
/* CCK */
|
/* CCK */
|
||||||
#define RATE_1M BIT(0)
|
#define RATE_1M BIT(0)
|
||||||
#define RATE_2M BIT(1)
|
#define RATE_2M BIT(1)
|
||||||
#define RATE_5_5M BIT(2)
|
#define RATE_5_5M BIT(2)
|
||||||
#define RATE_11M BIT(3)
|
#define RATE_11M BIT(3)
|
||||||
/* OFDM */
|
/* OFDM */
|
||||||
#define RATE_6M BIT(4)
|
#define RATE_6M BIT(4)
|
||||||
#define RATE_9M BIT(5)
|
#define RATE_9M BIT(5)
|
||||||
#define RATE_12M BIT(6)
|
#define RATE_12M BIT(6)
|
||||||
#define RATE_18M BIT(7)
|
#define RATE_18M BIT(7)
|
||||||
#define RATE_24M BIT(8)
|
#define RATE_24M BIT(8)
|
||||||
#define RATE_36M BIT(9)
|
#define RATE_36M BIT(9)
|
||||||
#define RATE_48M BIT(10)
|
#define RATE_48M BIT(10)
|
||||||
#define RATE_54M BIT(11)
|
#define RATE_54M BIT(11)
|
||||||
/* MCS 1 Spatial Stream */
|
/* MCS 1 Spatial Stream */
|
||||||
#define RATE_MCS0 BIT(12)
|
#define RATE_MCS0 BIT(12)
|
||||||
#define RATE_MCS1 BIT(13)
|
#define RATE_MCS1 BIT(13)
|
||||||
#define RATE_MCS2 BIT(14)
|
#define RATE_MCS2 BIT(14)
|
||||||
#define RATE_MCS3 BIT(15)
|
#define RATE_MCS3 BIT(15)
|
||||||
#define RATE_MCS4 BIT(16)
|
#define RATE_MCS4 BIT(16)
|
||||||
#define RATE_MCS5 BIT(17)
|
#define RATE_MCS5 BIT(17)
|
||||||
#define RATE_MCS6 BIT(18)
|
#define RATE_MCS6 BIT(18)
|
||||||
#define RATE_MCS7 BIT(19)
|
#define RATE_MCS7 BIT(19)
|
||||||
/* MCS 2 Spatial Stream */
|
/* MCS 2 Spatial Stream */
|
||||||
#define RATE_MCS8 BIT(20)
|
#define RATE_MCS8 BIT(20)
|
||||||
#define RATE_MCS9 BIT(21)
|
#define RATE_MCS9 BIT(21)
|
||||||
#define RATE_MCS10 BIT(22)
|
#define RATE_MCS10 BIT(22)
|
||||||
#define RATE_MCS11 BIT(23)
|
#define RATE_MCS11 BIT(23)
|
||||||
#define RATE_MCS12 BIT(24)
|
#define RATE_MCS12 BIT(24)
|
||||||
#define RATE_MCS13 BIT(25)
|
#define RATE_MCS13 BIT(25)
|
||||||
#define RATE_MCS14 BIT(26)
|
#define RATE_MCS14 BIT(26)
|
||||||
#define RATE_MCS15 BIT(27)
|
#define RATE_MCS15 BIT(27)
|
||||||
|
|
||||||
/* ALL CCK Rate */
|
/* ALL CCK Rate */
|
||||||
#define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M
|
#define RATE_ALL_CCK (RATR_1M | RATR_2M | RATR_55M | RATR_11M)
|
||||||
#define RATE_ALL_OFDM_AG RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M|\
|
#define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | RATR_12M | RATR_18M | \
|
||||||
RATR_36M|RATR_48M|RATR_54M
|
RATR_24M | RATR_36M | RATR_48M | RATR_54M)
|
||||||
#define RATE_ALL_OFDM_1SS RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 |\
|
#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | \
|
||||||
RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7
|
RATR_MCS3 | RATR_MCS4 | RATR_MCS5|RATR_MCS6 | \
|
||||||
#define RATE_ALL_OFDM_2SS RATR_MCS8|RATR_MCS9 |RATR_MCS10|RATR_MCS11|\
|
RATR_MCS7)
|
||||||
RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15
|
#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
|
||||||
|
RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
|
||||||
|
RATR_MCS14 | RATR_MCS15)
|
||||||
|
|
||||||
/*------------------------------ Tx Desc definition Macro ------------------------*/
|
/*------------------------------ Tx Desc definition Macro --------------------*/
|
||||||
/* pragma mark -- Tx Desc related definition. -- */
|
/* pragma mark -- Tx Desc related definition. -- */
|
||||||
/* */
|
/* Rate */
|
||||||
/* */
|
|
||||||
/* Rate */
|
|
||||||
/* */
|
|
||||||
/* CCK Rates, TxHT = 0 */
|
/* CCK Rates, TxHT = 0 */
|
||||||
#define DESC_RATE1M 0x00
|
#define DESC_RATE1M 0x00
|
||||||
#define DESC_RATE2M 0x01
|
#define DESC_RATE2M 0x01
|
||||||
|
@ -140,7 +139,8 @@
|
||||||
#define DESC_RATEMCS15_SG 0x1c
|
#define DESC_RATEMCS15_SG 0x1c
|
||||||
#define DESC_RATEMCS32 0x20
|
#define DESC_RATEMCS32 0x20
|
||||||
|
|
||||||
#define REG_P2P_CTWIN 0x0572 /* 1 Byte long (in unit of TU) */
|
/* 1 Byte long (in unit of TU) */
|
||||||
|
#define REG_P2P_CTWIN 0x0572
|
||||||
#define REG_NOA_DESC_SEL 0x05CF
|
#define REG_NOA_DESC_SEL 0x05CF
|
||||||
#define REG_NOA_DESC_DURATION 0x05E0
|
#define REG_NOA_DESC_DURATION 0x05E0
|
||||||
#define REG_NOA_DESC_INTERVAL 0x05E4
|
#define REG_NOA_DESC_INTERVAL 0x05E4
|
||||||
|
@ -151,27 +151,19 @@
|
||||||
void dump_chip_info(struct HAL_VERSION ChipVersion);
|
void dump_chip_info(struct HAL_VERSION ChipVersion);
|
||||||
|
|
||||||
|
|
||||||
u8 /* return the final channel plan decision */
|
/* return the final channel plan decision */
|
||||||
hal_com_get_channel_plan(
|
u8 hal_com_get_channel_plan(struct adapter *padapter,
|
||||||
struct adapter * padapter,
|
u8 hw_channel_plan,
|
||||||
u8 hw_channel_plan, /* channel plan from HW (efuse/eeprom) */
|
u8 sw_channel_plan,
|
||||||
u8 sw_channel_plan, /* channel plan from SW (registry/module param) */
|
u8 def_channel_plan,
|
||||||
u8 def_channel_plan, /* channel plan used when the former two is invalid */
|
bool AutoLoadFail
|
||||||
bool AutoLoadFail
|
);
|
||||||
);
|
|
||||||
|
|
||||||
u8 MRateToHwRate(u8 rate);
|
u8 MRateToHwRate(u8 rate);
|
||||||
|
|
||||||
void HalSetBrateCfg(
|
void HalSetBrateCfg(struct adapter *Adapter, u8 *mBratesOS, u16 *pBrateCfg);
|
||||||
struct adapter * Adapter,
|
|
||||||
u8 *mBratesOS,
|
|
||||||
u16 *pBrateCfg);
|
|
||||||
|
|
||||||
bool
|
bool Hal_MappingOutPipe(struct adapter *pAdapter, u8 NumOutPipe);
|
||||||
Hal_MappingOutPipe(
|
|
||||||
struct adapter * pAdapter,
|
|
||||||
u8 NumOutPipe
|
|
||||||
);
|
|
||||||
|
|
||||||
void hal_init_macaddr(struct adapter *adapter);
|
void hal_init_macaddr(struct adapter *adapter);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ enum RTL871X_HCI_TYPE {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _CHIP_TYPE {
|
enum _CHIP_TYPE {
|
||||||
|
|
||||||
NULL_CHIP_TYPE,
|
NULL_CHIP_TYPE,
|
||||||
RTL8712_8188S_8191S_8192S,
|
RTL8712_8188S_8191S_8192S,
|
||||||
RTL8188C_8192C,
|
RTL8188C_8192C,
|
||||||
|
@ -42,7 +41,6 @@ enum _CHIP_TYPE {
|
||||||
MAX_CHIP_TYPE
|
MAX_CHIP_TYPE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum hw_variables {
|
enum hw_variables {
|
||||||
HW_VAR_MEDIA_STATUS,
|
HW_VAR_MEDIA_STATUS,
|
||||||
HW_VAR_MEDIA_STATUS1,
|
HW_VAR_MEDIA_STATUS1,
|
||||||
|
@ -104,8 +102,10 @@ enum hw_variables {
|
||||||
HW_VAR_EFUSE_BT_BYTES,
|
HW_VAR_EFUSE_BT_BYTES,
|
||||||
HW_VAR_FIFO_CLEARN_UP,
|
HW_VAR_FIFO_CLEARN_UP,
|
||||||
HW_VAR_CHECK_TXBUF,
|
HW_VAR_CHECK_TXBUF,
|
||||||
HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation, power control for MAC only */
|
HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation,
|
||||||
/* The valid upper nav range for the HW updating, if the true value is larger than the upper range, the HW won't update it. */
|
* power control for MAC only */
|
||||||
|
/* The valid upper nav range for the HW updating, if the true value is
|
||||||
|
* larger than the upper range, the HW won't update it. */
|
||||||
/* Unit in microsecond. 0 means disable this function. */
|
/* Unit in microsecond. 0 means disable this function. */
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
HW_VAR_WOWLAN,
|
HW_VAR_WOWLAN,
|
||||||
|
@ -182,47 +182,81 @@ struct hal_ops {
|
||||||
void (*disable_interrupt)(struct adapter *padapter);
|
void (*disable_interrupt)(struct adapter *padapter);
|
||||||
s32 (*interrupt_handler)(struct adapter *padapter);
|
s32 (*interrupt_handler)(struct adapter *padapter);
|
||||||
|
|
||||||
void (*set_bwmode_handler)(struct adapter *padapter, enum ht_channel_width Bandwidth, u8 Offset);
|
void (*set_bwmode_handler)(struct adapter *padapter,
|
||||||
|
enum ht_channel_width Bandwidth,
|
||||||
|
u8 Offset);
|
||||||
void (*set_channel_handler)(struct adapter *padapter, u8 channel);
|
void (*set_channel_handler)(struct adapter *padapter, u8 channel);
|
||||||
|
|
||||||
void (*hal_dm_watchdog)(struct adapter *padapter);
|
void (*hal_dm_watchdog)(struct adapter *padapter);
|
||||||
|
|
||||||
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,u8* val);
|
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
|
||||||
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,u8* val);
|
u8 *val);
|
||||||
|
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
|
||||||
|
u8 *val);
|
||||||
|
|
||||||
u8 (*GetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
u8 (*GetHalDefVarHandler)(struct adapter *padapter,
|
||||||
u8 (*SetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
enum hal_def_variable eVariable,
|
||||||
|
void *pValue);
|
||||||
|
u8 (*SetHalDefVarHandler)(struct adapter *padapter,
|
||||||
|
enum hal_def_variable eVariable,
|
||||||
|
void *pValue);
|
||||||
|
|
||||||
void (*GetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
void (*GetHalODMVarHandler)(struct adapter *padapter,
|
||||||
void (*SetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
enum hal_odm_variable eVariable,
|
||||||
|
void *pValue1, bool bSet);
|
||||||
|
void (*SetHalODMVarHandler)(struct adapter *padapter,
|
||||||
|
enum hal_odm_variable eVariable,
|
||||||
|
void *pValue1, bool bSet);
|
||||||
|
|
||||||
void (*UpdateRAMaskHandler)(struct adapter *padapter, u32 mac_id, u8 rssi_level);
|
void (*UpdateRAMaskHandler)(struct adapter *padapter,
|
||||||
|
u32 mac_id, u8 rssi_level);
|
||||||
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
|
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
|
||||||
|
|
||||||
void (*Add_RateATid)(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
void (*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg,
|
||||||
void (*run_thread)(struct adapter *padapter);
|
u8 rssi_level);
|
||||||
void (*cancel_thread)(struct adapter *padapter);
|
void (*run_thread)(struct adapter *adapter);
|
||||||
|
void (*cancel_thread)(struct adapter *adapter);
|
||||||
|
|
||||||
u8 (*AntDivBeforeLinkHandler)(struct adapter *padapter);
|
u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter);
|
||||||
void (*AntDivCompareHandler)(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
void (*AntDivCompareHandler)(struct adapter *adapter,
|
||||||
u8 (*interface_ps_func)(struct adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val);
|
struct wlan_bssid_ex *dst,
|
||||||
|
struct wlan_bssid_ex *src);
|
||||||
|
u8 (*interface_ps_func)(struct adapter *padapter,
|
||||||
|
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||||
|
|
||||||
s32 (*hal_xmit)(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
s32 (*hal_xmit)(struct adapter *padapter,
|
||||||
s32 (*mgnt_xmit)(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
struct xmit_frame *pxmitframe);
|
||||||
|
s32 (*mgnt_xmit)(struct adapter *padapter,
|
||||||
|
struct xmit_frame *pmgntframe);
|
||||||
|
|
||||||
u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr, u32 BitMask);
|
u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||||
void (*write_bbreg)(struct adapter *padapter, u32 RegAddr, u32 BitMask, u32 Data);
|
u32 BitMask);
|
||||||
u32 (*read_rfreg)(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask);
|
void (*write_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||||
void (*write_rfreg)(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
|
u32 BitMask, u32 Data);
|
||||||
|
u32 (*read_rfreg)(struct adapter *padapter,
|
||||||
|
enum rf_radio_path eRFPath, u32 RegAddr,
|
||||||
|
u32 BitMask);
|
||||||
|
void (*write_rfreg)(struct adapter *padapter,
|
||||||
|
enum rf_radio_path eRFPath, u32 RegAddr,
|
||||||
|
u32 BitMask, u32 Data);
|
||||||
|
|
||||||
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite, u8 PwrState);
|
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite,
|
||||||
void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest);
|
u8 PwrState);
|
||||||
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest);
|
void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
|
||||||
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType, bool bPseudoTest);
|
u16 _size_byte, u8 *pbuf, bool bPseudoTest);
|
||||||
int (*Efuse_PgPacketRead)(struct adapter *padapter, u8 offset, u8 *data, bool bPseudoTest);
|
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
|
||||||
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
|
u8 type, void *pOut, bool bPseudoTest);
|
||||||
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest);
|
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
|
||||||
bool (*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
|
bool bPseudoTest);
|
||||||
|
int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
|
||||||
|
u8 *data, bool bPseudoTest);
|
||||||
|
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
|
||||||
|
u8 word_en, u8 *data, bool bPseudoTest);
|
||||||
|
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
|
||||||
|
u16 efuse_addr, u8 word_en,
|
||||||
|
u8 *data, bool bPseudoTest);
|
||||||
|
bool (*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset,
|
||||||
|
u8 word_en, u8 *data, bool test);
|
||||||
|
|
||||||
void (*sreset_init_value)(struct adapter *padapter);
|
void (*sreset_init_value)(struct adapter *padapter);
|
||||||
void (*sreset_reset_value)(struct adapter *padapter);
|
void (*sreset_reset_value)(struct adapter *padapter);
|
||||||
|
@ -231,11 +265,14 @@ struct hal_ops {
|
||||||
void (*sreset_linked_status_check) (struct adapter *padapter);
|
void (*sreset_linked_status_check) (struct adapter *padapter);
|
||||||
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
|
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
|
||||||
|
|
||||||
int (*IOL_exec_cmds_sync)(struct adapter *padapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
|
||||||
|
struct xmit_frame *frame, u32 max_wait,
|
||||||
|
u32 bndy_cnt);
|
||||||
|
|
||||||
void (*hal_notch_filter)(struct adapter * adapter, bool enable);
|
void (*hal_notch_filter)(struct adapter * adapter, bool enable);
|
||||||
void (*hal_reset_security_engine)(struct adapter * adapter);
|
void (*hal_reset_security_engine)(struct adapter * adapter);
|
||||||
s32 (*c2h_handler)(struct adapter *padapter, struct c2h_evt_hdr *c2h_evt);
|
s32 (*c2h_handler)(struct adapter *padapter,
|
||||||
|
struct c2h_evt_hdr *c2h_evt);
|
||||||
c2h_id_filter c2h_id_filter_ccx;
|
c2h_id_filter c2h_id_filter_ccx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -274,39 +311,43 @@ enum hardware_type {
|
||||||
HARDWARE_TYPE_MAX,
|
HARDWARE_TYPE_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* */
|
|
||||||
/* RTL8192C Series */
|
/* RTL8192C Series */
|
||||||
/* */
|
#define IS_HARDWARE_TYPE_8192CE(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8192CE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CE)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CE)
|
||||||
#define IS_HARDWARE_TYPE_8192CU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CU)
|
#define IS_HARDWARE_TYPE_8192CU(_Adapter) \
|
||||||
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CU)
|
||||||
#define IS_HARDWARE_TYPE_8192C(_Adapter) \
|
#define IS_HARDWARE_TYPE_8192C(_Adapter) \
|
||||||
(IS_HARDWARE_TYPE_8192CE(_Adapter) || IS_HARDWARE_TYPE_8192CU(_Adapter))
|
(IS_HARDWARE_TYPE_8192CE(_Adapter) || IS_HARDWARE_TYPE_8192CU(_Adapter))
|
||||||
|
|
||||||
/* */
|
|
||||||
/* RTL8192D Series */
|
/* RTL8192D Series */
|
||||||
/* */
|
#define IS_HARDWARE_TYPE_8192DE(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8192DE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DE)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DE)
|
||||||
#define IS_HARDWARE_TYPE_8192DU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DU)
|
#define IS_HARDWARE_TYPE_8192DU(_Adapter) \
|
||||||
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DU)
|
||||||
#define IS_HARDWARE_TYPE_8192D(_Adapter) \
|
#define IS_HARDWARE_TYPE_8192D(_Adapter) \
|
||||||
(IS_HARDWARE_TYPE_8192DE(_Adapter) || IS_HARDWARE_TYPE_8192DU(_Adapter))
|
(IS_HARDWARE_TYPE_8192DE(_Adapter) || IS_HARDWARE_TYPE_8192DU(_Adapter))
|
||||||
|
|
||||||
/* */
|
|
||||||
/* RTL8723A Series */
|
/* RTL8723A Series */
|
||||||
/* */
|
#define IS_HARDWARE_TYPE_8723AE(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8723AE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AE)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AE)
|
||||||
#define IS_HARDWARE_TYPE_8723AU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AU)
|
#define IS_HARDWARE_TYPE_8723AU(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8723AS(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AS)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AU)
|
||||||
|
#define IS_HARDWARE_TYPE_8723AS(_Adapter) \
|
||||||
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AS)
|
||||||
#define IS_HARDWARE_TYPE_8723A(_Adapter) \
|
#define IS_HARDWARE_TYPE_8723A(_Adapter) \
|
||||||
(IS_HARDWARE_TYPE_8723AE(_Adapter) || IS_HARDWARE_TYPE_8723AU(_Adapter) || IS_HARDWARE_TYPE_8723AS(_Adapter))
|
(IS_HARDWARE_TYPE_8723AE(_Adapter) || IS_HARDWARE_TYPE_8723AU(_Adapter) || \
|
||||||
|
IS_HARDWARE_TYPE_8723AS(_Adapter))
|
||||||
|
|
||||||
/* */
|
|
||||||
/* RTL8188E Series */
|
/* RTL8188E Series */
|
||||||
/* */
|
#define IS_HARDWARE_TYPE_8188EE(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8188EE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EE)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EE)
|
||||||
#define IS_HARDWARE_TYPE_8188EU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EU)
|
#define IS_HARDWARE_TYPE_8188EU(_Adapter) \
|
||||||
#define IS_HARDWARE_TYPE_8188ES(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188ES)
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EU)
|
||||||
|
#define IS_HARDWARE_TYPE_8188ES(_Adapter) \
|
||||||
|
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188ES)
|
||||||
#define IS_HARDWARE_TYPE_8188E(_Adapter) \
|
#define IS_HARDWARE_TYPE_8188E(_Adapter) \
|
||||||
(IS_HARDWARE_TYPE_8188EE(_Adapter) || IS_HARDWARE_TYPE_8188EU(_Adapter) || IS_HARDWARE_TYPE_8188ES(_Adapter))
|
(IS_HARDWARE_TYPE_8188EE(_Adapter) || IS_HARDWARE_TYPE_8188EU(_Adapter) || \
|
||||||
|
IS_HARDWARE_TYPE_8188ES(_Adapter))
|
||||||
|
|
||||||
#define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
|
#define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
|
||||||
|
|
||||||
|
@ -315,16 +356,16 @@ enum hardware_type {
|
||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
enum wowlan_subcode {
|
enum wowlan_subcode {
|
||||||
WOWLAN_PATTERN_MATCH = 1,
|
WOWLAN_PATTERN_MATCH = 1,
|
||||||
WOWLAN_MAGIC_PACKET = 2,
|
WOWLAN_MAGIC_PACKET = 2,
|
||||||
WOWLAN_UNICAST = 3,
|
WOWLAN_UNICAST = 3,
|
||||||
WOWLAN_SET_PATTERN = 4,
|
WOWLAN_SET_PATTERN = 4,
|
||||||
WOWLAN_DUMP_REG = 5,
|
WOWLAN_DUMP_REG = 5,
|
||||||
WOWLAN_ENABLE = 6,
|
WOWLAN_ENABLE = 6,
|
||||||
WOWLAN_DISABLE = 7,
|
WOWLAN_DISABLE = 7,
|
||||||
WOWLAN_STATUS = 8,
|
WOWLAN_STATUS = 8,
|
||||||
WOWLAN_DEBUG_RELOAD_FW = 9,
|
WOWLAN_DEBUG_RELOAD_FW = 9,
|
||||||
WOWLAN_DEBUG_1 =10,
|
WOWLAN_DEBUG_1 = 10,
|
||||||
WOWLAN_DEBUG_2 =11
|
WOWLAN_DEBUG_2 = 11
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wowlan_ioctl_param{
|
struct wowlan_ioctl_param{
|
||||||
|
@ -336,11 +377,11 @@ struct wowlan_ioctl_param{
|
||||||
};
|
};
|
||||||
|
|
||||||
#define Rx_Pairwisekey 0x01
|
#define Rx_Pairwisekey 0x01
|
||||||
#define Rx_GTK 0x02
|
#define Rx_GTK 0x02
|
||||||
#define Rx_DisAssoc 0x04
|
#define Rx_DisAssoc 0x04
|
||||||
#define Rx_DeAuth 0x08
|
#define Rx_DeAuth 0x08
|
||||||
#define FWDecisionDisconnect 0x10
|
#define FWDecisionDisconnect 0x10
|
||||||
#define Rx_MagicPkt 0x21
|
#define Rx_MagicPkt 0x21
|
||||||
#define Rx_UnicastPkt 0x22
|
#define Rx_UnicastPkt 0x22
|
||||||
#define Rx_PatternPkt 0x23
|
#define Rx_PatternPkt 0x23
|
||||||
#endif /* CONFIG_WOWLAN */
|
#endif /* CONFIG_WOWLAN */
|
||||||
|
@ -365,11 +406,17 @@ void rtw_hal_chip_configure(struct adapter *padapter);
|
||||||
void rtw_hal_read_chip_info(struct adapter *padapter);
|
void rtw_hal_read_chip_info(struct adapter *padapter);
|
||||||
void rtw_hal_read_chip_version(struct adapter *padapter);
|
void rtw_hal_read_chip_version(struct adapter *padapter);
|
||||||
|
|
||||||
u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
u8 rtw_hal_set_def_var(struct adapter *padapter,
|
||||||
u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
enum hal_def_variable eVariable, void *pValue);
|
||||||
|
u8 rtw_hal_get_def_var(struct adapter *padapter,
|
||||||
|
enum hal_def_variable eVariable, void *pValue);
|
||||||
|
|
||||||
void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
void rtw_hal_set_odm_var(struct adapter *padapter,
|
||||||
void rtw_hal_get_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
enum hal_odm_variable eVariable, void *pValue1,
|
||||||
|
bool bSet);
|
||||||
|
void rtw_hal_get_odm_var(struct adapter *padapter,
|
||||||
|
enum hal_odm_variable eVariable,
|
||||||
|
void *pValue1, bool bSet);
|
||||||
|
|
||||||
void rtw_hal_enable_interrupt(struct adapter *padapter);
|
void rtw_hal_enable_interrupt(struct adapter *padapter);
|
||||||
void rtw_hal_disable_interrupt(struct adapter *padapter);
|
void rtw_hal_disable_interrupt(struct adapter *padapter);
|
||||||
|
@ -377,10 +424,12 @@ void rtw_hal_disable_interrupt(struct adapter *padapter);
|
||||||
u32 rtw_hal_inirp_init(struct adapter *padapter);
|
u32 rtw_hal_inirp_init(struct adapter *padapter);
|
||||||
u32 rtw_hal_inirp_deinit(struct adapter *padapter);
|
u32 rtw_hal_inirp_deinit(struct adapter *padapter);
|
||||||
|
|
||||||
u8 rtw_hal_intf_ps_func(struct adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val);
|
u8 rtw_hal_intf_ps_func(struct adapter *padapter,
|
||||||
|
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||||
|
|
||||||
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
s32 rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
s32 rtw_hal_mgnt_xmit(struct adapter *padapter,
|
||||||
|
struct xmit_frame *pmgntframe);
|
||||||
|
|
||||||
s32 rtw_hal_init_xmit_priv(struct adapter *padapter);
|
s32 rtw_hal_init_xmit_priv(struct adapter *padapter);
|
||||||
void rtw_hal_free_xmit_priv(struct adapter *padapter);
|
void rtw_hal_free_xmit_priv(struct adapter *padapter);
|
||||||
|
@ -388,27 +437,35 @@ void rtw_hal_free_xmit_priv(struct adapter *padapter);
|
||||||
s32 rtw_hal_init_recv_priv(struct adapter *padapter);
|
s32 rtw_hal_init_recv_priv(struct adapter *padapter);
|
||||||
void rtw_hal_free_recv_priv(struct adapter *padapter);
|
void rtw_hal_free_recv_priv(struct adapter *padapter);
|
||||||
|
|
||||||
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 rssi_level);
|
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
|
||||||
void rtw_hal_add_ra_tid(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
|
||||||
void rtw_hal_clone_data(struct adapter *dst_padapter, struct adapter *src_padapter);
|
void rtw_hal_clone_data(struct adapter *dst_adapt,
|
||||||
|
struct adapter *src_adapt);
|
||||||
void rtw_hal_start_thread(struct adapter *padapter);
|
void rtw_hal_start_thread(struct adapter *padapter);
|
||||||
void rtw_hal_stop_thread(struct adapter *padapter);
|
void rtw_hal_stop_thread(struct adapter *padapter);
|
||||||
|
|
||||||
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
|
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
|
||||||
|
|
||||||
u32 rtw_hal_read_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask);
|
u32 rtw_hal_read_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask);
|
||||||
void rtw_hal_write_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask, u32 Data);
|
void rtw_hal_write_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask,
|
||||||
u32 rtw_hal_read_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask);
|
u32 Data);
|
||||||
void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
|
u32 rtw_hal_read_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath,
|
||||||
|
u32 RegAddr, u32 BitMask);
|
||||||
|
void rtw_hal_write_rfreg(struct adapter *padapter,
|
||||||
|
enum rf_radio_path eRFPath, u32 RegAddr,
|
||||||
|
u32 BitMask, u32 Data);
|
||||||
|
|
||||||
s32 rtw_hal_interrupt_handler(struct adapter *padapter);
|
s32 rtw_hal_interrupt_handler(struct adapter *padapter);
|
||||||
|
|
||||||
void rtw_hal_set_bwmode(struct adapter *padapter, enum ht_channel_width Bandwidth, u8 Offset);
|
void rtw_hal_set_bwmode(struct adapter *padapter,
|
||||||
|
enum ht_channel_width Bandwidth, u8 Offset);
|
||||||
void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
|
void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
|
||||||
void rtw_hal_dm_watchdog(struct adapter *padapter);
|
void rtw_hal_dm_watchdog(struct adapter *padapter);
|
||||||
|
|
||||||
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
|
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
|
||||||
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
|
||||||
|
struct wlan_bssid_ex *dst,
|
||||||
|
struct wlan_bssid_ex *src);
|
||||||
|
|
||||||
void rtw_hal_sreset_init(struct adapter *padapter);
|
void rtw_hal_sreset_init(struct adapter *padapter);
|
||||||
void rtw_hal_sreset_reset(struct adapter *padapter);
|
void rtw_hal_sreset_reset(struct adapter *padapter);
|
||||||
|
@ -417,12 +474,14 @@ void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
|
||||||
void rtw_hal_sreset_linked_status_check (struct adapter *padapter);
|
void rtw_hal_sreset_linked_status_check (struct adapter *padapter);
|
||||||
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
|
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
|
||||||
|
|
||||||
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
|
||||||
|
u32 max_wating_ms, u32 bndy_cnt);
|
||||||
|
|
||||||
void rtw_hal_notch_filter(struct adapter * adapter, bool enable);
|
void rtw_hal_notch_filter(struct adapter * adapter, bool enable);
|
||||||
void rtw_hal_reset_security_engine(struct adapter * adapter);
|
void rtw_hal_reset_security_engine(struct adapter * adapter);
|
||||||
|
|
||||||
s32 rtw_hal_c2h_handler(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt);
|
s32 rtw_hal_c2h_handler(struct adapter *adapter,
|
||||||
|
struct c2h_evt_hdr *c2h_evt);
|
||||||
c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter);
|
c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter);
|
||||||
|
|
||||||
#endif /* __HAL_INTF_H__ */
|
#endif /* __HAL_INTF_H__ */
|
||||||
|
|
|
@ -53,7 +53,7 @@ enum {
|
||||||
RTL871X_HOSTAPD_MLME = 13,
|
RTL871X_HOSTAPD_MLME = 13,
|
||||||
RTL871X_HOSTAPD_SCAN_REQ = 14,
|
RTL871X_HOSTAPD_SCAN_REQ = 14,
|
||||||
RTL871X_HOSTAPD_STA_CLEAR_STATS = 15,
|
RTL871X_HOSTAPD_STA_CLEAR_STATS = 15,
|
||||||
RTL871X_HOSTAPD_SET_BEACON=16,
|
RTL871X_HOSTAPD_SET_BEACON = 16,
|
||||||
RTL871X_HOSTAPD_SET_WPS_BEACON = 17,
|
RTL871X_HOSTAPD_SET_WPS_BEACON = 17,
|
||||||
RTL871X_HOSTAPD_SET_WPS_PROBE_RESP = 18,
|
RTL871X_HOSTAPD_SET_WPS_PROBE_RESP = 18,
|
||||||
RTL871X_HOSTAPD_SET_WPS_ASSOC_RESP = 19,
|
RTL871X_HOSTAPD_SET_WPS_ASSOC_RESP = 19,
|
||||||
|
@ -121,8 +121,8 @@ enum {
|
||||||
|
|
||||||
|
|
||||||
#define WPA_SELECTOR_LEN 4
|
#define WPA_SELECTOR_LEN 4
|
||||||
extern u8 RTW_WPA_OUI_TYPE[] ;
|
extern u8 RTW_WPA_OUI_TYPE[];
|
||||||
extern u16 RTW_WPA_VERSION ;
|
extern u16 RTW_WPA_VERSION;
|
||||||
extern u8 WPA_AUTH_KEY_MGMT_NONE[];
|
extern u8 WPA_AUTH_KEY_MGMT_NONE[];
|
||||||
extern u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[];
|
extern u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[];
|
||||||
extern u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
|
extern u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
|
||||||
|
@ -160,41 +160,51 @@ enum ratr_table_mode {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NETWORK_TYPE {
|
enum NETWORK_TYPE {
|
||||||
WIRELESS_INVALID = 0,
|
WIRELESS_INVALID = 0,
|
||||||
/* Sub-Element */
|
/* Sub-Element */
|
||||||
WIRELESS_11B = BIT(0), /* tx: cck only , rx: cck only, hw: cck */
|
WIRELESS_11B = BIT(0), /* tx: cck only, rx: cck only, hw: cck */
|
||||||
WIRELESS_11G = BIT(1), /* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */
|
WIRELESS_11G = BIT(1), /* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */
|
||||||
WIRELESS_11A = BIT(2), /* tx: ofdm only, rx: ofdm only, hw: ofdm only */
|
WIRELESS_11A = BIT(2), /* tx: ofdm only, rx: ofdm only, hw: ofdm only */
|
||||||
WIRELESS_11_24N = BIT(3), /* tx: MCS only, rx: MCS & cck, hw: MCS & cck */
|
WIRELESS_11_24N = BIT(3), /* tx: MCS only, rx: MCS & cck, hw: MCS & cck */
|
||||||
WIRELESS_11_5N = BIT(4), /* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */
|
WIRELESS_11_5N = BIT(4), /* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */
|
||||||
/* WIRELESS_AUTO = BIT(5), */
|
/* WIRELESS_AUTO = BIT(5), */
|
||||||
WIRELESS_AC = BIT(6),
|
WIRELESS_AC = BIT(6),
|
||||||
|
|
||||||
/* Combination */
|
/* Combination */
|
||||||
WIRELESS_11BG = (WIRELESS_11B|WIRELESS_11G), /* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */
|
WIRELESS_11BG = (WIRELESS_11B|WIRELESS_11G), /* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */
|
||||||
WIRELESS_11G_24N = (WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */
|
WIRELESS_11G_24N = (WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */
|
||||||
WIRELESS_11A_5N = (WIRELESS_11A|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
WIRELESS_11A_5N = (WIRELESS_11A|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
||||||
WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */
|
WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */
|
||||||
WIRELESS_11AGN = (WIRELESS_11A|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
WIRELESS_11AGN = (WIRELESS_11A|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
||||||
WIRELESS_11ABGN = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N),
|
WIRELESS_11ABGN = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
|
#define SUPPORTED_24G_NETTYPE_MSK \
|
||||||
#define SUPPORTED_5G_NETTYPE_MSK (WIRELESS_11A | WIRELESS_11_5N)
|
(WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
|
||||||
|
#define SUPPORTED_5G_NETTYPE_MSK \
|
||||||
|
(WIRELESS_11A | WIRELESS_11_5N)
|
||||||
|
|
||||||
#define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
#define IsSupported24G(NetType) \
|
||||||
#define IsSupported5G(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
||||||
|
#define IsSupported5G(NetType) \
|
||||||
|
((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
||||||
|
|
||||||
#define IsEnableHWCCK(NetType) IsSupported24G(NetType)
|
#define IsEnableHWCCK(NetType) \
|
||||||
#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11_24N|SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
IsSupported24G(NetType)
|
||||||
|
#define IsEnableHWOFDM(NetType) \
|
||||||
|
((NetType) & (WIRELESS_11G | WIRELESS_11_24N | \
|
||||||
|
SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
||||||
|
|
||||||
#define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
|
#define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
|
||||||
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
|
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
|
||||||
#define IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
|
#define IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
|
||||||
|
|
||||||
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false)
|
#define IsSupportedTxCCK(NetType) \
|
||||||
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false)
|
((NetType) & (WIRELESS_11B) ? true : false)
|
||||||
#define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
|
#define IsSupportedTxOFDM(NetType) \
|
||||||
|
((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false)
|
||||||
|
#define IsSupportedTxMCS(NetType) \
|
||||||
|
((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
|
||||||
|
|
||||||
|
|
||||||
struct ieee_param {
|
struct ieee_param {
|
||||||
|
@ -210,7 +220,7 @@ struct ieee_param {
|
||||||
u8 reserved[32];
|
u8 reserved[32];
|
||||||
u8 data[0];
|
u8 data[0];
|
||||||
} wpa_ie;
|
} wpa_ie;
|
||||||
struct{
|
struct {
|
||||||
int command;
|
int command;
|
||||||
int reason_code;
|
int reason_code;
|
||||||
} mlme;
|
} mlme;
|
||||||
|
@ -264,7 +274,6 @@ struct sta_data{
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if WIRELESS_EXT < 17
|
#if WIRELESS_EXT < 17
|
||||||
#define IW_QUAL_QUAL_INVALID 0x10
|
#define IW_QUAL_QUAL_INVALID 0x10
|
||||||
#define IW_QUAL_LEVEL_INVALID 0x20
|
#define IW_QUAL_LEVEL_INVALID 0x20
|
||||||
|
@ -307,7 +316,7 @@ struct rtw_ieee80211_hdr {
|
||||||
u8 addr3[ETH_ALEN];
|
u8 addr3[ETH_ALEN];
|
||||||
u16 seq_ctl;
|
u16 seq_ctl;
|
||||||
u8 addr4[ETH_ALEN];
|
u8 addr4[ETH_ALEN];
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct rtw_ieee80211_hdr_3addr {
|
struct rtw_ieee80211_hdr_3addr {
|
||||||
u16 frame_ctl;
|
u16 frame_ctl;
|
||||||
|
@ -316,8 +325,7 @@ struct rtw_ieee80211_hdr_3addr {
|
||||||
u8 addr2[ETH_ALEN];
|
u8 addr2[ETH_ALEN];
|
||||||
u8 addr3[ETH_ALEN];
|
u8 addr3[ETH_ALEN];
|
||||||
u16 seq_ctl;
|
u16 seq_ctl;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
|
|
||||||
struct rtw_ieee80211_hdr_qos {
|
struct rtw_ieee80211_hdr_qos {
|
||||||
u16 frame_ctl;
|
u16 frame_ctl;
|
||||||
|
@ -328,17 +336,17 @@ struct rtw_ieee80211_hdr_qos {
|
||||||
u16 seq_ctl;
|
u16 seq_ctl;
|
||||||
u8 addr4[ETH_ALEN];
|
u8 addr4[ETH_ALEN];
|
||||||
u16 qc;
|
u16 qc;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct rtw_ieee80211_hdr_3addr_qos {
|
struct rtw_ieee80211_hdr_3addr_qos {
|
||||||
u16 frame_ctl;
|
u16 frame_ctl;
|
||||||
u16 duration_id;
|
u16 duration_id;
|
||||||
u8 addr1[ETH_ALEN];
|
u8 addr1[ETH_ALEN];
|
||||||
u8 addr2[ETH_ALEN];
|
u8 addr2[ETH_ALEN];
|
||||||
u8 addr3[ETH_ALEN];
|
u8 addr3[ETH_ALEN];
|
||||||
u16 seq_ctl;
|
u16 seq_ctl;
|
||||||
u16 qc;
|
u16 qc;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct eapol {
|
struct eapol {
|
||||||
u8 snap[6];
|
u8 snap[6];
|
||||||
|
@ -346,7 +354,7 @@ struct eapol {
|
||||||
u8 version;
|
u8 version;
|
||||||
u8 type;
|
u8 type;
|
||||||
u16 length;
|
u16 length;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
enum eap_type {
|
enum eap_type {
|
||||||
EAP_PACKET = 0,
|
EAP_PACKET = 0,
|
||||||
|
@ -434,7 +442,7 @@ enum eap_type {
|
||||||
#define RTW_ERP_INFO_USE_PROTECTION BIT(1)
|
#define RTW_ERP_INFO_USE_PROTECTION BIT(1)
|
||||||
#define RTW_ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
|
#define RTW_ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
|
||||||
|
|
||||||
/* QoS,QOS */
|
/* QoS, QOS */
|
||||||
#define NORMAL_ACK 0
|
#define NORMAL_ACK 0
|
||||||
#define NO_ACK 1
|
#define NO_ACK 1
|
||||||
#define NON_EXPLICIT_ACK 2
|
#define NON_EXPLICIT_ACK 2
|
||||||
|
@ -457,13 +465,11 @@ enum eap_type {
|
||||||
#define P80211_OUI_LEN 3
|
#define P80211_OUI_LEN 3
|
||||||
|
|
||||||
struct ieee80211_snap_hdr {
|
struct ieee80211_snap_hdr {
|
||||||
|
u8 dsap; /* always 0xAA */
|
||||||
u8 dsap; /* always 0xAA */
|
u8 ssap; /* always 0xAA */
|
||||||
u8 ssap; /* always 0xAA */
|
u8 ctrl; /* always 0x03 */
|
||||||
u8 ctrl; /* always 0x03 */
|
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
||||||
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
} __packed;
|
||||||
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||||
|
|
||||||
|
@ -581,13 +587,13 @@ struct ieee80211_snap_hdr {
|
||||||
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
||||||
|
|
||||||
|
|
||||||
#define IEEE80211_CCK_RATE_1MB 0x02
|
#define IEEE80211_CCK_RATE_1MB 0x02
|
||||||
#define IEEE80211_CCK_RATE_2MB 0x04
|
#define IEEE80211_CCK_RATE_2MB 0x04
|
||||||
#define IEEE80211_CCK_RATE_5MB 0x0B
|
#define IEEE80211_CCK_RATE_5MB 0x0B
|
||||||
#define IEEE80211_CCK_RATE_11MB 0x16
|
#define IEEE80211_CCK_RATE_11MB 0x16
|
||||||
#define IEEE80211_OFDM_RATE_LEN 8
|
#define IEEE80211_OFDM_RATE_LEN 8
|
||||||
#define IEEE80211_OFDM_RATE_6MB 0x0C
|
#define IEEE80211_OFDM_RATE_6MB 0x0C
|
||||||
#define IEEE80211_OFDM_RATE_9MB 0x12
|
#define IEEE80211_OFDM_RATE_9MB 0x12
|
||||||
#define IEEE80211_OFDM_RATE_12MB 0x18
|
#define IEEE80211_OFDM_RATE_12MB 0x18
|
||||||
#define IEEE80211_OFDM_RATE_18MB 0x24
|
#define IEEE80211_OFDM_RATE_18MB 0x24
|
||||||
#define IEEE80211_OFDM_RATE_24MB 0x30
|
#define IEEE80211_OFDM_RATE_24MB 0x30
|
||||||
|
@ -609,12 +615,12 @@ struct ieee80211_snap_hdr {
|
||||||
#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
|
#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
|
||||||
#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
|
#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
|
||||||
|
|
||||||
#define IEEE80211_CCK_RATES_MASK 0x0000000F
|
#define IEEE80211_CCK_RATES_MASK 0x0000000F
|
||||||
#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
|
#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
|
||||||
IEEE80211_CCK_RATE_2MB_MASK)
|
IEEE80211_CCK_RATE_2MB_MASK)
|
||||||
#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
|
#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
|
||||||
IEEE80211_CCK_RATE_5MB_MASK | \
|
IEEE80211_CCK_RATE_5MB_MASK | \
|
||||||
IEEE80211_CCK_RATE_11MB_MASK)
|
IEEE80211_CCK_RATE_11MB_MASK)
|
||||||
|
|
||||||
#define IEEE80211_OFDM_RATES_MASK 0x00000FF0
|
#define IEEE80211_OFDM_RATES_MASK 0x00000FF0
|
||||||
#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
|
#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
|
||||||
|
@ -627,14 +633,11 @@ struct ieee80211_snap_hdr {
|
||||||
IEEE80211_OFDM_RATE_48MB_MASK | \
|
IEEE80211_OFDM_RATE_48MB_MASK | \
|
||||||
IEEE80211_OFDM_RATE_54MB_MASK)
|
IEEE80211_OFDM_RATE_54MB_MASK)
|
||||||
#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
|
#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
|
||||||
IEEE80211_CCK_DEFAULT_RATES_MASK)
|
IEEE80211_CCK_DEFAULT_RATES_MASK)
|
||||||
|
|
||||||
#define IEEE80211_NUM_OFDM_RATES 8
|
|
||||||
#define IEEE80211_NUM_CCK_RATES 4
|
|
||||||
#define IEEE80211_OFDM_SHIFT_MASK_A 4
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define IEEE80211_NUM_OFDM_RATES 8
|
||||||
|
#define IEEE80211_NUM_CCK_RATES 4
|
||||||
|
#define IEEE80211_OFDM_SHIFT_MASK_A 4
|
||||||
|
|
||||||
/* NOTE: This data is for statistical purposes; not all hardware provides this
|
/* NOTE: This data is for statistical purposes; not all hardware provides this
|
||||||
* information for frames received. Not setting these will not cause
|
* information for frames received. Not setting these will not cause
|
||||||
|
@ -693,7 +696,7 @@ struct ieee80211_stats {
|
||||||
uint rx_message_in_bad_msg_fragments;
|
uint rx_message_in_bad_msg_fragments;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ieee80211_softmac_stats{
|
struct ieee80211_softmac_stats {
|
||||||
uint rx_ass_ok;
|
uint rx_ass_ok;
|
||||||
uint rx_ass_err;
|
uint rx_ass_err;
|
||||||
uint rx_probe_rq;
|
uint rx_probe_rq;
|
||||||
|
@ -713,15 +716,15 @@ struct ieee80211_softmac_stats{
|
||||||
uint swtxawake;
|
uint swtxawake;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SEC_KEY_1 (1<<0)
|
#define SEC_KEY_1 (1<<0)
|
||||||
#define SEC_KEY_2 (1<<1)
|
#define SEC_KEY_2 (1<<1)
|
||||||
#define SEC_KEY_3 (1<<2)
|
#define SEC_KEY_3 (1<<2)
|
||||||
#define SEC_KEY_4 (1<<3)
|
#define SEC_KEY_4 (1<<3)
|
||||||
#define SEC_ACTIVE_KEY (1<<4)
|
#define SEC_ACTIVE_KEY (1<<4)
|
||||||
#define SEC_AUTH_MODE (1<<5)
|
#define SEC_AUTH_MODE (1<<5)
|
||||||
#define SEC_UNICAST_GROUP (1<<6)
|
#define SEC_UNICAST_GROUP (1<<6)
|
||||||
#define SEC_LEVEL (1<<7)
|
#define SEC_LEVEL (1<<7)
|
||||||
#define SEC_ENABLED (1<<8)
|
#define SEC_ENABLED (1<<8)
|
||||||
|
|
||||||
#define SEC_LEVEL_0 0 /* None */
|
#define SEC_LEVEL_0 0 /* None */
|
||||||
#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
|
#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
|
||||||
|
@ -734,15 +737,15 @@ struct ieee80211_softmac_stats{
|
||||||
|
|
||||||
struct ieee80211_security {
|
struct ieee80211_security {
|
||||||
u16 active_key:2,
|
u16 active_key:2,
|
||||||
enabled:1,
|
enabled:1,
|
||||||
auth_mode:2,
|
auth_mode:2,
|
||||||
auth_algo:4,
|
auth_algo:4,
|
||||||
unicast_uses_group:1;
|
unicast_uses_group:1;
|
||||||
u8 key_sizes[WEP_KEYS];
|
u8 key_sizes[WEP_KEYS];
|
||||||
u8 keys[WEP_KEYS][WEP_KEY_LEN];
|
u8 keys[WEP_KEYS][WEP_KEY_LEN];
|
||||||
u8 level;
|
u8 level;
|
||||||
u16 flags;
|
u16 flags;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -752,7 +755,7 @@ struct ieee80211_security {
|
||||||
Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
|
Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
|
||||||
|------|------|---------|---------|---------|------|---------|------|
|
|------|------|---------|---------|---------|------|---------|------|
|
||||||
Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs |
|
Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs |
|
||||||
| | tion | (BSSID) | | | ence | data | |
|
| | tion | (BSSID) | | | ence | data | |
|
||||||
`-------------------------------------------------------------------'
|
`-------------------------------------------------------------------'
|
||||||
|
|
||||||
Total: 28-2340 bytes
|
Total: 28-2340 bytes
|
||||||
|
@ -771,29 +774,29 @@ struct ieee80211_header_data {
|
||||||
#define BEACON_PROBE_SSID_ID_POSITION 12
|
#define BEACON_PROBE_SSID_ID_POSITION 12
|
||||||
|
|
||||||
/* Management Frame Information Element Types */
|
/* Management Frame Information Element Types */
|
||||||
#define MFIE_TYPE_SSID 0
|
#define MFIE_TYPE_SSID 0
|
||||||
#define MFIE_TYPE_RATES 1
|
#define MFIE_TYPE_RATES 1
|
||||||
#define MFIE_TYPE_FH_SET 2
|
#define MFIE_TYPE_FH_SET 2
|
||||||
#define MFIE_TYPE_DS_SET 3
|
#define MFIE_TYPE_DS_SET 3
|
||||||
#define MFIE_TYPE_CF_SET 4
|
#define MFIE_TYPE_CF_SET 4
|
||||||
#define MFIE_TYPE_TIM 5
|
#define MFIE_TYPE_TIM 5
|
||||||
#define MFIE_TYPE_IBSS_SET 6
|
#define MFIE_TYPE_IBSS_SET 6
|
||||||
#define MFIE_TYPE_CHALLENGE 16
|
#define MFIE_TYPE_CHALLENGE 16
|
||||||
#define MFIE_TYPE_ERP 42
|
#define MFIE_TYPE_ERP 42
|
||||||
#define MFIE_TYPE_RSN 48
|
#define MFIE_TYPE_RSN 48
|
||||||
#define MFIE_TYPE_RATES_EX 50
|
#define MFIE_TYPE_RATES_EX 50
|
||||||
#define MFIE_TYPE_GENERIC 221
|
#define MFIE_TYPE_GENERIC 221
|
||||||
|
|
||||||
struct ieee80211_info_element_hdr {
|
struct ieee80211_info_element_hdr {
|
||||||
u8 id;
|
u8 id;
|
||||||
u8 len;
|
u8 len;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct ieee80211_info_element {
|
struct ieee80211_info_element {
|
||||||
u8 id;
|
u8 id;
|
||||||
u8 len;
|
u8 len;
|
||||||
u8 data[0];
|
u8 data[0];
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the data types that can make up management packets
|
* These are the data types that can make up management packets
|
||||||
|
@ -806,7 +809,7 @@ struct ieee80211_info_element {
|
||||||
u16 listen_interval;
|
u16 listen_interval;
|
||||||
struct {
|
struct {
|
||||||
u16 association_id:14, reserved:2;
|
u16 association_id:14, reserved:2;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
u32 time_stamp[2];
|
u32 time_stamp[2];
|
||||||
u16 reason;
|
u16 reason;
|
||||||
u16 status;
|
u16 status;
|
||||||
|
@ -821,8 +824,7 @@ struct ieee80211_authentication {
|
||||||
u16 transaction;
|
u16 transaction;
|
||||||
u16 status;
|
u16 status;
|
||||||
/* struct ieee80211_info_element_hdr info_element; */
|
/* struct ieee80211_info_element_hdr info_element; */
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
|
|
||||||
struct ieee80211_probe_response {
|
struct ieee80211_probe_response {
|
||||||
struct ieee80211_header_data header;
|
struct ieee80211_header_data header;
|
||||||
|
@ -830,27 +832,25 @@ struct ieee80211_probe_response {
|
||||||
u16 beacon_interval;
|
u16 beacon_interval;
|
||||||
u16 capability;
|
u16 capability;
|
||||||
struct ieee80211_info_element info_element;
|
struct ieee80211_info_element info_element;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct ieee80211_probe_request {
|
struct ieee80211_probe_request {
|
||||||
struct ieee80211_header_data header;
|
struct ieee80211_header_data header;
|
||||||
/*struct ieee80211_info_element info_element;*/
|
} __packed;
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
struct ieee80211_assoc_request_frame {
|
struct ieee80211_assoc_request_frame {
|
||||||
struct rtw_ieee80211_hdr_3addr header;
|
struct rtw_ieee80211_hdr_3addr header;
|
||||||
u16 capability;
|
u16 capability;
|
||||||
u16 listen_interval;
|
u16 listen_interval;
|
||||||
/* u8 current_ap[ETH_ALEN]; */
|
|
||||||
struct ieee80211_info_element_hdr info_element;
|
struct ieee80211_info_element_hdr info_element;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct ieee80211_assoc_response_frame {
|
struct ieee80211_assoc_response_frame {
|
||||||
struct rtw_ieee80211_hdr_3addr header;
|
struct rtw_ieee80211_hdr_3addr header;
|
||||||
u16 capability;
|
u16 capability;
|
||||||
u16 status;
|
u16 status;
|
||||||
u16 aid;
|
u16 aid;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct ieee80211_txb {
|
struct ieee80211_txb {
|
||||||
u8 nr_frags;
|
u8 nr_frags;
|
||||||
|
@ -869,15 +869,15 @@ struct ieee80211_txb {
|
||||||
* only use 8, and then use extended rates for the remaining supported
|
* only use 8, and then use extended rates for the remaining supported
|
||||||
* rates. Other APs, however, stick all of their supported rates on the
|
* rates. Other APs, however, stick all of their supported rates on the
|
||||||
* main rates information element... */
|
* main rates information element... */
|
||||||
#define MAX_RATES_LENGTH ((u8)12)
|
#define MAX_RATES_LENGTH ((u8)12)
|
||||||
#define MAX_RATES_EX_LENGTH ((u8)16)
|
#define MAX_RATES_EX_LENGTH ((u8)16)
|
||||||
#define MAX_NETWORK_COUNT 128
|
#define MAX_NETWORK_COUNT 128
|
||||||
#define MAX_CHANNEL_NUMBER 161
|
#define MAX_CHANNEL_NUMBER 161
|
||||||
#define IEEE80211_SOFTMAC_SCAN_TIME 400
|
#define IEEE80211_SOFTMAC_SCAN_TIME 400
|
||||||
/* HZ / 2) */
|
/* HZ / 2) */
|
||||||
#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
|
#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
|
||||||
|
|
||||||
#define CRC_LENGTH 4U
|
#define CRC_LENGTH 4U
|
||||||
|
|
||||||
#define MAX_WPA_IE_LEN (256)
|
#define MAX_WPA_IE_LEN (256)
|
||||||
#define MAX_WPS_IE_LEN (512)
|
#define MAX_WPS_IE_LEN (512)
|
||||||
|
@ -945,15 +945,15 @@ enum ieee80211_state {
|
||||||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||||
#define DEFAULT_FTS 2346
|
#define DEFAULT_FTS 2346
|
||||||
|
|
||||||
static __inline int is_multicast_mac_addr(const u8 *addr)
|
static inline int is_multicast_mac_addr(const u8 *addr)
|
||||||
{
|
{
|
||||||
return ((addr[0] != 0xff) && (0x01 & addr[0]));
|
return ((addr[0] != 0xff) && (0x01 & addr[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline int is_broadcast_mac_addr(const u8 *addr)
|
static inline int is_broadcast_mac_addr(const u8 *addr)
|
||||||
{
|
{
|
||||||
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
return (addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
||||||
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||||
|
@ -966,9 +966,9 @@ struct tx_pending {
|
||||||
|
|
||||||
#define MAXTID 16
|
#define MAXTID 16
|
||||||
|
|
||||||
#define IEEE_A (1<<0)
|
#define IEEE_A (1<<0)
|
||||||
#define IEEE_B (1<<1)
|
#define IEEE_B (1<<1)
|
||||||
#define IEEE_G (1<<2)
|
#define IEEE_G (1<<2)
|
||||||
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
|
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
|
||||||
|
|
||||||
/* Baron move to ieee80211.c */
|
/* Baron move to ieee80211.c */
|
||||||
|
@ -1048,7 +1048,6 @@ enum rtw_ieee80211_back_parties {
|
||||||
RTW_WLAN_BACK_TIMER = 2,
|
RTW_WLAN_BACK_TIMER = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||||
* 00:50:F2 */
|
* 00:50:F2 */
|
||||||
#define WME_OUI_TYPE 2
|
#define WME_OUI_TYPE 2
|
||||||
|
@ -1089,17 +1088,17 @@ enum rtw_ieee80211_back_parties {
|
||||||
* @RTW_IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel
|
* @RTW_IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel
|
||||||
* is not permitted.
|
* is not permitted.
|
||||||
*/
|
*/
|
||||||
enum rtw_ieee80211_channel_flags {
|
enum rtw_ieee80211_channel_flags {
|
||||||
RTW_IEEE80211_CHAN_DISABLED = 1<<0,
|
RTW_IEEE80211_CHAN_DISABLED = 1<<0,
|
||||||
RTW_IEEE80211_CHAN_PASSIVE_SCAN = 1<<1,
|
RTW_IEEE80211_CHAN_PASSIVE_SCAN = 1<<1,
|
||||||
RTW_IEEE80211_CHAN_NO_IBSS = 1<<2,
|
RTW_IEEE80211_CHAN_NO_IBSS = 1<<2,
|
||||||
RTW_IEEE80211_CHAN_RADAR = 1<<3,
|
RTW_IEEE80211_CHAN_RADAR = 1<<3,
|
||||||
RTW_IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
|
RTW_IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
|
||||||
RTW_IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
|
RTW_IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RTW_IEEE80211_CHAN_NO_HT40 \
|
#define RTW_IEEE80211_CHAN_NO_HT40 \
|
||||||
(RTW_IEEE80211_CHAN_NO_HT40PLUS | RTW_IEEE80211_CHAN_NO_HT40MINUS)
|
(RTW_IEEE80211_CHAN_NO_HT40PLUS | RTW_IEEE80211_CHAN_NO_HT40MINUS)
|
||||||
|
|
||||||
/* Represent channel details, subset of ieee80211_channel */
|
/* Represent channel details, subset of ieee80211_channel */
|
||||||
struct rtw_ieee80211_channel {
|
struct rtw_ieee80211_channel {
|
||||||
|
@ -1172,10 +1171,11 @@ enum parse_res {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
||||||
struct rtw_ieee802_11_elems *elems,
|
struct rtw_ieee802_11_elems *elems,
|
||||||
int show_errors);
|
int show_errors);
|
||||||
|
|
||||||
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
|
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len,
|
||||||
|
unsigned char *source, unsigned int *frlen);
|
||||||
u8 *rtw_set_ie(u8 *pbuf, int index, uint len, u8 *source, uint *frlen);
|
u8 *rtw_set_ie(u8 *pbuf, int index, uint len, u8 *source, uint *frlen);
|
||||||
|
|
||||||
enum secondary_ch_offset {
|
enum secondary_ch_offset {
|
||||||
|
@ -1185,30 +1185,40 @@ enum secondary_ch_offset {
|
||||||
};
|
};
|
||||||
u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset);
|
u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset);
|
||||||
u8 hal_ch_offset_to_secondary_ch_offset(u8 ch_offset);
|
u8 hal_ch_offset_to_secondary_ch_offset(u8 ch_offset);
|
||||||
u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u8 ch_switch_cnt);
|
u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
|
||||||
u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset);
|
u8 new_ch, u8 ch_switch_cnt);
|
||||||
u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl, u8 flags, u16 reason, u16 precedence);
|
u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
|
||||||
|
u8 secondary_ch_offset);
|
||||||
|
u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
|
||||||
|
u8 flags, u16 reason, u16 precedence);
|
||||||
|
|
||||||
u8 *rtw_get_ie(u8*pbuf, int index, int *len, int limit);
|
u8 *rtw_get_ie(u8*pbuf, int index, int *len, int limit);
|
||||||
u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen);
|
u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui,
|
||||||
int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 oui_len);
|
u8 oui_len, u8 *ie, uint *ielen);
|
||||||
|
int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset,
|
||||||
|
u8 eid, u8 *oui, u8 oui_len);
|
||||||
|
|
||||||
void rtw_set_supported_rate(u8* SupportedRates, uint mode) ;
|
void rtw_set_supported_rate(u8 *SupportedRates, uint mode);
|
||||||
|
|
||||||
unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit);
|
unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit);
|
||||||
unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit);
|
unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit);
|
||||||
int rtw_get_wpa_cipher_suite(u8 *s);
|
int rtw_get_wpa_cipher_suite(u8 *s);
|
||||||
int rtw_get_wpa2_cipher_suite(u8 *s);
|
int rtw_get_wpa2_cipher_suite(u8 *s);
|
||||||
int rtw_get_wapi_ie(u8 *in_ie,uint in_len,u8 *wapi_ie,u16 *wapi_len);
|
int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len);
|
||||||
int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
|
int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher,
|
||||||
int rtw_parse_wpa2_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
|
int *pairwise_cipher, int *is_8021x);
|
||||||
|
int rtw_parse_wpa2_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher,
|
||||||
|
int *pairwise_cipher, int *is_8021x);
|
||||||
|
|
||||||
int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len);
|
int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
|
||||||
|
u8 *wpa_ie, u16 *wpa_len);
|
||||||
|
|
||||||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen);
|
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen);
|
||||||
u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen);
|
u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen);
|
||||||
u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr);
|
u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
|
||||||
u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content);
|
u8 *buf_attr, u32 *len_attr);
|
||||||
|
u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
|
||||||
|
u8 *buf_content, uint *len_content);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* for_each_ie - iterate over continuous IEs
|
* for_each_ie - iterate over continuous IEs
|
||||||
|
@ -1217,7 +1227,8 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8
|
||||||
* @buf_len:
|
* @buf_len:
|
||||||
*/
|
*/
|
||||||
#define for_each_ie(ie, buf, buf_len) \
|
#define for_each_ie(ie, buf, buf_len) \
|
||||||
for (ie = (void*)buf; (((u8*)ie) - ((u8*)buf) + 1) < buf_len; ie = (void*)(((u8*)ie) + *(((u8*)ie)+1) + 2))
|
for (ie = (void*)buf; (((u8*)ie) - ((u8*)buf) + 1) < buf_len; \
|
||||||
|
ie = (void*)(((u8*)ie) + *(((u8*)ie)+1) + 2))
|
||||||
|
|
||||||
void dump_ies(u8 *buf, u32 buf_len);
|
void dump_ies(u8 *buf, u32 buf_len);
|
||||||
void dump_wps_ie(u8 *ie, u32 ie_len);
|
void dump_wps_ie(u8 *ie, u32 ie_len);
|
||||||
|
@ -1225,10 +1236,14 @@ void dump_wps_ie(u8 *ie, u32 ie_len);
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
void dump_p2p_ie(u8 *ie, u32 ie_len);
|
void dump_p2p_ie(u8 *ie, u32 ie_len);
|
||||||
u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
|
u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
|
||||||
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr, u32 *len_attr);
|
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
|
||||||
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_content, uint *len_content);
|
u8 *buf_attr, u32 *len_attr);
|
||||||
u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr);
|
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
|
||||||
void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id);
|
u8 *buf_content, uint *len_content);
|
||||||
|
u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len,
|
||||||
|
u8 *pdata_attr);
|
||||||
|
void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex,
|
||||||
|
u8 attr_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint rtw_get_rateset_len(u8 *rateset);
|
uint rtw_get_rateset_len(u8 *rateset);
|
||||||
|
@ -1249,9 +1264,11 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork);
|
||||||
|
|
||||||
void rtw_macaddr_cfg(u8 *mac_addr);
|
void rtw_macaddr_cfg(u8 *mac_addr);
|
||||||
|
|
||||||
u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40, unsigned char * MCS_rate);
|
u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
|
||||||
|
unsigned char *MCS_rate);
|
||||||
|
|
||||||
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *action);
|
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category,
|
||||||
|
u8 *action);
|
||||||
const char *action_public_str(u8 action);
|
const char *action_public_str(u8 action);
|
||||||
|
|
||||||
#endif /* IEEE80211_H */
|
#endif /* IEEE80211_H */
|
||||||
|
|
|
@ -52,13 +52,13 @@ struct wpa_ie_hdr {
|
||||||
u8 len;
|
u8 len;
|
||||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||||
u8 version[2]; /* little endian */
|
u8 version[2]; /* little endian */
|
||||||
}__attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct rsn_ie_hdr {
|
struct rsn_ie_hdr {
|
||||||
u8 elem_id; /* WLAN_EID_RSN */
|
u8 elem_id; /* WLAN_EID_RSN */
|
||||||
u8 len;
|
u8 len;
|
||||||
u8 version[2]; /* little endian */
|
u8 version[2]; /* little endian */
|
||||||
}__attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct wme_ac_parameter {
|
struct wme_ac_parameter {
|
||||||
#if defined(__LITTLE_ENDIAN)
|
#if defined(__LITTLE_ENDIAN)
|
||||||
|
@ -87,7 +87,7 @@ struct wme_ac_parameter {
|
||||||
|
|
||||||
/* bytes 3 & 4 */
|
/* bytes 3 & 4 */
|
||||||
u16 txopLimit;
|
u16 txopLimit;
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
struct wme_parameter_element {
|
struct wme_parameter_element {
|
||||||
/* required fields for WME version 1 */
|
/* required fields for WME version 1 */
|
||||||
|
@ -99,7 +99,7 @@ struct wme_parameter_element {
|
||||||
u8 reserved;
|
u8 reserved;
|
||||||
struct wme_ac_parameter ac[4];
|
struct wme_ac_parameter ac[4];
|
||||||
|
|
||||||
} __attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
#define WPA_PUT_LE16(a, val) \
|
#define WPA_PUT_LE16(a, val) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -123,7 +123,7 @@ struct wme_parameter_element {
|
||||||
(a)[0] = (u8) (((u32) (val)) & 0xff); \
|
(a)[0] = (u8) (((u32) (val)) & 0xff); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val))
|
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *)(a), (val))
|
||||||
|
|
||||||
/* Action category code */
|
/* Action category code */
|
||||||
enum ieee80211_category {
|
enum ieee80211_category {
|
||||||
|
@ -155,14 +155,14 @@ enum ieee80211_back_actioncode {
|
||||||
/* HT features action code */
|
/* HT features action code */
|
||||||
enum ieee80211_ht_actioncode {
|
enum ieee80211_ht_actioncode {
|
||||||
WLAN_ACTION_NOTIFY_CH_WIDTH = 0,
|
WLAN_ACTION_NOTIFY_CH_WIDTH = 0,
|
||||||
WLAN_ACTION_SM_PS = 1,
|
WLAN_ACTION_SM_PS = 1,
|
||||||
WLAN_ACTION_PSPM = 2,
|
WLAN_ACTION_PSPM = 2,
|
||||||
WLAN_ACTION_PCO_PHASE = 3,
|
WLAN_ACTION_PCO_PHASE = 3,
|
||||||
WLAN_ACTION_MIMO_CSI_MX = 4,
|
WLAN_ACTION_MIMO_CSI_MX = 4,
|
||||||
WLAN_ACTION_MIMO_NONCP_BF = 5,
|
WLAN_ACTION_MIMO_NONCP_BF = 5,
|
||||||
WLAN_ACTION_MIMP_CP_BF = 6,
|
WLAN_ACTION_MIMP_CP_BF = 6,
|
||||||
WLAN_ACTION_ASEL_INDICATES_FB = 7,
|
WLAN_ACTION_ASEL_INDICATES_FB = 7,
|
||||||
WLAN_ACTION_HI_INFO_EXCHG = 8,
|
WLAN_ACTION_HI_INFO_EXCHG = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* BACK (block-ack) parties */
|
/* BACK (block-ack) parties */
|
||||||
|
@ -186,33 +186,33 @@ struct ieee80211_mgmt {
|
||||||
u16 status_code;
|
u16 status_code;
|
||||||
/* possibly followed by Challenge text */
|
/* possibly followed by Challenge text */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) auth;
|
} __packed auth;
|
||||||
struct {
|
struct {
|
||||||
u16 reason_code;
|
u16 reason_code;
|
||||||
} __attribute__ ((packed)) deauth;
|
} __packed deauth;
|
||||||
struct {
|
struct {
|
||||||
u16 capab_info;
|
u16 capab_info;
|
||||||
u16 listen_interval;
|
u16 listen_interval;
|
||||||
/* followed by SSID and Supported rates */
|
/* followed by SSID and Supported rates */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) assoc_req;
|
} __packed assoc_req;
|
||||||
struct {
|
struct {
|
||||||
u16 capab_info;
|
u16 capab_info;
|
||||||
u16 status_code;
|
u16 status_code;
|
||||||
u16 aid;
|
u16 aid;
|
||||||
/* followed by Supported rates */
|
/* followed by Supported rates */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) assoc_resp, reassoc_resp;
|
} __packed assoc_resp, reassoc_resp;
|
||||||
struct {
|
struct {
|
||||||
u16 capab_info;
|
u16 capab_info;
|
||||||
u16 listen_interval;
|
u16 listen_interval;
|
||||||
u8 current_ap[6];
|
u8 current_ap[6];
|
||||||
/* followed by SSID and Supported rates */
|
/* followed by SSID and Supported rates */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) reassoc_req;
|
} __packed reassoc_req;
|
||||||
struct {
|
struct {
|
||||||
u16 reason_code;
|
u16 reason_code;
|
||||||
} __attribute__ ((packed)) disassoc;
|
} __packed disassoc;
|
||||||
struct {
|
struct {
|
||||||
__le64 timestamp;
|
__le64 timestamp;
|
||||||
u16 beacon_int;
|
u16 beacon_int;
|
||||||
|
@ -220,11 +220,11 @@ struct ieee80211_mgmt {
|
||||||
/* followed by some of SSID, Supported rates,
|
/* followed by some of SSID, Supported rates,
|
||||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) beacon;
|
} __packed beacon;
|
||||||
struct {
|
struct {
|
||||||
/* only variable items: SSID, Supported rates */
|
/* only variable items: SSID, Supported rates */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) probe_req;
|
} __packed probe_req;
|
||||||
struct {
|
struct {
|
||||||
__le64 timestamp;
|
__le64 timestamp;
|
||||||
u16 beacon_int;
|
u16 beacon_int;
|
||||||
|
@ -232,7 +232,7 @@ struct ieee80211_mgmt {
|
||||||
/* followed by some of SSID, Supported rates,
|
/* followed by some of SSID, Supported rates,
|
||||||
* FH Params, DS Params, CF Params, IBSS Params */
|
* FH Params, DS Params, CF Params, IBSS Params */
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) probe_resp;
|
} __packed probe_resp;
|
||||||
struct {
|
struct {
|
||||||
u8 category;
|
u8 category;
|
||||||
union {
|
union {
|
||||||
|
@ -241,27 +241,27 @@ struct ieee80211_mgmt {
|
||||||
u8 dialog_token;
|
u8 dialog_token;
|
||||||
u8 status_code;
|
u8 status_code;
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) wme_action;
|
} __packed wme_action;
|
||||||
struct{
|
struct {
|
||||||
u8 action_code;
|
u8 action_code;
|
||||||
u8 dialog_token;
|
u8 dialog_token;
|
||||||
u16 capab;
|
u16 capab;
|
||||||
u16 timeout;
|
u16 timeout;
|
||||||
u16 start_seq_num;
|
u16 start_seq_num;
|
||||||
} __attribute__ ((packed)) addba_req;
|
} __packed addba_req;
|
||||||
struct{
|
struct {
|
||||||
u8 action_code;
|
u8 action_code;
|
||||||
u8 dialog_token;
|
u8 dialog_token;
|
||||||
u16 status;
|
u16 status;
|
||||||
u16 capab;
|
u16 capab;
|
||||||
u16 timeout;
|
u16 timeout;
|
||||||
} __attribute__ ((packed)) addba_resp;
|
} __packed addba_resp;
|
||||||
struct{
|
struct {
|
||||||
u8 action_code;
|
u8 action_code;
|
||||||
u16 params;
|
u16 params;
|
||||||
u16 reason_code;
|
u16 reason_code;
|
||||||
} __attribute__ ((packed)) delba;
|
} __packed delba;
|
||||||
struct{
|
structi {
|
||||||
u8 action_code;
|
u8 action_code;
|
||||||
/* capab_info for open and confirm,
|
/* capab_info for open and confirm,
|
||||||
* reason for close
|
* reason for close
|
||||||
|
@ -273,15 +273,15 @@ struct ieee80211_mgmt {
|
||||||
* plink_open and plink_close
|
* plink_open and plink_close
|
||||||
*/
|
*/
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) plink_action;
|
} __packed plink_action;
|
||||||
struct{
|
struct{
|
||||||
u8 action_code;
|
u8 action_code;
|
||||||
u8 variable[0];
|
u8 variable[0];
|
||||||
} __attribute__ ((packed)) mesh_action;
|
} __packed mesh_action;
|
||||||
} __attribute__ ((packed)) u;
|
} __packed u;
|
||||||
} __attribute__ ((packed)) action;
|
} __packed action;
|
||||||
} __attribute__ ((packed)) u;
|
} __packed u;
|
||||||
}__attribute__ ((packed));
|
} __packed;
|
||||||
|
|
||||||
/* mgmt header + 1 byte category code */
|
/* mgmt header + 1 byte category code */
|
||||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
|
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
|
||||||
#define ETH_P_X25 0x0805 /* CCITT X.25 */
|
#define ETH_P_X25 0x0805 /* CCITT X.25 */
|
||||||
#define ETH_P_ARP 0x0806 /* Address Resolution packet */
|
#define ETH_P_ARP 0x0806 /* Address Resolution packet */
|
||||||
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
|
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet */
|
||||||
#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
|
#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
|
||||||
#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */
|
#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP */
|
||||||
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
|
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
|
||||||
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
|
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
|
||||||
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
|
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
|
||||||
|
@ -98,15 +98,15 @@ struct ethhdr
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _vlan {
|
struct _vlan {
|
||||||
unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */
|
unsigned short h_vlan_TCI; /* Encap prio and VLAN ID */
|
||||||
unsigned short h_vlan_encapsulated_proto;
|
unsigned short h_vlan_encapsulated_proto;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define get_vlan_id(pvlan) \
|
||||||
|
((ntohs((unsigned short )pvlan->h_vlan_TCI)) & 0xfff)
|
||||||
#define get_vlan_id(pvlan) ((ntohs((unsigned short )pvlan->h_vlan_TCI)) & 0xfff)
|
#define get_vlan_priority(pvlan) \
|
||||||
#define get_vlan_priority(pvlan) ((ntohs((unsigned short )pvlan->h_vlan_TCI))>>13)
|
((ntohs((unsigned short )pvlan->h_vlan_TCI))>>13)
|
||||||
#define get_vlan_encap_proto(pvlan) (ntohs((unsigned short )pvlan->h_vlan_encapsulated_proto))
|
#define get_vlan_encap_proto(pvlan) \
|
||||||
|
(ntohs((unsigned short)pvlan->h_vlan_encapsulated_proto))
|
||||||
|
|
||||||
#endif /* _LINUX_IF_ETHER_H */
|
#endif /* _LINUX_IF_ETHER_H */
|
||||||
|
|
|
@ -37,8 +37,7 @@ struct rtw_wdev_invit_info {
|
||||||
(invit_info)->rsp_op_ch = 0; \
|
(invit_info)->rsp_op_ch = 0; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
struct rtw_wdev_priv
|
struct rtw_wdev_priv {
|
||||||
{
|
|
||||||
struct wireless_dev *rtw_wdev;
|
struct wireless_dev *rtw_wdev;
|
||||||
|
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
@ -47,7 +46,7 @@ struct rtw_wdev_priv
|
||||||
spinlock_t scan_req_lock;
|
spinlock_t scan_req_lock;
|
||||||
|
|
||||||
struct net_device *pmon_ndev;/* for monitor interface */
|
struct net_device *pmon_ndev;/* for monitor interface */
|
||||||
char ifname_mon[IFNAMSIZ + 1]; /* interface name for monitor interface */
|
char ifname_mon[IFNAMSIZ + 1]; /* name of monitor interface */
|
||||||
|
|
||||||
u8 p2p_enabled;
|
u8 p2p_enabled;
|
||||||
|
|
||||||
|
@ -62,9 +61,11 @@ struct rtw_wdev_priv
|
||||||
|
|
||||||
#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
|
#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
|
||||||
|
|
||||||
#define wiphy_tostruct adapter(x) (struct adapter *)(((struct rtw_wdev_priv*)wiphy_priv(x))->padapter)
|
#define wiphy_tostruct adapter(x) \
|
||||||
|
((struct adapter *)(((struct rtw_wdev_priv *)wiphy_priv(x))->padapter))
|
||||||
|
|
||||||
#define wiphy_to_wdev(x) (struct wireless_dev *)(((struct rtw_wdev_priv*)wiphy_priv(x))->rtw_wdev)
|
#define wiphy_to_wdev(x) \
|
||||||
|
((struct wireless_dev *)(((struct rtw_wdev_priv *)wiphy_priv(x))->rtw_wdev))
|
||||||
|
|
||||||
int rtw_wdev_alloc(struct adapter *padapter, struct device *dev);
|
int rtw_wdev_alloc(struct adapter *padapter, struct device *dev);
|
||||||
void rtw_wdev_free(struct wireless_dev *wdev);
|
void rtw_wdev_free(struct wireless_dev *wdev);
|
||||||
|
@ -76,28 +77,42 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter);
|
||||||
|
|
||||||
void rtw_cfg80211_indicate_connect(struct adapter *padapter);
|
void rtw_cfg80211_indicate_connect(struct adapter *padapter);
|
||||||
void rtw_cfg80211_indicate_disconnect(struct adapter *padapter);
|
void rtw_cfg80211_indicate_disconnect(struct adapter *padapter);
|
||||||
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted);
|
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv,
|
||||||
|
bool aborted);
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter,
|
||||||
void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char *da, unsigned short reason);
|
u8 *pmgmt_frame, uint frame_len);
|
||||||
|
void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter,
|
||||||
|
unsigned char *da,
|
||||||
|
unsigned short reason);
|
||||||
#endif /* CONFIG_AP_MODE */
|
#endif /* CONFIG_AP_MODE */
|
||||||
|
|
||||||
void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8 *buf, size_t len);
|
void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter,
|
||||||
void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
const u8 *buf, size_t len);
|
||||||
void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter,
|
||||||
void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len, const char*msg);
|
u8 *pmgmt_frame, uint frame_len);
|
||||||
|
void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame,
|
||||||
|
uint frame_len);
|
||||||
|
void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame,
|
||||||
|
uint frame_len, const char *msg);
|
||||||
|
|
||||||
int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, int type);
|
int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net,
|
||||||
|
char *buf, int len, int type);
|
||||||
|
|
||||||
bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter);
|
bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter);
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && !defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && \
|
||||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, buf, len, gfp)
|
!defined(COMPAT_KERNEL_RELEASE)
|
||||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, buf, len)
|
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) \
|
||||||
|
cfg80211_rx_mgmt(dev, freq, buf, len, gfp)
|
||||||
|
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) \
|
||||||
|
cfg80211_send_rx_assoc(dev, buf, len)
|
||||||
#else
|
#else
|
||||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)
|
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) \
|
||||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, bss, buf, len)
|
cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)
|
||||||
|
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) \
|
||||||
|
cfg80211_send_rx_assoc(dev, bss, buf, len)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __IOCTL_CFG80211_H__ */
|
#endif /* __IOCTL_CFG80211_H__ */
|
||||||
|
|
69
include/ip.h
69
include/ip.h
|
@ -55,28 +55,19 @@
|
||||||
#define IPOPT_MEASUREMENT 0x40
|
#define IPOPT_MEASUREMENT 0x40
|
||||||
#define IPOPT_RESERVED2 0x60
|
#define IPOPT_RESERVED2 0x60
|
||||||
|
|
||||||
#define IPOPT_END (0 |IPOPT_CONTROL)
|
#define IPOPT_END (0 | IPOPT_CONTROL)
|
||||||
#define IPOPT_NOOP (1 |IPOPT_CONTROL)
|
#define IPOPT_NOOP (1 | IPOPT_CONTROL)
|
||||||
#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
|
#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY)
|
||||||
#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY)
|
#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY)
|
||||||
#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
|
#define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT)
|
||||||
#define IPOPT_RR (7 |IPOPT_CONTROL)
|
#define IPOPT_RR (7 | IPOPT_CONTROL)
|
||||||
#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
|
#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY)
|
||||||
#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
|
#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY)
|
||||||
#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
|
#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY)
|
||||||
|
|
||||||
#define IPVERSION 4
|
#define IPVERSION 4
|
||||||
#define MAXTTL 255
|
#define MAXTTL 255
|
||||||
#define IPDEFTTL 64
|
#define IPDEFTTL 64
|
||||||
|
|
||||||
/* struct timestamp, struct route and MAX_ROUTES are removed.
|
|
||||||
|
|
||||||
REASONS: it is clear that nobody used them because:
|
|
||||||
- MAX_ROUTES value was wrong.
|
|
||||||
- "struct route" was wrong.
|
|
||||||
- "struct timestamp" had fatally misaligned bitfields and was completely unusable.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define IPOPT_OPTVAL 0
|
#define IPOPT_OPTVAL 0
|
||||||
#define IPOPT_OLEN 1
|
#define IPOPT_OLEN 1
|
||||||
#define IPOPT_OFFSET 2
|
#define IPOPT_OFFSET 2
|
||||||
|
@ -86,28 +77,28 @@
|
||||||
#define IPOPT_EOL IPOPT_END
|
#define IPOPT_EOL IPOPT_END
|
||||||
#define IPOPT_TS IPOPT_TIMESTAMP
|
#define IPOPT_TS IPOPT_TIMESTAMP
|
||||||
|
|
||||||
#define IPOPT_TS_TSONLY 0 /* timestamps only */
|
#define IPOPT_TS_TSONLY 0 /* timestamps only */
|
||||||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
||||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
||||||
|
|
||||||
struct ip_options {
|
struct ip_options {
|
||||||
__u32 faddr; /* Saved first hop address */
|
__u32 faddr; /* Saved first hop address */
|
||||||
unsigned char optlen;
|
unsigned char optlen;
|
||||||
unsigned char srr;
|
unsigned char srr;
|
||||||
unsigned char rr;
|
unsigned char rr;
|
||||||
unsigned char ts;
|
unsigned char ts;
|
||||||
unsigned char is_setbyuser:1, /* Set by setsockopt? */
|
unsigned char is_setbyuser:1, /* Set by setsockopt? */
|
||||||
is_data:1, /* Options in __data, rather than skb */
|
is_data:1, /* Options in __data, rather than skb*/
|
||||||
is_strictroute:1, /* Strict source route */
|
is_strictroute:1,/* Strict source route */
|
||||||
srr_is_hit:1, /* Packet destination addr was our one */
|
srr_is_hit:1, /* Packet destn addr was ours */
|
||||||
is_changed:1, /* IP checksum more not valid */
|
is_changed:1, /* IP checksum more not valid */
|
||||||
rr_needaddr:1, /* Need to record addr of outgoing dev */
|
rr_needaddr:1, /* Need to record addr of out dev*/
|
||||||
ts_needtime:1, /* Need to record timestamp */
|
ts_needtime:1, /* Need to record timestamp */
|
||||||
ts_needaddr:1; /* Need to record addr of outgoing dev */
|
ts_needaddr:1; /* Need to record addr of out dev */
|
||||||
unsigned char router_alert;
|
unsigned char router_alert;
|
||||||
unsigned char __pad1;
|
unsigned char __pad1;
|
||||||
unsigned char __pad2;
|
unsigned char __pad2;
|
||||||
unsigned char __data[0];
|
unsigned char __data[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||||
|
@ -119,8 +110,6 @@ struct iphdr {
|
||||||
#elif defined (__BIG_ENDIAN_BITFIELD)
|
#elif defined (__BIG_ENDIAN_BITFIELD)
|
||||||
__u8 version:4,
|
__u8 version:4,
|
||||||
ihl:4;
|
ihl:4;
|
||||||
#else
|
|
||||||
#error "Please fix <asm/byteorder.h>"
|
|
||||||
#endif
|
#endif
|
||||||
__u8 tos;
|
__u8 tos;
|
||||||
__u16 tot_len;
|
__u16 tot_len;
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef OID_802_11_CAPABILITY
|
#ifndef OID_802_11_CAPABILITY
|
||||||
#define OID_802_11_CAPABILITY 0x0d010122
|
#define OID_802_11_CAPABILITY 0x0d010122
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OID_802_11_PMKID
|
#ifndef OID_802_11_PMKID
|
||||||
#define OID_802_11_PMKID 0x0d010123
|
#define OID_802_11_PMKID 0x0d010123
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,16 +45,16 @@
|
||||||
#define OID_NDIS_SEG9 0x0D010200
|
#define OID_NDIS_SEG9 0x0D010200
|
||||||
#define OID_NDIS_SEG10 0x0D020200
|
#define OID_NDIS_SEG10 0x0D020200
|
||||||
|
|
||||||
#define SZ_OID_NDIS_SEG1 23
|
#define SZ_OID_NDIS_SEG1 23
|
||||||
#define SZ_OID_NDIS_SEG2 3
|
#define SZ_OID_NDIS_SEG2 3
|
||||||
#define SZ_OID_NDIS_SEG3 6
|
#define SZ_OID_NDIS_SEG3 6
|
||||||
#define SZ_OID_NDIS_SEG4 6
|
#define SZ_OID_NDIS_SEG4 6
|
||||||
#define SZ_OID_NDIS_SEG5 4
|
#define SZ_OID_NDIS_SEG5 4
|
||||||
#define SZ_OID_NDIS_SEG6 8
|
#define SZ_OID_NDIS_SEG6 8
|
||||||
#define SZ_OID_NDIS_SEG7 7
|
#define SZ_OID_NDIS_SEG7 7
|
||||||
#define SZ_OID_NDIS_SEG8 36
|
#define SZ_OID_NDIS_SEG8 36
|
||||||
#define SZ_OID_NDIS_SEG9 24
|
#define SZ_OID_NDIS_SEG9 24
|
||||||
#define SZ_OID_NDIS_SEG10 19
|
#define SZ_OID_NDIS_SEG10 19
|
||||||
|
|
||||||
/* For Realtek-defined OIDs */
|
/* For Realtek-defined OIDs */
|
||||||
#define OID_MP_SEG1 0xFF871100
|
#define OID_MP_SEG1 0xFF871100
|
||||||
|
@ -63,15 +63,13 @@
|
||||||
#define OID_MP_SEG3 0xFF818700
|
#define OID_MP_SEG3 0xFF818700
|
||||||
#define OID_MP_SEG4 0xFF011100
|
#define OID_MP_SEG4 0xFF011100
|
||||||
|
|
||||||
#define DEBUG_OID(dbg, str) \
|
#define DEBUG_OID(dbg, str) \
|
||||||
if ((!dbg)) \
|
if ((!dbg)) { \
|
||||||
{ \
|
RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_, \
|
||||||
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_info_,("%s(%d): %s", __func__, __LINE__, str)); \
|
("%s(%d): %s", __func__, __LINE__, str)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum oid_type {
|
||||||
enum oid_type
|
|
||||||
{
|
|
||||||
QUERY_OID,
|
QUERY_OID,
|
||||||
SET_OID
|
SET_OID
|
||||||
};
|
};
|
||||||
|
@ -99,11 +97,11 @@ struct oid_par_priv
|
||||||
|
|
||||||
struct oid_obj_priv {
|
struct oid_obj_priv {
|
||||||
unsigned char dbg; /* 0: without OID debug message 1: with OID debug message */
|
unsigned char dbg; /* 0: without OID debug message 1: with OID debug message */
|
||||||
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
int (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(_RTW_MP_IOCTL_C_)
|
#if defined(_RTW_MP_IOCTL_C_)
|
||||||
static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv)
|
static int oid_null_function(struct oid_par_priv* poid_par_priv)
|
||||||
{
|
{
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
@ -115,23 +113,14 @@ static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv)
|
||||||
extern struct iw_handler_def rtw_handlers_def;
|
extern struct iw_handler_def rtw_handlers_def;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern NDIS_STATUS drv_query_info(
|
int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
|
||||||
struct net_device *MiniportAdapterContext,
|
void *informationbuffer, u32 informationbufferlength,
|
||||||
NDIS_OID Oid,
|
u32 *byteswritten, u32 *bytesneeded);
|
||||||
void * InformationBuffer,
|
|
||||||
u32 InformationBufferLength,
|
|
||||||
u32* BytesWritten,
|
|
||||||
u32* BytesNeeded
|
|
||||||
);
|
|
||||||
|
|
||||||
extern NDIS_STATUS drv_set_info(
|
int drv_set_info(struct net_device *MiniportAdapterContext,
|
||||||
struct net_device *MiniportAdapterContext,
|
NDIS_OID oid, void *informationbuffer,
|
||||||
NDIS_OID Oid,
|
u32 informationbufferlength, u32 *bytesread,
|
||||||
void * InformationBuffer,
|
u32 *bytesneeded);
|
||||||
u32 InformationBufferLength,
|
|
||||||
u32* BytesRead,
|
|
||||||
u32* BytesNeeded
|
|
||||||
);
|
|
||||||
|
|
||||||
extern int ui_pid[3];
|
extern int ui_pid[3];
|
||||||
|
|
||||||
|
|
|
@ -24,57 +24,57 @@
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
/* oid_rtl_seg_01_01 ************** */
|
/* oid_rtl_seg_01_01 ************** */
|
||||||
NDIS_STATUS oid_rt_get_signal_quality_hdl(struct oid_par_priv* poid_par_priv);/* 84 */
|
int oid_rt_get_signal_quality_hdl(struct oid_par_priv* poid_par_priv);/* 84 */
|
||||||
NDIS_STATUS oid_rt_get_small_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_small_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_middle_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_middle_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_large_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_large_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_tx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_tx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_rx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_rx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_rx_total_packet_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_rx_total_packet_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_tx_beacon_ok_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_tx_beacon_ok_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_tx_beacon_err_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_tx_beacon_err_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv* poid_par_priv); /* 8a */
|
int oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv* poid_par_priv); /* 8a */
|
||||||
NDIS_STATUS oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv* poid_par_priv); /* 8b */
|
int oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv* poid_par_priv); /* 8b */
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_get_rx_icv_err_hdl(struct oid_par_priv* poid_par_priv);/* 93 */
|
int oid_rt_get_rx_icv_err_hdl(struct oid_par_priv* poid_par_priv);/* 93 */
|
||||||
NDIS_STATUS oid_rt_set_encryption_algorithm_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_encryption_algorithm_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_ap_ip_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_ap_ip_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_bcn_intvl_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_bcn_intvl_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_dedicate_probe_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_dedicate_probe_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_total_tx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_total_tx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_current_tx_power_level_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_current_tx_power_level_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_enc_key_mismatch_count_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_enc_key_mismatch_count_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_enc_key_match_count_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_enc_key_match_count_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_channel_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_channel_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_hardware_radio_off_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_hardware_radio_off_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_key_mismatch_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_key_mismatch_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_supported_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_supported_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_channel_list_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_channel_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_scan_in_progress_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_scan_in_progress_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_forced_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_forced_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_wireless_mode_for_scan_list_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_wireless_mode_for_scan_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_bss_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_bss_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_scan_with_magic_packet_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_scan_with_magic_packet_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
||||||
/* oid_rtl_seg_01_03 section start ************** */
|
/* oid_rtl_seg_01_03 section start ************** */
|
||||||
NDIS_STATUS oid_rt_ap_get_associated_station_list_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_ap_get_associated_station_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_ap_switch_into_ap_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_ap_switch_into_ap_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_ap_supported_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_ap_supported_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_ap_set_passphrase_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_ap_set_passphrase_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
||||||
/* oid_rtl_seg_01_11 */
|
/* oid_rtl_seg_01_11 */
|
||||||
NDIS_STATUS oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
||||||
/* oid_rtl_seg_03_00 section start ************** */
|
/* oid_rtl_seg_03_00 section start ************** */
|
||||||
NDIS_STATUS oid_rt_get_connect_state_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_connect_state_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_default_key_id_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_default_key_id_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,56 +29,56 @@
|
||||||
#define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL)
|
#define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL)
|
||||||
#define STATUS_NOT_SUPPORTED (0xC00000BBL)
|
#define STATUS_NOT_SUPPORTED (0xC00000BBL)
|
||||||
|
|
||||||
#define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
|
#define NDIS_STATUS_SUCCESS ((int)STATUS_SUCCESS)
|
||||||
#define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
|
#define NDIS_STATUS_PENDING ((int)STATUS_PENDING)
|
||||||
#define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
|
#define NDIS_STATUS_NOT_RECOGNIZED ((int)0x00010001L)
|
||||||
#define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
|
#define NDIS_STATUS_NOT_COPIED ((int)0x00010002L)
|
||||||
#define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
|
#define NDIS_STATUS_NOT_ACCEPTED ((int)0x00010003L)
|
||||||
#define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
|
#define NDIS_STATUS_CALL_ACTIVE ((int)0x00010007L)
|
||||||
|
|
||||||
#define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
|
#define NDIS_STATUS_FAILURE ((int)STATUS_UNSUCCESSFUL)
|
||||||
#define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
|
#define NDIS_STATUS_RESOURCES ((int)STATUS_INSUFFICIENT_RESOURCES)
|
||||||
#define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
|
#define NDIS_STATUS_CLOSING ((int)0xC0010002L)
|
||||||
#define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
|
#define NDIS_STATUS_BAD_VERSION ((int)0xC0010004L)
|
||||||
#define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
|
#define NDIS_STATUS_BAD_CHARACTERISTICS ((int)0xC0010005L)
|
||||||
#define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
|
#define NDIS_STATUS_ADAPTER_NOT_FOUND ((int)0xC0010006L)
|
||||||
#define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
|
#define NDIS_STATUS_OPEN_FAILED ((int)0xC0010007L)
|
||||||
#define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
|
#define NDIS_STATUS_DEVICE_FAILED ((int)0xC0010008L)
|
||||||
#define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
|
#define NDIS_STATUS_MULTICAST_FULL ((int)0xC0010009L)
|
||||||
#define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
|
#define NDIS_STATUS_MULTICAST_EXISTS ((int)0xC001000AL)
|
||||||
#define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
|
#define NDIS_STATUS_MULTICAST_NOT_FOUND ((int)0xC001000BL)
|
||||||
#define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
|
#define NDIS_STATUS_REQUEST_ABORTED ((int)0xC001000CL)
|
||||||
#define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
|
#define NDIS_STATUS_RESET_IN_PROGRESS ((int)0xC001000DL)
|
||||||
#define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
|
#define NDIS_STATUS_CLOSING_INDICATING ((int)0xC001000EL)
|
||||||
#define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
|
#define NDIS_STATUS_NOT_SUPPORTED ((int)STATUS_NOT_SUPPORTED)
|
||||||
#define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
|
#define NDIS_STATUS_INVALID_PACKET ((int)0xC001000FL)
|
||||||
#define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
|
#define NDIS_STATUS_OPEN_LIST_FULL ((int)0xC0010010L)
|
||||||
#define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
|
#define NDIS_STATUS_ADAPTER_NOT_READY ((int)0xC0010011L)
|
||||||
#define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
|
#define NDIS_STATUS_ADAPTER_NOT_OPEN ((int)0xC0010012L)
|
||||||
#define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
|
#define NDIS_STATUS_NOT_INDICATING ((int)0xC0010013L)
|
||||||
#define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
|
#define NDIS_STATUS_INVALID_LENGTH ((int)0xC0010014L)
|
||||||
#define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
|
#define NDIS_STATUS_INVALID_DATA ((int)0xC0010015L)
|
||||||
#define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
|
#define NDIS_STATUS_BUFFER_TOO_SHORT ((int)0xC0010016L)
|
||||||
#define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
|
#define NDIS_STATUS_INVALID_OID ((int)0xC0010017L)
|
||||||
#define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
|
#define NDIS_STATUS_ADAPTER_REMOVED ((int)0xC0010018L)
|
||||||
#define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
|
#define NDIS_STATUS_UNSUPPORTED_MEDIA ((int)0xC0010019L)
|
||||||
#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
|
#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((int)0xC001001AL)
|
||||||
#define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
|
#define NDIS_STATUS_FILE_NOT_FOUND ((int)0xC001001BL)
|
||||||
#define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
|
#define NDIS_STATUS_ERROR_READING_FILE ((int)0xC001001CL)
|
||||||
#define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
|
#define NDIS_STATUS_ALREADY_MAPPED ((int)0xC001001DL)
|
||||||
#define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
|
#define NDIS_STATUS_RESOURCE_CONFLICT ((int)0xC001001EL)
|
||||||
#define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
|
#define NDIS_STATUS_NO_CABLE ((int)0xC001001FL)
|
||||||
|
|
||||||
#define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
|
#define NDIS_STATUS_INVALID_SAP ((int)0xC0010020L)
|
||||||
#define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
|
#define NDIS_STATUS_SAP_IN_USE ((int)0xC0010021L)
|
||||||
#define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
|
#define NDIS_STATUS_INVALID_ADDRESS ((int)0xC0010022L)
|
||||||
#define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
|
#define NDIS_STATUS_VC_NOT_ACTIVATED ((int)0xC0010023L)
|
||||||
#define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L) /* cause 27 */
|
#define NDIS_STATUS_DEST_OUT_OF_ORDER ((int)0xC0010024L) /* cause 27 */
|
||||||
#define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L) /* cause 35,45 */
|
#define NDIS_STATUS_VC_NOT_AVAILABLE ((int)0xC0010025L) /* cause 35,45 */
|
||||||
#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L) /* cause 37 */
|
#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((int)0xC0010026L) /* cause 37 */
|
||||||
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */
|
#define NDIS_STATUS_INCOMPATABLE_QOS ((int)0xC0010027L) /* cause 49 */
|
||||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */
|
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((int)0xC0010028L) /* cause 93 */
|
||||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */
|
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((int)0xC0010029L) /* cause 3 */
|
||||||
|
|
||||||
enum antenna_path {
|
enum antenna_path {
|
||||||
ANTENNA_NONE = 0x00,
|
ANTENNA_NONE = 0x00,
|
||||||
|
|
|
@ -66,109 +66,94 @@ struct dr_variable_struct {
|
||||||
u32 variable;
|
u32 variable;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _irqlevel_changed_(a,b)
|
#define _irqlevel_changed_(a, b)
|
||||||
|
|
||||||
/* oid_rtl_seg_81_80_00 */
|
/* oid_rtl_seg_81_80_00 */
|
||||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
|
||||||
/* oid_rtl_seg_81_80_20 */
|
/* oid_rtl_seg_81_80_20 */
|
||||||
NDIS_STATUS oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_query_rx_packet_received_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_query_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_query_rx_packet_crc32_error_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_query_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_modulation_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_modulation_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
|
|
||||||
|
|
||||||
/* oid_rtl_seg_81_87 */
|
/* oid_rtl_seg_81_87 */
|
||||||
NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
|
|
||||||
|
|
||||||
/* oid_rtl_seg_81_85 */
|
/* oid_rtl_seg_81_85 */
|
||||||
NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
|
||||||
|
|
||||||
/* oid_rtl_seg_87_11_00 */
|
/* oid_rtl_seg_87_11_00 */
|
||||||
NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_burst_write_register_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_write16_eeprom_hdl (struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_write16_eeprom_hdl (struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_rd_attrib_mem_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_wr_attrib_mem_hdl (struct oid_par_priv* poid_par_priv);
|
int oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_poll_rx_status_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
/* oid_rtl_seg_87_11_20 */
|
/* oid_rtl_seg_87_11_20 */
|
||||||
NDIS_STATUS oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
/* oid_rtl_seg_87_11_50 */
|
/* oid_rtl_seg_87_11_50 */
|
||||||
NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_pwrstate_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_pwrstate_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
/* oid_rtl_seg_87_11_F0 */
|
/* oid_rtl_seg_87_11_F0 */
|
||||||
NDIS_STATUS oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_h2c_get_rate_table_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_h2c_get_rate_table_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
|
||||||
|
|
||||||
/* oid_rtl_seg_87_12_00 */
|
/* oid_rtl_seg_87_12_00 */
|
||||||
NDIS_STATUS oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv);
|
int oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_efuse_max_size_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
int oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv* poid_par_priv);
|
int oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_get_power_mode_hdl(struct oid_par_priv* poid_par_priv);
|
|
||||||
|
|
||||||
NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
|
|
||||||
|
|
||||||
#ifdef _RTW_MP_IOCTL_C_
|
#ifdef _RTW_MP_IOCTL_C_
|
||||||
|
|
||||||
static const struct oid_obj_priv oid_rtl_seg_81_80_00[] =
|
static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = {
|
||||||
{
|
|
||||||
{1, &oid_null_function}, /* 0x00 OID_RT_PRO_RESET_DUT */
|
{1, &oid_null_function}, /* 0x00 OID_RT_PRO_RESET_DUT */
|
||||||
{1, &oid_rt_pro_set_data_rate_hdl}, /* 0x01 */
|
{1, &oid_rt_pro_set_data_rate_hdl}, /* 0x01 */
|
||||||
{1, &oid_rt_pro_start_test_hdl}, /* 0x02 */
|
{1, &oid_rt_pro_start_test_hdl}, /* 0x02 */
|
||||||
|
@ -201,11 +186,9 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_00[] =
|
||||||
{1, &oid_null_function}, /* 0x1D OID_RT_PRO_WRITE_CIS_DATA */
|
{1, &oid_null_function}, /* 0x1D OID_RT_PRO_WRITE_CIS_DATA */
|
||||||
{1, &oid_null_function}, /* 0x1E OID_RT_PRO_READ_CIS_DATA */
|
{1, &oid_null_function}, /* 0x1E OID_RT_PRO_READ_CIS_DATA */
|
||||||
{1, &oid_null_function} /* 0x1F OID_RT_PRO_WRITE_POWER_CONTROL */
|
{1, &oid_null_function} /* 0x1F OID_RT_PRO_WRITE_POWER_CONTROL */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct oid_obj_priv oid_rtl_seg_81_80_20[] =
|
static const struct oid_obj_priv oid_rtl_seg_81_80_20[] = {
|
||||||
{
|
|
||||||
{1, &oid_null_function}, /* 0x20 OID_RT_PRO_READ_POWER_CONTROL */
|
{1, &oid_null_function}, /* 0x20 OID_RT_PRO_READ_POWER_CONTROL */
|
||||||
{1, &oid_null_function}, /* 0x21 OID_RT_PRO_WRITE_EEPROM */
|
{1, &oid_null_function}, /* 0x21 OID_RT_PRO_WRITE_EEPROM */
|
||||||
{1, &oid_null_function}, /* 0x22 OID_RT_PRO_READ_EEPROM */
|
{1, &oid_null_function}, /* 0x22 OID_RT_PRO_READ_EEPROM */
|
||||||
|
@ -222,11 +205,9 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_20[] =
|
||||||
{1, &oid_null_function}, /* 0x2D OID_RT_PRO_WRITE_EEPROM_BYTE */
|
{1, &oid_null_function}, /* 0x2D OID_RT_PRO_WRITE_EEPROM_BYTE */
|
||||||
{1, &oid_null_function}, /* 0x2E OID_RT_PRO_READ_EEPROM_BYTE */
|
{1, &oid_null_function}, /* 0x2E OID_RT_PRO_READ_EEPROM_BYTE */
|
||||||
{1, &oid_rt_pro_set_modulation_hdl} /* 0x2F */
|
{1, &oid_rt_pro_set_modulation_hdl} /* 0x2F */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
static const struct oid_obj_priv oid_rtl_seg_81_80_40[] = {
|
||||||
{
|
|
||||||
{1, &oid_null_function}, /* 0x40 */
|
{1, &oid_null_function}, /* 0x40 */
|
||||||
{1, &oid_null_function}, /* 0x41 */
|
{1, &oid_null_function}, /* 0x41 */
|
||||||
{1, &oid_null_function}, /* 0x42 */
|
{1, &oid_null_function}, /* 0x42 */
|
||||||
|
@ -235,166 +216,146 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
||||||
{1, &oid_null_function} /* 0x45 */
|
{1, &oid_null_function} /* 0x45 */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct oid_obj_priv oid_rtl_seg_81_80_80[] =
|
static const struct oid_obj_priv oid_rtl_seg_81_80_80[] = {
|
||||||
{
|
{1, &oid_null_function}, /* 0x80 OID_RT_DRIVER_OPTION */
|
||||||
{1, &oid_null_function}, /* 0x80 OID_RT_DRIVER_OPTION */
|
{1, &oid_null_function}, /* 0x81 OID_RT_RF_OFF */
|
||||||
{1, &oid_null_function}, /* 0x81 OID_RT_RF_OFF */
|
{1, &oid_null_function} /* 0x82 OID_RT_AUTH_STATUS */
|
||||||
{1, &oid_null_function} /* 0x82 OID_RT_AUTH_STATUS */
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct oid_obj_priv oid_rtl_seg_81_85[] =
|
static const struct oid_obj_priv oid_rtl_seg_81_85[] = {
|
||||||
{
|
{1, &oid_rt_wireless_mode_hdl} /* 0x00 OID_RT_WIRELESS_MODE */
|
||||||
{1, &oid_rt_wireless_mode_hdl} /* 0x00 OID_RT_WIRELESS_MODE */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_81_87[] =
|
static struct oid_obj_priv oid_rtl_seg_81_87[] = {
|
||||||
{
|
{1, &oid_null_function}, /* 0x80 OID_RT_PRO8187_WI_POLL */
|
||||||
{1, &oid_null_function}, /* 0x80 OID_RT_PRO8187_WI_POLL */
|
{1, &oid_rt_pro_write_bb_reg_hdl}, /* 0x81 */
|
||||||
{1, &oid_rt_pro_write_bb_reg_hdl}, /* 0x81 */
|
{1, &oid_rt_pro_read_bb_reg_hdl}, /* 0x82 */
|
||||||
{1, &oid_rt_pro_read_bb_reg_hdl}, /* 0x82 */
|
{1, &oid_rt_pro_write_rf_reg_hdl}, /* 0x82 */
|
||||||
{1, &oid_rt_pro_write_rf_reg_hdl}, /* 0x82 */
|
{1, &oid_rt_pro_read_rf_reg_hdl} /* 0x83 */
|
||||||
{1, &oid_rt_pro_read_rf_reg_hdl} /* 0x83 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_00[] =
|
static struct oid_obj_priv oid_rtl_seg_87_11_00[] = {
|
||||||
{
|
{1, &oid_rt_pro8711_join_bss_hdl}, /* 0x00 S */
|
||||||
{1, &oid_rt_pro8711_join_bss_hdl}, /* 0x00 S */
|
{1, &oid_rt_pro_read_register_hdl}, /* 0x01 */
|
||||||
{1, &oid_rt_pro_read_register_hdl}, /* 0x01 */
|
{1, &oid_rt_pro_write_register_hdl}, /* 0x02 */
|
||||||
{1, &oid_rt_pro_write_register_hdl}, /* 0x02 */
|
{1, &oid_rt_pro_burst_read_register_hdl},/* 0x03 */
|
||||||
{1, &oid_rt_pro_burst_read_register_hdl}, /* 0x03 */
|
{1, &oid_rt_pro_burst_write_register_hdl},/* 0x04 */
|
||||||
{1, &oid_rt_pro_burst_write_register_hdl}, /* 0x04 */
|
{1, &oid_rt_pro_write_txcmd_hdl}, /* 0x05 */
|
||||||
{1, &oid_rt_pro_write_txcmd_hdl}, /* 0x05 */
|
{1, &oid_rt_pro_read16_eeprom_hdl}, /* 0x06 */
|
||||||
{1, &oid_rt_pro_read16_eeprom_hdl}, /* 0x06 */
|
{1, &oid_rt_pro_write16_eeprom_hdl}, /* 0x07 */
|
||||||
{1, &oid_rt_pro_write16_eeprom_hdl}, /* 0x07 */
|
{1, &oid_null_function}, /* 0x08 OID_RT_PRO_H2C_SET_COMMAND */
|
||||||
{1, &oid_null_function}, /* 0x08 OID_RT_PRO_H2C_SET_COMMAND */
|
{1, &oid_null_function}, /* 0x09 OID_RT_PRO_H2C_QUERY_RESULT */
|
||||||
{1, &oid_null_function}, /* 0x09 OID_RT_PRO_H2C_QUERY_RESULT */
|
{1, &oid_rt_pro8711_wi_poll_hdl}, /* 0x0A */
|
||||||
{1, &oid_rt_pro8711_wi_poll_hdl}, /* 0x0A */
|
{1, &oid_rt_pro8711_pkt_loss_hdl}, /* 0x0B */
|
||||||
{1, &oid_rt_pro8711_pkt_loss_hdl}, /* 0x0B */
|
{1, &oid_rt_rd_attrib_mem_hdl}, /* 0x0C */
|
||||||
{1, &oid_rt_rd_attrib_mem_hdl}, /* 0x0C */
|
{1, &oid_rt_wr_attrib_mem_hdl}, /* 0x0D */
|
||||||
{1, &oid_rt_wr_attrib_mem_hdl}, /* 0x0D */
|
{1, &oid_null_function}, /* 0x0E */
|
||||||
{1, &oid_null_function}, /* 0x0E */
|
{1, &oid_null_function}, /* 0x0F */
|
||||||
{1, &oid_null_function}, /* 0x0F */
|
{1, &oid_null_function}, /* 0x10 OID_RT_PRO_H2C_CMD_MODE */
|
||||||
{1, &oid_null_function}, /* 0x10 OID_RT_PRO_H2C_CMD_MODE */
|
{1, &oid_null_function}, /* 0x11 OID_RT_PRO_H2C_CMD_RSP_MODE */
|
||||||
{1, &oid_null_function}, /* 0x11 OID_RT_PRO_H2C_CMD_RSP_MODE */
|
{1, &oid_null_function}, /* 0X12 OID_RT_PRO_WAIT_C2H_EVENT */
|
||||||
{1, &oid_null_function}, /* 0X12 OID_RT_PRO_WAIT_C2H_EVENT */
|
{1, &oid_null_function}, /* 0X13 OID_RT_PRO_RW_ACCESS_PROTOCOL_TEST */
|
||||||
{1, &oid_null_function}, /* 0X13 OID_RT_PRO_RW_ACCESS_PROTOCOL_TEST */
|
{1, &oid_null_function}, /* 0X14 OID_RT_PRO_SCSI_ACCESS_TEST */
|
||||||
{1, &oid_null_function}, /* 0X14 OID_RT_PRO_SCSI_ACCESS_TEST */
|
{1, &oid_null_function}, /* 0X15 OID_RT_PRO_SCSI_TCPIPOFFLOAD_OUT */
|
||||||
{1, &oid_null_function}, /* 0X15 OID_RT_PRO_SCSI_TCPIPOFFLOAD_OUT */
|
{1, &oid_null_function}, /* 0X16 OID_RT_PRO_SCSI_TCPIPOFFLOAD_IN */
|
||||||
{1, &oid_null_function}, /* 0X16 OID_RT_PRO_SCSI_TCPIPOFFLOAD_IN */
|
{1, &oid_null_function}, /* 0X17 OID_RT_RRO_RX_PKT_VIA_IOCTRL */
|
||||||
{1, &oid_null_function}, /* 0X17 OID_RT_RRO_RX_PKT_VIA_IOCTRL */
|
{1, &oid_null_function}, /* 0X18 OID_RT_RRO_RX_PKTARRAY_VIA_IOCTRL */
|
||||||
{1, &oid_null_function}, /* 0X18 OID_RT_RRO_RX_PKTARRAY_VIA_IOCTRL */
|
{1, &oid_null_function}, /* 0X19 OID_RT_RPO_SET_PWRMGT_TEST */
|
||||||
{1, &oid_null_function}, /* 0X19 OID_RT_RPO_SET_PWRMGT_TEST */
|
{1, &oid_null_function}, /* 0X1A */
|
||||||
{1, &oid_null_function}, /* 0X1A */
|
{1, &oid_null_function}, /* 0X1B OID_RT_PRO_QRY_PWRMGT_TEST */
|
||||||
{1, &oid_null_function}, /* 0X1B OID_RT_PRO_QRY_PWRMGT_TEST */
|
{1, &oid_null_function}, /* 0X1C OID_RT_RPO_ASYNC_RWIO_TEST */
|
||||||
{1, &oid_null_function}, /* 0X1C OID_RT_RPO_ASYNC_RWIO_TEST */
|
{1, &oid_null_function}, /* 0X1D OID_RT_RPO_ASYNC_RWIO_POLL */
|
||||||
{1, &oid_null_function}, /* 0X1D OID_RT_RPO_ASYNC_RWIO_POLL */
|
{1, &oid_rt_pro_set_rf_intfs_hdl}, /* 0X1E */
|
||||||
{1, &oid_rt_pro_set_rf_intfs_hdl}, /* 0X1E */
|
{1, &oid_rt_poll_rx_status_hdl} /* 0X1F */
|
||||||
{1, &oid_rt_poll_rx_status_hdl} /* 0X1F */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_20[] =
|
static struct oid_obj_priv oid_rtl_seg_87_11_20[] = {
|
||||||
{
|
{1, &oid_rt_pro_cfg_debug_message_hdl}, /* 0x20 */
|
||||||
{1, &oid_rt_pro_cfg_debug_message_hdl}, /* 0x20 */
|
{1, &oid_rt_pro_set_data_rate_ex_hdl}, /* 0x21 */
|
||||||
{1, &oid_rt_pro_set_data_rate_ex_hdl}, /* 0x21 */
|
{1, &oid_rt_pro_set_basic_rate_hdl}, /* 0x22 */
|
||||||
{1, &oid_rt_pro_set_basic_rate_hdl}, /* 0x22 */
|
{1, &oid_rt_pro_read_tssi_hdl}, /* 0x23 */
|
||||||
{1, &oid_rt_pro_read_tssi_hdl}, /* 0x23 */
|
{1, &oid_rt_pro_set_power_tracking_hdl} /* 0x24 */
|
||||||
{1, &oid_rt_pro_set_power_tracking_hdl} /* 0x24 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct oid_obj_priv oid_rtl_seg_87_11_50[] = {
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_50[] =
|
{1, &oid_rt_pro_qry_pwrstate_hdl}, /* 0x50 */
|
||||||
{
|
{1, &oid_rt_pro_set_pwrstate_hdl} /* 0x51 */
|
||||||
{1, &oid_rt_pro_qry_pwrstate_hdl}, /* 0x50 */
|
|
||||||
{1, &oid_rt_pro_set_pwrstate_hdl} /* 0x51 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_80[] =
|
static struct oid_obj_priv oid_rtl_seg_87_11_80[] = {
|
||||||
{
|
{1, &oid_null_function} /* 0x80 */
|
||||||
{1, &oid_null_function} /* 0x80 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_B0[] =
|
static struct oid_obj_priv oid_rtl_seg_87_11_B0[] = {
|
||||||
{
|
{1, &oid_null_function} /* 0xB0 */
|
||||||
{1, &oid_null_function} /* 0xB0 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_11_F0[] =
|
static struct oid_obj_priv oid_rtl_seg_87_11_F0[] = {
|
||||||
{
|
{1, &oid_null_function}, /* 0xF0 */
|
||||||
{1, &oid_null_function}, /* 0xF0 */
|
{1, &oid_null_function}, /* 0xF1 */
|
||||||
{1, &oid_null_function}, /* 0xF1 */
|
{1, &oid_null_function}, /* 0xF2 */
|
||||||
{1, &oid_null_function}, /* 0xF2 */
|
{1, &oid_null_function}, /* 0xF3 */
|
||||||
{1, &oid_null_function}, /* 0xF3 */
|
{1, &oid_null_function}, /* 0xF4 */
|
||||||
{1, &oid_null_function}, /* 0xF4 */
|
{1, &oid_null_function}, /* 0xF5 */
|
||||||
{1, &oid_null_function}, /* 0xF5 */
|
{1, &oid_null_function}, /* 0xF6 */
|
||||||
{1, &oid_null_function}, /* 0xF6 */
|
{1, &oid_null_function}, /* 0xF7 */
|
||||||
{1, &oid_null_function}, /* 0xF7 */
|
{1, &oid_null_function}, /* 0xF8 */
|
||||||
{1, &oid_null_function}, /* 0xF8 */
|
{1, &oid_null_function}, /* 0xF9 */
|
||||||
{1, &oid_null_function}, /* 0xF9 */
|
{1, &oid_null_function}, /* 0xFA */
|
||||||
{1, &oid_null_function}, /* 0xFA */
|
{1, &oid_rt_pro_h2c_set_rate_table_hdl},/* 0xFB */
|
||||||
{1, &oid_rt_pro_h2c_set_rate_table_hdl}, /* 0xFB */
|
{1, &oid_rt_pro_h2c_get_rate_table_hdl},/* 0xFC */
|
||||||
{1, &oid_rt_pro_h2c_get_rate_table_hdl}, /* 0xFC */
|
{1, &oid_null_function}, /* 0xFD */
|
||||||
{1, &oid_null_function}, /* 0xFD */
|
{1, &oid_null_function}, /* 0xFE OID_RT_PRO_H2C_C2H_LBK_TEST */
|
||||||
{1, &oid_null_function}, /* 0xFE OID_RT_PRO_H2C_C2H_LBK_TEST */
|
{1, &oid_null_function} /* 0xFF */
|
||||||
{1, &oid_null_function} /* 0xFF */
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct oid_obj_priv oid_rtl_seg_87_12_00[]=
|
static struct oid_obj_priv oid_rtl_seg_87_12_00[]= {
|
||||||
{
|
{1, &oid_rt_pro_encryption_ctrl_hdl}, /* 0x00 Q&S */
|
||||||
{1, &oid_rt_pro_encryption_ctrl_hdl}, /* 0x00 Q&S */
|
{1, &oid_rt_pro_add_sta_info_hdl}, /* 0x01 S */
|
||||||
{1, &oid_rt_pro_add_sta_info_hdl}, /* 0x01 S */
|
{1, &oid_rt_pro_dele_sta_info_hdl}, /* 0x02 S */
|
||||||
{1, &oid_rt_pro_dele_sta_info_hdl}, /* 0x02 S */
|
{1, &oid_rt_pro_query_dr_variable_hdl}, /* 0x03 Q */
|
||||||
{1, &oid_rt_pro_query_dr_variable_hdl}, /* 0x03 Q */
|
{1, &oid_rt_pro_rx_packet_type_hdl}, /* 0x04 Q,S */
|
||||||
{1, &oid_rt_pro_rx_packet_type_hdl}, /* 0x04 Q,S */
|
{1, &oid_rt_pro_read_efuse_hdl}, /* 0x05 Q OID_RT_PRO_READ_EFUSE */
|
||||||
{1, &oid_rt_pro_read_efuse_hdl}, /* 0x05 Q OID_RT_PRO_READ_EFUSE */
|
{1, &oid_rt_pro_write_efuse_hdl}, /* 0x06 S OID_RT_PRO_WRITE_EFUSE */
|
||||||
{1, &oid_rt_pro_write_efuse_hdl}, /* 0x06 S OID_RT_PRO_WRITE_EFUSE */
|
{1, &oid_rt_pro_rw_efuse_pgpkt_hdl}, /* 0x07 Q,S */
|
||||||
{1, &oid_rt_pro_rw_efuse_pgpkt_hdl}, /* 0x07 Q,S */
|
{1, &oid_rt_get_efuse_current_size_hdl},/* 0x08 Q */
|
||||||
{1, &oid_rt_get_efuse_current_size_hdl}, /* 0x08 Q */
|
{1, &oid_rt_set_bandwidth_hdl}, /* 0x09 */
|
||||||
{1, &oid_rt_set_bandwidth_hdl}, /* 0x09 */
|
{1, &oid_rt_set_crystal_cap_hdl}, /* 0x0a */
|
||||||
{1, &oid_rt_set_crystal_cap_hdl}, /* 0x0a */
|
{1, &oid_rt_set_rx_packet_type_hdl}, /* 0x0b S */
|
||||||
{1, &oid_rt_set_rx_packet_type_hdl}, /* 0x0b S */
|
{1, &oid_rt_get_efuse_max_size_hdl}, /* 0x0c */
|
||||||
{1, &oid_rt_get_efuse_max_size_hdl}, /* 0x0c */
|
{1, &oid_rt_pro_set_tx_agc_offset_hdl}, /* 0x0d */
|
||||||
{1, &oid_rt_pro_set_tx_agc_offset_hdl}, /* 0x0d */
|
{1, &oid_rt_pro_set_pkt_test_mode_hdl}, /* 0x0e */
|
||||||
{1, &oid_rt_pro_set_pkt_test_mode_hdl}, /* 0x0e */
|
{1, &oid_null_function}, /* 0x0f OID_RT_PRO_FOR_EVM_TEST_SETTING */
|
||||||
{1, &oid_null_function}, /* 0x0f OID_RT_PRO_FOR_EVM_TEST_SETTING */
|
{1, &oid_rt_get_thermal_meter_hdl}, /* 0x10 Q OID_RT_PRO_GET_THERMAL_METER */
|
||||||
{1, &oid_rt_get_thermal_meter_hdl}, /* 0x10 Q OID_RT_PRO_GET_THERMAL_METER */
|
{1, &oid_rt_reset_phy_rx_packet_count_hdl},/* 0x11 S OID_RT_RESET_PHY_RX_PACKET_COUNT */
|
||||||
{1, &oid_rt_reset_phy_rx_packet_count_hdl}, /* 0x11 S OID_RT_RESET_PHY_RX_PACKET_COUNT */
|
{1, &oid_rt_get_phy_rx_packet_received_hdl},/* 0x12 Q OID_RT_GET_PHY_RX_PACKET_RECEIVED */
|
||||||
{1, &oid_rt_get_phy_rx_packet_received_hdl}, /* 0x12 Q OID_RT_GET_PHY_RX_PACKET_RECEIVED */
|
{1, &oid_rt_get_phy_rx_packet_crc32_error_hdl},/* 0x13 Q OID_RT_GET_PHY_RX_PACKET_CRC32_ERROR */
|
||||||
{1, &oid_rt_get_phy_rx_packet_crc32_error_hdl}, /* 0x13 Q OID_RT_GET_PHY_RX_PACKET_CRC32_ERROR */
|
{1, &oid_rt_set_power_down_hdl}, /* 0x14 Q OID_RT_SET_POWER_DOWN */
|
||||||
{1, &oid_rt_set_power_down_hdl}, /* 0x14 Q OID_RT_SET_POWER_DOWN */
|
{1, &oid_rt_get_power_mode_hdl} /* 0x15 Q OID_RT_GET_POWER_MODE */
|
||||||
{1, &oid_rt_get_power_mode_hdl} /* 0x15 Q OID_RT_GET_POWER_MODE */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _RTL871X_MP_IOCTL_C_ */
|
#endif /* _RTL871X_MP_IOCTL_C_ */
|
||||||
|
|
||||||
struct rwreg_param{
|
struct rwreg_param {
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 width;
|
u32 width;
|
||||||
u32 value;
|
u32 value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bbreg_param{
|
struct bbreg_param {
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 phymask;
|
u32 phymask;
|
||||||
u32 value;
|
u32 value;
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
struct rfchannel_param{
|
struct txpower_param {
|
||||||
u32 ch;
|
|
||||||
u32 modem;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
struct txpower_param{
|
|
||||||
u32 pwr_index;
|
u32 pwr_index;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct datarate_param {
|
||||||
struct datarate_param{
|
|
||||||
u32 rate_index;
|
u32 rate_index;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct rfintfs_parm {
|
struct rfintfs_parm {
|
||||||
u32 rfintfs;
|
u32 rfintfs;
|
||||||
};
|
};
|
||||||
|
@ -425,7 +386,7 @@ struct eeprom_rw_param {
|
||||||
|
|
||||||
struct mp_ioctl_handler {
|
struct mp_ioctl_handler {
|
||||||
u32 paramsize;
|
u32 paramsize;
|
||||||
u32 (*handler)(struct oid_par_priv* poid_par_priv);
|
s32 (*handler)(struct oid_par_priv* poid_par_priv);
|
||||||
u32 oid;
|
u32 oid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -476,55 +437,53 @@ enum RTL871X_MP_IOCTL_SUBCODE {
|
||||||
MAX_MP_IOCTL_SUBCODE,
|
MAX_MP_IOCTL_SUBCODE,
|
||||||
};
|
};
|
||||||
|
|
||||||
u32 mp_ioctl_xmit_packet_hdl(struct oid_par_priv* poid_par_priv);
|
s32 mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv);
|
||||||
|
|
||||||
#define GEN_MP_IOCTL_HANDLER(sz, hdl, oid) {sz, hdl, oid},
|
#define GEN_HANDLER(sz, hdl, oid) {sz, hdl, oid},
|
||||||
|
|
||||||
#define EXT_MP_IOCTL_HANDLER(sz, subcode, oid) {sz, mp_ioctl_ ## subcode ## _hdl, oid},
|
|
||||||
|
|
||||||
|
#define EXT_MP_IOCTL_HANDLER(sz, subcode, oid) \
|
||||||
|
{sz, mp_ioctl_ ## subcode ## _hdl, oid},
|
||||||
|
|
||||||
static struct mp_ioctl_handler mp_ioctl_hdl[] = {
|
static struct mp_ioctl_handler mp_ioctl_hdl[] = {
|
||||||
|
/*0*/ GEN_HANDLER(sizeof(u32), oid_rt_pro_start_test_hdl, OID_RT_PRO_START_TEST)
|
||||||
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)
|
||||||
|
|
||||||
/*0*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_start_test_hdl, OID_RT_PRO_START_TEST)
|
GEN_HANDLER(sizeof(struct rwreg_param), oid_rt_pro_read_register_hdl, OID_RT_PRO_READ_REGISTER)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)
|
GEN_HANDLER(sizeof(struct rwreg_param), oid_rt_pro_write_register_hdl, OID_RT_PRO_WRITE_REGISTER)
|
||||||
|
GEN_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_read_bb_reg_hdl, OID_RT_PRO_READ_BB_REG)
|
||||||
|
/*5*/ GEN_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_write_bb_reg_hdl, OID_RT_PRO_WRITE_BB_REG)
|
||||||
|
GEN_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_read_rf_reg_hdl, OID_RT_PRO_RF_READ_REGISTRY)
|
||||||
|
GEN_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_write_rf_reg_hdl, OID_RT_PRO_RF_WRITE_REGISTRY)
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rwreg_param), oid_rt_pro_read_register_hdl, OID_RT_PRO_READ_REGISTER)
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_channel_direct_call_hdl, OID_RT_PRO_SET_CHANNEL_DIRECT_CALL)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rwreg_param), oid_rt_pro_write_register_hdl, OID_RT_PRO_WRITE_REGISTER)
|
GEN_HANDLER(sizeof(struct txpower_param), oid_rt_pro_set_tx_power_control_hdl, OID_RT_PRO_SET_TX_POWER_CONTROL)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_read_bb_reg_hdl, OID_RT_PRO_READ_BB_REG)
|
/*10*/ GEN_HANDLER(sizeof(u32), oid_rt_pro_set_data_rate_hdl, OID_RT_PRO_SET_DATA_RATE)
|
||||||
/*5*/ GEN_MP_IOCTL_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_write_bb_reg_hdl, OID_RT_PRO_WRITE_BB_REG)
|
GEN_HANDLER(sizeof(u32), oid_rt_set_bandwidth_hdl, OID_RT_SET_BANDWIDTH)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_read_rf_reg_hdl, OID_RT_PRO_RF_READ_REGISTRY)
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_antenna_bb_hdl, OID_RT_PRO_SET_ANTENNA_BB)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_write_rf_reg_hdl, OID_RT_PRO_RF_WRITE_REGISTRY)
|
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_channel_direct_call_hdl, OID_RT_PRO_SET_CHANNEL_DIRECT_CALL)
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_continuous_tx_hdl, OID_RT_PRO_SET_CONTINUOUS_TX)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct txpower_param), oid_rt_pro_set_tx_power_control_hdl, OID_RT_PRO_SET_TX_POWER_CONTROL)
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_single_carrier_tx_hdl, OID_RT_PRO_SET_SINGLE_CARRIER_TX)
|
||||||
/*10*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_data_rate_hdl, OID_RT_PRO_SET_DATA_RATE)
|
/*15*/ GEN_HANDLER(sizeof(u32), oid_rt_pro_set_carrier_suppression_tx_hdl, OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_set_bandwidth_hdl, OID_RT_SET_BANDWIDTH)
|
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_single_tone_tx_hdl, OID_RT_PRO_SET_SINGLE_TONE_TX)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_antenna_bb_hdl, OID_RT_PRO_SET_ANTENNA_BB)
|
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_continuous_tx_hdl, OID_RT_PRO_SET_CONTINUOUS_TX)
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_single_carrier_tx_hdl, OID_RT_PRO_SET_SINGLE_CARRIER_TX)
|
|
||||||
/*15*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_carrier_suppression_tx_hdl, OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX)
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_single_tone_tx_hdl, OID_RT_PRO_SET_SINGLE_TONE_TX)
|
|
||||||
|
|
||||||
EXT_MP_IOCTL_HANDLER(0, xmit_packet, 0)
|
EXT_MP_IOCTL_HANDLER(0, xmit_packet, 0)
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_set_rx_packet_type_hdl, OID_RT_SET_RX_PACKET_TYPE)
|
GEN_HANDLER(sizeof(u32), oid_rt_set_rx_packet_type_hdl, OID_RT_SET_RX_PACKET_TYPE)
|
||||||
GEN_MP_IOCTL_HANDLER(0, oid_rt_reset_phy_rx_packet_count_hdl, OID_RT_RESET_PHY_RX_PACKET_COUNT)
|
GEN_HANDLER(0, oid_rt_reset_phy_rx_packet_count_hdl, OID_RT_RESET_PHY_RX_PACKET_COUNT)
|
||||||
/*20*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_get_phy_rx_packet_received_hdl, OID_RT_GET_PHY_RX_PACKET_RECEIVED)
|
/*20*/ GEN_HANDLER(sizeof(u32), oid_rt_get_phy_rx_packet_received_hdl, OID_RT_GET_PHY_RX_PACKET_RECEIVED)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_get_phy_rx_packet_crc32_error_hdl, OID_RT_GET_PHY_RX_PACKET_CRC32_ERROR)
|
GEN_HANDLER(sizeof(u32), oid_rt_get_phy_rx_packet_crc32_error_hdl, OID_RT_GET_PHY_RX_PACKET_CRC32_ERROR)
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct eeprom_rw_param), NULL, 0)
|
GEN_HANDLER(sizeof(struct eeprom_rw_param), NULL, 0)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct eeprom_rw_param), NULL, 0)
|
GEN_HANDLER(sizeof(struct eeprom_rw_param), NULL, 0)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(struct efuse_access_struct), oid_rt_pro_efuse_hdl, OID_RT_PRO_EFUSE)
|
GEN_HANDLER(sizeof(struct efuse_access_struct), oid_rt_pro_efuse_hdl, OID_RT_PRO_EFUSE)
|
||||||
/*25*/ GEN_MP_IOCTL_HANDLER(0, oid_rt_pro_efuse_map_hdl, OID_RT_PRO_EFUSE_MAP)
|
/*25*/ GEN_HANDLER(0, oid_rt_pro_efuse_map_hdl, OID_RT_PRO_EFUSE_MAP)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_get_efuse_max_size_hdl, OID_RT_GET_EFUSE_MAX_SIZE)
|
GEN_HANDLER(sizeof(u32), oid_rt_get_efuse_max_size_hdl, OID_RT_GET_EFUSE_MAX_SIZE)
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_get_efuse_current_size_hdl, OID_RT_GET_EFUSE_CURRENT_SIZE)
|
GEN_HANDLER(sizeof(u32), oid_rt_get_efuse_current_size_hdl, OID_RT_GET_EFUSE_CURRENT_SIZE)
|
||||||
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_get_thermal_meter_hdl, OID_RT_PRO_GET_THERMAL_METER)
|
|
||||||
GEN_MP_IOCTL_HANDLER(sizeof(u8), oid_rt_pro_set_power_tracking_hdl, OID_RT_PRO_SET_POWER_TRACKING)
|
|
||||||
/*30*/ GEN_MP_IOCTL_HANDLER(sizeof(u8), oid_rt_set_power_down_hdl, OID_RT_SET_POWER_DOWN)
|
|
||||||
/*31*/ GEN_MP_IOCTL_HANDLER(0, oid_rt_pro_trigger_gpio_hdl, 0)
|
|
||||||
|
|
||||||
|
GEN_HANDLER(sizeof(u32), oid_rt_get_thermal_meter_hdl, OID_RT_PRO_GET_THERMAL_METER)
|
||||||
|
GEN_HANDLER(sizeof(u8), oid_rt_pro_set_power_tracking_hdl, OID_RT_PRO_SET_POWER_TRACKING)
|
||||||
|
/*30*/ GEN_HANDLER(sizeof(u8), oid_rt_set_power_down_hdl, OID_RT_SET_POWER_DOWN)
|
||||||
|
/*31*/ GEN_HANDLER(0, oid_rt_pro_trigger_gpio_hdl, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -24,77 +24,94 @@
|
||||||
|
|
||||||
u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
||||||
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
||||||
u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8* pssid, u8 ussidlen, u8* pdev_raddr );
|
u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||||
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status_code);
|
u8 *pbuf, u8 *pssid, u8 ussidlen,
|
||||||
|
u8 *pdev_raddr);
|
||||||
|
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||||
|
u8 *pbuf, u8 status_code);
|
||||||
u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
|
||||||
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||||
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len, struct sta_info *psta);
|
u8 *pframe, uint len);
|
||||||
u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||||
u32 process_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
u8 *pframe, uint len, struct sta_info *psta);
|
||||||
u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo,
|
||||||
|
u8 *pframe, uint len);
|
||||||
|
u32 process_p2p_devdisc_resp(struct wifidirect_info *pwdinfo,
|
||||||
|
u8 *pframe, uint len);
|
||||||
|
u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo,
|
||||||
|
u8 *pframe, uint len);
|
||||||
u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe);
|
u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe);
|
||||||
u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo,
|
||||||
u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
u8 *pframe, uint len);
|
||||||
u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo,
|
||||||
u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
u8 *pframe, uint len);
|
||||||
|
u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo,
|
||||||
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType);
|
u8 *pframe, uint len);
|
||||||
|
u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||||
void process_p2p_ps_ie(struct adapter * padapter, u8 *IEs, u32 IELength);
|
uint len);
|
||||||
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state);
|
void p2p_protocol_wk_hdl(struct adapter *padapter, int intcmdtype);
|
||||||
u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue);
|
void process_p2p_ps_ie(struct adapter *padapter, u8 *ies, u32 ielength);
|
||||||
|
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state);
|
||||||
void reset_global_wifidirect_info( struct adapter* padapter );
|
u8 p2p_ps_wk_cmd(struct adapter *padapter, u8 p2p_ps_state, u8 enqueue);
|
||||||
int rtw_init_wifi_display_info(struct adapter* padapter);
|
void reset_global_wifidirect_info(struct adapter *padapter);
|
||||||
void rtw_init_wifidirect_timers(struct adapter* padapter);
|
int rtw_init_wifi_display_info(struct adapter *padapter);
|
||||||
void rtw_init_wifidirect_addrs(struct adapter* padapter, u8 *dev_addr, u8 *iface_addr);
|
void rtw_init_wifidirect_timers(struct adapter *padapter);
|
||||||
void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role);
|
void rtw_init_wifidirect_addrs(struct adapter *padapter, u8 *dev_addr,
|
||||||
|
u8 *iface_addr);
|
||||||
|
void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role);
|
||||||
int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role);
|
int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role);
|
||||||
|
|
||||||
static inline void _rtw_p2p_set_state(struct wifidirect_info *wdinfo, enum P2P_STATE state)
|
static inline void _rtw_p2p_set_state(struct wifidirect_info *wdinfo,
|
||||||
|
enum P2P_STATE state)
|
||||||
{
|
{
|
||||||
if (wdinfo->p2p_state != state) {
|
if (wdinfo->p2p_state != state)
|
||||||
/* wdinfo->pre_p2p_state = wdinfo->p2p_state; */
|
|
||||||
wdinfo->p2p_state = state;
|
wdinfo->p2p_state = state;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo, enum P2P_STATE state)
|
static inline void _rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo,
|
||||||
|
enum P2P_STATE state)
|
||||||
{
|
{
|
||||||
if (wdinfo->pre_p2p_state != state) {
|
if (wdinfo->pre_p2p_state != state)
|
||||||
wdinfo->pre_p2p_state = state;
|
wdinfo->pre_p2p_state = state;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role)
|
static inline void _rtw_p2p_set_role(struct wifidirect_info *wdinfo,
|
||||||
|
enum P2P_ROLE role)
|
||||||
{
|
{
|
||||||
if (wdinfo->role != role) {
|
if (wdinfo->role != role)
|
||||||
wdinfo->role = role;
|
wdinfo->role = role;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int _rtw_p2p_state(struct wifidirect_info *wdinfo)
|
static inline int _rtw_p2p_state(struct wifidirect_info *wdinfo)
|
||||||
{
|
{
|
||||||
return wdinfo->p2p_state;
|
return wdinfo->p2p_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int _rtw_p2p_pre_state(struct wifidirect_info *wdinfo)
|
static inline int _rtw_p2p_pre_state(struct wifidirect_info *wdinfo)
|
||||||
{
|
{
|
||||||
return wdinfo->pre_p2p_state;
|
return wdinfo->pre_p2p_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int _rtw_p2p_role(struct wifidirect_info *wdinfo)
|
static inline int _rtw_p2p_role(struct wifidirect_info *wdinfo)
|
||||||
{
|
{
|
||||||
return wdinfo->role;
|
return wdinfo->role;
|
||||||
}
|
}
|
||||||
static inline bool _rtw_p2p_chk_state(struct wifidirect_info *wdinfo, enum P2P_STATE state)
|
|
||||||
|
static inline bool _rtw_p2p_chk_state(struct wifidirect_info *wdinfo,
|
||||||
|
enum P2P_STATE state)
|
||||||
{
|
{
|
||||||
return wdinfo->p2p_state == state;
|
return wdinfo->p2p_state == state;
|
||||||
}
|
}
|
||||||
static inline bool _rtw_p2p_chk_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role)
|
|
||||||
|
static inline bool _rtw_p2p_chk_role(struct wifidirect_info *wdinfo,
|
||||||
|
enum P2P_ROLE role)
|
||||||
{
|
{
|
||||||
return wdinfo->role == role;
|
return wdinfo->role == role;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define rtw_p2p_set_state(wdinfo, state) _rtw_p2p_set_state(wdinfo, state)
|
#define rtw_p2p_set_state(wdinfo, state) _rtw_p2p_set_state(wdinfo, state)
|
||||||
#define rtw_p2p_set_pre_state(wdinfo, state) _rtw_p2p_set_pre_state(wdinfo, state)
|
#define rtw_p2p_set_pre_state(wdinfo, state) \
|
||||||
|
_rtw_p2p_set_pre_state(wdinfo, state)
|
||||||
#define rtw_p2p_set_role(wdinfo, role) _rtw_p2p_set_role(wdinfo, role)
|
#define rtw_p2p_set_role(wdinfo, role) _rtw_p2p_set_role(wdinfo, role)
|
||||||
|
|
||||||
#define rtw_p2p_state(wdinfo) _rtw_p2p_state(wdinfo)
|
#define rtw_p2p_state(wdinfo) _rtw_p2p_state(wdinfo)
|
||||||
|
@ -104,11 +121,11 @@ static inline bool _rtw_p2p_chk_role(struct wifidirect_info *wdinfo, enum P2P_RO
|
||||||
#define rtw_p2p_chk_role(wdinfo, role) _rtw_p2p_chk_role(wdinfo, role)
|
#define rtw_p2p_chk_role(wdinfo, role) _rtw_p2p_chk_role(wdinfo, role)
|
||||||
|
|
||||||
#define rtw_p2p_findphase_ex_set(wdinfo, value) \
|
#define rtw_p2p_findphase_ex_set(wdinfo, value) \
|
||||||
(wdinfo)->find_phase_state_exchange_cnt = (value)
|
((wdinfo)->find_phase_state_exchange_cnt = (value))
|
||||||
|
|
||||||
/* is this find phase exchange for social channel scan? */
|
/* is this find phase exchange for social channel scan? */
|
||||||
#define rtw_p2p_findphase_ex_is_social(wdinfo) \
|
#define rtw_p2p_findphase_ex_is_social(wdinfo) \
|
||||||
(wdinfo)->find_phase_state_exchange_cnt >= P2P_FINDPHASE_EX_SOCIAL_FIRST
|
((wdinfo)->find_phase_state_exchange_cnt >= P2P_FINDPHASE_EX_SOCIAL_FIRST)
|
||||||
|
|
||||||
/* should we need find phase exchange anymore? */
|
/* should we need find phase exchange anymore? */
|
||||||
#define rtw_p2p_findphase_ex_is_needed(wdinfo) \
|
#define rtw_p2p_findphase_ex_is_needed(wdinfo) \
|
||||||
|
|
|
@ -23,30 +23,25 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
#define FW_PWR0 0
|
#define FW_PWR0 0
|
||||||
#define FW_PWR1 1
|
#define FW_PWR1 1
|
||||||
#define FW_PWR2 2
|
#define FW_PWR2 2
|
||||||
#define FW_PWR3 3
|
#define FW_PWR3 3
|
||||||
|
#define HW_PWR0 7
|
||||||
|
|
||||||
#define HW_PWR0 7
|
|
||||||
#define HW_PWR1 6
|
#define HW_PWR1 6
|
||||||
#define HW_PWR2 2
|
#define HW_PWR2 2
|
||||||
#define HW_PWR3 0
|
#define HW_PWR3 0
|
||||||
#define HW_PWR4 8
|
#define HW_PWR4 8
|
||||||
|
|
||||||
#define FW_PWRMSK 0x7
|
#define FW_PWRMSK 0x7
|
||||||
|
|
||||||
|
|
||||||
#define XMIT_ALIVE BIT(0)
|
#define XMIT_ALIVE BIT(0)
|
||||||
#define RECV_ALIVE BIT(1)
|
#define RECV_ALIVE BIT(1)
|
||||||
#define CMD_ALIVE BIT(2)
|
#define CMD_ALIVE BIT(2)
|
||||||
#define EVT_ALIVE BIT(3)
|
#define EVT_ALIVE BIT(3)
|
||||||
|
|
||||||
|
enum power_mgnt {
|
||||||
enum Power_Mgnt
|
PS_MODE_ACTIVE = 0,
|
||||||
{
|
|
||||||
PS_MODE_ACTIVE = 0,
|
|
||||||
PS_MODE_MIN,
|
PS_MODE_MIN,
|
||||||
PS_MODE_MAX,
|
PS_MODE_MAX,
|
||||||
PS_MODE_DTIM,
|
PS_MODE_DTIM,
|
||||||
|
@ -56,34 +51,34 @@ enum Power_Mgnt
|
||||||
PS_MODE_IBSS,
|
PS_MODE_IBSS,
|
||||||
PS_MODE_WWLAN,
|
PS_MODE_WWLAN,
|
||||||
PM_Radio_Off,
|
PM_Radio_Off,
|
||||||
PM_Card_Disable ,
|
PM_Card_Disable,
|
||||||
PS_MODE_NUM
|
PS_MODE_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BIT[2:0] = HW state
|
BIT[2:0] = HW state
|
||||||
BIT[3] = Protocol PS state, 0: register active state , 1: register sleep state
|
BIT[3] = Protocol PS state, 0: register active state,
|
||||||
|
1: register sleep state
|
||||||
BIT[4] = sub-state
|
BIT[4] = sub-state
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PS_DPS BIT(0)
|
#define PS_DPS BIT(0)
|
||||||
#define PS_LCLK (PS_DPS)
|
#define PS_LCLK (PS_DPS)
|
||||||
#define PS_RF_OFF BIT(1)
|
#define PS_RF_OFF BIT(1)
|
||||||
#define PS_ALL_ON BIT(2)
|
#define PS_ALL_ON BIT(2)
|
||||||
#define PS_ST_ACTIVE BIT(3)
|
#define PS_ST_ACTIVE BIT(3)
|
||||||
|
|
||||||
#define PS_ISR_ENABLE BIT(4)
|
#define PS_ISR_ENABLE BIT(4)
|
||||||
#define PS_IMR_ENABLE BIT(5)
|
#define PS_IMR_ENABLE BIT(5)
|
||||||
#define PS_ACK BIT(6)
|
#define PS_ACK BIT(6)
|
||||||
#define PS_TOGGLE BIT(7)
|
#define PS_TOGGLE BIT(7)
|
||||||
|
|
||||||
#define PS_STATE_MASK (0x0F)
|
#define PS_STATE_MASK (0x0F)
|
||||||
#define PS_STATE_HW_MASK (0x07)
|
#define PS_STATE_HW_MASK (0x07)
|
||||||
#define PS_SEQ_MASK (0xc0)
|
#define PS_SEQ_MASK (0xc0)
|
||||||
|
|
||||||
#define PS_STATE(x) (PS_STATE_MASK & (x))
|
#define PS_STATE(x) (PS_STATE_MASK & (x))
|
||||||
#define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x))
|
#define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x))
|
||||||
#define PS_SEQ(x) (PS_SEQ_MASK & (x))
|
#define PS_SEQ(x) (PS_SEQ_MASK & (x))
|
||||||
|
|
||||||
#define PS_STATE_S0 (PS_DPS)
|
#define PS_STATE_S0 (PS_DPS)
|
||||||
|
@ -92,36 +87,32 @@ enum Power_Mgnt
|
||||||
#define PS_STATE_S3 (PS_ALL_ON)
|
#define PS_STATE_S3 (PS_ALL_ON)
|
||||||
#define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON))
|
#define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON))
|
||||||
|
|
||||||
|
|
||||||
#define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON))
|
#define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON))
|
||||||
#define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE))
|
#define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE))
|
||||||
#define CLR_PS_STATE(x) ((x) = ((x) & (0xF0)))
|
#define CLR_PS_STATE(x) ((x) = ((x) & (0xF0)))
|
||||||
|
|
||||||
|
|
||||||
struct reportpwrstate_parm {
|
struct reportpwrstate_parm {
|
||||||
unsigned char mode;
|
unsigned char mode;
|
||||||
unsigned char state; /* the CPWM value */
|
unsigned char state; /* the CPWM value */
|
||||||
unsigned short rsvd;
|
unsigned short rsvd;
|
||||||
};
|
};
|
||||||
|
|
||||||
__inline static void _init_pwrlock(struct semaphore *plock)
|
static inline void _init_pwrlock(struct semaphore *plock)
|
||||||
{
|
{
|
||||||
_rtw_init_sema(plock, 1);
|
_rtw_init_sema(plock, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _free_pwrlock(struct semaphore *plock)
|
static inline void _free_pwrlock(struct semaphore *plock)
|
||||||
{
|
{
|
||||||
_rtw_free_sema(plock);
|
_rtw_free_sema(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void _enter_pwrlock(struct semaphore *plock)
|
||||||
__inline static void _enter_pwrlock(struct semaphore *plock)
|
|
||||||
{
|
{
|
||||||
_rtw_down_sema(plock);
|
_rtw_down_sema(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void _exit_pwrlock(struct semaphore *plock)
|
||||||
__inline static void _exit_pwrlock(struct semaphore *plock)
|
|
||||||
{
|
{
|
||||||
_rtw_up_sema(plock);
|
_rtw_up_sema(plock);
|
||||||
}
|
}
|
||||||
|
@ -142,20 +133,24 @@ enum rt_rf_power_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RF Off Level for IPS or HW/SW radio off */
|
/* RF Off Level for IPS or HW/SW radio off */
|
||||||
#define RT_RF_OFF_LEVL_ASPM BIT(0) /* PCI ASPM */
|
#define RT_RF_OFF_LEVL_ASPM BIT(0) /* PCI ASPM */
|
||||||
#define RT_RF_OFF_LEVL_CLK_REQ BIT(1) /* PCI clock request */
|
#define RT_RF_OFF_LEVL_CLK_REQ BIT(1) /* PCI clock request */
|
||||||
#define RT_RF_OFF_LEVL_PCI_D3 BIT(2) /* PCI D3 mode */
|
#define RT_RF_OFF_LEVL_PCI_D3 BIT(2) /* PCI D3 mode */
|
||||||
#define RT_RF_OFF_LEVL_HALT_NIC BIT(3) /* NIC halt, re-initialize hw parameters */
|
#define RT_RF_OFF_LEVL_HALT_NIC BIT(3) /* NIC halt, re-init hw param*/
|
||||||
#define RT_RF_OFF_LEVL_FREE_FW BIT(4) /* FW free, re-download the FW */
|
#define RT_RF_OFF_LEVL_FREE_FW BIT(4) /* FW free, re-download the FW*/
|
||||||
#define RT_RF_OFF_LEVL_FW_32K BIT(5) /* FW in 32k */
|
#define RT_RF_OFF_LEVL_FW_32K BIT(5) /* FW in 32k */
|
||||||
#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT(6) /* Always enable ASPM and Clock Req in initialization. */
|
#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT(6) /* Always enable ASPM and Clock
|
||||||
#define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R if no packet is received or transmittd. */
|
* Req in initialization. */
|
||||||
#define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */
|
#define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R
|
||||||
|
* if no packet is RX or TX. */
|
||||||
#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? true : false)
|
#define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */
|
||||||
#define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level &= (~(_PS_FLAG)))
|
|
||||||
#define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level |= _PS_FLAG)
|
|
||||||
|
|
||||||
|
#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) \
|
||||||
|
((ppsc->cur_ps_level & _PS_FLAG) ? true : false)
|
||||||
|
#define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) \
|
||||||
|
(ppsc->cur_ps_level &= (~(_PS_FLAG)))
|
||||||
|
#define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) \
|
||||||
|
(ppsc->cur_ps_level |= _PS_FLAG)
|
||||||
|
|
||||||
enum _PS_BBRegBackup_ {
|
enum _PS_BBRegBackup_ {
|
||||||
PSBBREG_RF0 = 0,
|
PSBBREG_RF0 = 0,
|
||||||
|
@ -166,16 +161,16 @@ enum _PS_BBRegBackup_ {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { /* for ips_mode */
|
enum { /* for ips_mode */
|
||||||
IPS_NONE=0,
|
IPS_NONE = 0,
|
||||||
IPS_NORMAL,
|
IPS_NORMAL,
|
||||||
IPS_LEVEL_2,
|
IPS_LEVEL_2,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pwrctrl_priv
|
struct pwrctrl_priv {
|
||||||
{
|
|
||||||
struct semaphore lock;
|
struct semaphore lock;
|
||||||
volatile u8 rpwm; /* requested power state for fw */
|
volatile u8 rpwm; /* requested power state for fw */
|
||||||
volatile u8 cpwm; /* fw current power state. updated when 1. read from HCPWM 2. driver lowers power level */
|
volatile u8 cpwm; /* fw current power state. updated when
|
||||||
|
* 1. read from HCPWM 2. driver lowers power level */
|
||||||
volatile u8 tog; /* toggling */
|
volatile u8 tog; /* toggling */
|
||||||
volatile u8 cpwm_tog; /* toggling */
|
volatile u8 cpwm_tog; /* toggling */
|
||||||
|
|
||||||
|
@ -199,10 +194,11 @@ struct pwrctrl_priv
|
||||||
uint ips_leave_cnts;
|
uint ips_leave_cnts;
|
||||||
|
|
||||||
u8 ips_mode;
|
u8 ips_mode;
|
||||||
u8 ips_mode_req; /* used to accept the mode setting request, will update to ipsmode later */
|
u8 ips_mode_req; /* used to accept the mode setting request,
|
||||||
|
* will update to ipsmode later */
|
||||||
uint bips_processing;
|
uint bips_processing;
|
||||||
u32 ips_deny_time; /* will deny IPS when system time is smaller than this */
|
u32 ips_deny_time; /* will deny IPS when system time less than this */
|
||||||
u8 ps_processing; /* temporarily used to mark whether in rtw_ps_processor */
|
u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */
|
||||||
|
|
||||||
u8 bLeisurePs;
|
u8 bLeisurePs;
|
||||||
u8 LpsIdleCount;
|
u8 LpsIdleCount;
|
||||||
|
@ -213,7 +209,6 @@ struct pwrctrl_priv
|
||||||
s32 pnp_current_pwr_state;
|
s32 pnp_current_pwr_state;
|
||||||
u8 pnp_bstop_trx;
|
u8 pnp_bstop_trx;
|
||||||
|
|
||||||
|
|
||||||
u8 bInternalAutoSuspend;
|
u8 bInternalAutoSuspend;
|
||||||
u8 bInSuspend;
|
u8 bInSuspend;
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
|
@ -251,7 +246,7 @@ struct pwrctrl_priv
|
||||||
(pwrctrlpriv)->ips_mode_req
|
(pwrctrlpriv)->ips_mode_req
|
||||||
|
|
||||||
#define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
|
#define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
|
||||||
(pwrctrlpriv)->ips_mode_req = (ips_mode)
|
((pwrctrlpriv)->ips_mode_req = (ips_mode))
|
||||||
|
|
||||||
#define RTW_PWR_STATE_CHK_INTERVAL 2000
|
#define RTW_PWR_STATE_CHK_INTERVAL 2000
|
||||||
|
|
||||||
|
@ -260,32 +255,38 @@ struct pwrctrl_priv
|
||||||
_set_timer(&(pwrctrlpriv)->pwr_state_check_timer, (ms)); \
|
_set_timer(&(pwrctrlpriv)->pwr_state_check_timer, (ms)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define rtw_set_pwr_state_check_timer(pwrctrlpriv) \
|
#define rtw_set_pwr_state_check_timer(pwrctrl) \
|
||||||
_rtw_set_pwr_state_check_timer((pwrctrlpriv), (pwrctrlpriv)->pwr_state_check_interval)
|
_rtw_set_pwr_state_check_timer((pwrctrl), \
|
||||||
|
(pwrctrl)->pwr_state_check_interval)
|
||||||
|
|
||||||
extern void rtw_init_pwrctrl_priv(struct adapter *adapter);
|
void rtw_init_pwrctrl_priv(struct adapter *adapter);
|
||||||
extern void rtw_free_pwrctrl_priv(struct adapter * adapter);
|
void rtw_free_pwrctrl_priv(struct adapter *adapter);
|
||||||
|
|
||||||
extern void rtw_set_ps_mode(struct adapter * padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode);
|
void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps,
|
||||||
extern void rtw_set_rpwm(struct adapter * padapter, u8 val8);
|
u8 bcn_ant_mode);
|
||||||
extern void LeaveAllPowerSaveMode(struct adapter * Adapter);
|
void rtw_set_rpwm(struct adapter *adapter, u8 val8);
|
||||||
void ips_enter(struct adapter * padapter);
|
void LeaveAllPowerSaveMode(struct adapter *adapter);
|
||||||
int ips_leave(struct adapter * padapter);
|
void ips_enter(struct adapter *padapter);
|
||||||
|
int ips_leave(struct adapter *padapter);
|
||||||
|
|
||||||
void rtw_ps_processor(struct adapter*padapter);
|
void rtw_ps_processor(struct adapter *padapter);
|
||||||
|
|
||||||
enum rt_rf_power_state RfOnOffDetect(struct adapter * pAdapter );
|
enum rt_rf_power_state RfOnOffDetect(struct adapter *iadapter);
|
||||||
|
|
||||||
s32 LPS_RF_ON_check(struct adapter * padapter, u32 delay_ms);
|
s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms);
|
||||||
void LPS_Enter(struct adapter * padapter);
|
void LPS_Enter(struct adapter *adapter);
|
||||||
void LPS_Leave(struct adapter * padapter);
|
void LPS_Leave(struct adapter *adapter);
|
||||||
|
|
||||||
u8 rtw_interface_ps_func(struct adapter *padapter,enum hal_intf_ps_func efunc_id,u8* val);
|
u8 rtw_interface_ps_func(struct adapter *adapter,
|
||||||
void rtw_set_ips_deny(struct adapter *padapter, u32 ms);
|
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||||
int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *caller);
|
void rtw_set_ips_deny(struct adapter *adapter, u32 ms);
|
||||||
#define rtw_pwr_wakeup(adapter) _rtw_pwr_wakeup(adapter, RTW_PWR_STATE_CHK_INTERVAL, __func__)
|
int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms,
|
||||||
#define rtw_pwr_wakeup_ex(adapter, ips_deffer_ms) _rtw_pwr_wakeup(adapter, ips_deffer_ms, __func__)
|
const char *caller);
|
||||||
int rtw_pm_set_ips(struct adapter *padapter, u8 mode);
|
#define rtw_pwr_wakeup(adapter) \
|
||||||
int rtw_pm_set_lps(struct adapter *padapter, u8 mode);
|
_rtw_pwr_wakeup(adapter, RTW_PWR_STATE_CHK_INTERVAL, __func__)
|
||||||
|
#define rtw_pwr_wakeup_ex(adapter, ips_deffer_ms) \
|
||||||
|
_rtw_pwr_wakeup(adapter, ips_deffer_ms, __func__)
|
||||||
|
int rtw_pm_set_ips(struct adapter *adapter, u8 mode);
|
||||||
|
int rtw_pm_set_lps(struct adapter *adapter, u8 mode);
|
||||||
|
|
||||||
#endif /* __RTL871X_PWRCTRL_H_ */
|
#endif /* __RTL871X_PWRCTRL_H_ */
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
|
|
||||||
struct qos_priv {
|
struct qos_priv {
|
||||||
unsigned int qos_option; /* bit mask option: u-apsd, s-apsd, ts, block ack... */
|
unsigned int qos_option; /* bit mask option: u-apsd,
|
||||||
|
* s-apsd, ts, block ack... */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _RTL871X_QOS_H_ */
|
#endif /* _RTL871X_QOS_H_ */
|
||||||
|
|
|
@ -40,21 +40,23 @@ static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37};
|
||||||
static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
|
static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
|
||||||
static u8 SNAP_ETH_TYPE_APPLETALK_DDP[2] = {0x80, 0x9b};
|
static u8 SNAP_ETH_TYPE_APPLETALK_DDP[2] = {0x80, 0x9b};
|
||||||
static u8 SNAP_ETH_TYPE_TDLS[2] = {0x89, 0x0d};
|
static u8 SNAP_ETH_TYPE_TDLS[2] = {0x89, 0x0d};
|
||||||
static u8 SNAP_HDR_APPLETALK_DDP[3] = {0x08, 0x00, 0x07}; /* Datagram Delivery Protocol */
|
/* Datagram Delivery Protocol */
|
||||||
|
static u8 SNAP_HDR_APPLETALK_DDP[3] = {0x08, 0x00, 0x07};
|
||||||
|
|
||||||
static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
|
static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
|
||||||
static u8 oui_rfc1042[]= {0x00,0x00,0x00};
|
static u8 oui_rfc1042[] = {0x00,0x00,0x00};
|
||||||
|
|
||||||
#define MAX_SUBFRAME_COUNT 64
|
#define MAX_SUBFRAME_COUNT 64
|
||||||
static u8 rtw_rfc1042_header[] =
|
static u8 rtw_rfc1042_header[] = {
|
||||||
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
|
0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
|
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
|
||||||
static u8 rtw_bridge_tunnel_header[] =
|
static u8 rtw_bridge_tunnel_header[] = {
|
||||||
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
|
0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
|
||||||
|
};
|
||||||
|
|
||||||
/* for Rx reordering buffer control */
|
/* for Rx reordering buffer control */
|
||||||
struct recv_reorder_ctrl
|
struct recv_reorder_ctrl {
|
||||||
{
|
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
u8 enable;
|
u8 enable;
|
||||||
u16 indicate_seq;/* wstart_b, init_value=0xffff */
|
u16 indicate_seq;/* wstart_b, init_value=0xffff */
|
||||||
|
@ -86,7 +88,6 @@ struct stainfo_rxcache {
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct smooth_rssi_data {
|
struct smooth_rssi_data {
|
||||||
u32 elements[100]; /* array to store values */
|
u32 elements[100]; /* array to store values */
|
||||||
u32 index; /* index to current array to store */
|
u32 index; /* index to current array to store */
|
||||||
|
@ -107,7 +108,9 @@ struct phy_info {
|
||||||
u8 RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; /* EVM */
|
u8 RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; /* EVM */
|
||||||
u8 RxMIMOSignalStrength[MAX_PATH_NUM_92CS];/* in 0~100 index */
|
u8 RxMIMOSignalStrength[MAX_PATH_NUM_92CS];/* in 0~100 index */
|
||||||
s8 RxPower; /* in dBm Translate from PWdB */
|
s8 RxPower; /* in dBm Translate from PWdB */
|
||||||
s8 RecvSignalPower;/* Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. */
|
/* Real power in dBm for this packet, no beautification and aggregation.
|
||||||
|
* Keep this raw info to be used for the other procedures. */
|
||||||
|
s8 recvpower;
|
||||||
u8 BTRxRSSIPercentage;
|
u8 BTRxRSSIPercentage;
|
||||||
u8 SignalStrength; /* in 0-100 index. */
|
u8 SignalStrength; /* in 0-100 index. */
|
||||||
u8 RxPwr[MAX_PATH_NUM_92CS];/* per-path's pwdb */
|
u8 RxPwr[MAX_PATH_NUM_92CS];/* per-path's pwdb */
|
||||||
|
@ -132,7 +135,8 @@ struct rx_pkt_attrib {
|
||||||
u8 order;
|
u8 order;
|
||||||
u8 privacy; /* in frame_ctrl field */
|
u8 privacy; /* in frame_ctrl field */
|
||||||
u8 bdecrypted;
|
u8 bdecrypted;
|
||||||
u8 encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
|
u8 encrypt; /* when 0 indicate no encrypt. when non-zero,
|
||||||
|
* indicate the encrypt algorith */
|
||||||
u8 iv_len;
|
u8 iv_len;
|
||||||
u8 icv_len;
|
u8 icv_len;
|
||||||
u8 crc_err;
|
u8 crc_err;
|
||||||
|
@ -184,13 +188,13 @@ struct recv_stat {
|
||||||
#define EOR BIT(30)
|
#define EOR BIT(30)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(passive) ; returnpkt(dispatch)
|
accesser of recv_priv: rtw_recv_entry(dispatch / passive level);
|
||||||
|
recv_thread(passive) ; returnpkt(dispatch)
|
||||||
; halt(passive) ;
|
; halt(passive) ;
|
||||||
|
|
||||||
using enter_critical section to protect
|
using enter_critical section to protect
|
||||||
*/
|
*/
|
||||||
struct recv_priv
|
struct recv_priv {
|
||||||
{
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
struct __queue free_recv_queue;
|
struct __queue free_recv_queue;
|
||||||
struct __queue recv_pending_queue;
|
struct __queue recv_pending_queue;
|
||||||
|
@ -239,45 +243,38 @@ struct recv_priv
|
||||||
struct signal_stat signal_strength_data;
|
struct signal_stat signal_strength_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define rtw_set_signal_stat_timer(recvpriv) _set_timer(&(recvpriv)->signal_stat_timer, (recvpriv)->signal_stat_sampling_interval)
|
#define rtw_set_signal_stat_timer(recvpriv) \
|
||||||
|
_set_timer(&(recvpriv)->signal_stat_timer, \
|
||||||
|
(recvpriv)->signal_stat_sampling_interval)
|
||||||
|
|
||||||
struct sta_recv_priv {
|
struct sta_recv_priv {
|
||||||
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
int option;
|
int option;
|
||||||
struct __queue defrag_q; /* keeping the fragment frame until defrag */
|
struct __queue defrag_q; /* keeping the fragment frame until defrag */
|
||||||
struct stainfo_rxcache rxcache;
|
struct stainfo_rxcache rxcache;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct recv_buf
|
struct recv_buf {
|
||||||
{
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
|
|
||||||
spinlock_t recvbuf_lock;
|
spinlock_t recvbuf_lock;
|
||||||
|
|
||||||
u32 ref_cnt;
|
u32 ref_cnt;
|
||||||
|
struct adapter *adapter;
|
||||||
struct adapter * adapter;
|
|
||||||
|
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
u8 *pallocated_buf;
|
u8 *pallocated_buf;
|
||||||
|
|
||||||
u32 len;
|
u32 len;
|
||||||
u8 *phead;
|
u8 *phead;
|
||||||
u8 *pdata;
|
u8 *pdata;
|
||||||
u8 *ptail;
|
u8 *ptail;
|
||||||
u8 *pend;
|
u8 *pend;
|
||||||
struct urb * purb;
|
struct urb *purb;
|
||||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||||
u32 alloc_sz;
|
u32 alloc_sz;
|
||||||
|
|
||||||
u8 irp_pending;
|
u8 irp_pending;
|
||||||
int transfer_len;
|
int transfer_len;
|
||||||
struct sk_buff *pskb;
|
struct sk_buff *pskb;
|
||||||
u8 reuse;
|
u8 reuse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
head ----->
|
head ----->
|
||||||
|
|
||||||
|
@ -293,95 +290,74 @@ struct recv_buf
|
||||||
len = (unsigned int )(tail - data);
|
len = (unsigned int )(tail - data);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
struct recv_frame_hdr
|
struct recv_frame_hdr {
|
||||||
{
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct sk_buff *pkt;
|
struct sk_buff *pkt;
|
||||||
struct sk_buff *pkt_newalloc;
|
struct sk_buff *pkt_newalloc;
|
||||||
|
|
||||||
struct adapter *adapter;
|
struct adapter *adapter;
|
||||||
|
|
||||||
u8 fragcnt;
|
u8 fragcnt;
|
||||||
|
|
||||||
int frame_tag;
|
int frame_tag;
|
||||||
|
|
||||||
struct rx_pkt_attrib attrib;
|
struct rx_pkt_attrib attrib;
|
||||||
|
|
||||||
uint len;
|
uint len;
|
||||||
u8 *rx_head;
|
u8 *rx_head;
|
||||||
u8 *rx_data;
|
u8 *rx_data;
|
||||||
u8 *rx_tail;
|
u8 *rx_tail;
|
||||||
u8 *rx_end;
|
u8 *rx_end;
|
||||||
|
|
||||||
void *precvbuf;
|
void *precvbuf;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
|
||||||
/* for A-MPDU Rx reordering buffer control */
|
/* for A-MPDU Rx reordering buffer control */
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
union recv_frame{
|
union recv_frame {
|
||||||
|
union {
|
||||||
union{
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct recv_frame_hdr hdr;
|
struct recv_frame_hdr hdr;
|
||||||
uint mem[RECVFRAME_HDR_ALIGN>>2];
|
uint mem[RECVFRAME_HDR_ALIGN>>2];
|
||||||
}u;
|
} u;
|
||||||
|
|
||||||
/* uint mem[MAX_RXSZ>>2]; */
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
||||||
extern union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
|
union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
||||||
extern union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
|
void rtw_init_recvframe(union recv_frame *precvframe,
|
||||||
extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv);
|
struct recv_priv *precvpriv);
|
||||||
extern int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_queue);
|
int rtw_free_recvframe(union recv_frame *precvframe,
|
||||||
|
struct __queue *pfree_recv_queue);
|
||||||
#define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
|
#define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
|
||||||
extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||||
extern int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||||
|
void rtw_free_recvframe_queue(struct __queue *pframequeue,
|
||||||
extern void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue);
|
struct __queue *pfree_recv_queue);
|
||||||
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
||||||
|
|
||||||
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
||||||
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||||
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
||||||
|
|
||||||
__inline static u8 *get_rxmem(union recv_frame *precvframe)
|
static inline u8 *get_rxmem(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
/* always return rx_head... */
|
/* always return rx_head... */
|
||||||
if (precvframe==NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_head;
|
return precvframe->u.hdr.rx_head;
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *get_rx_status(union recv_frame *precvframe)
|
static inline u8 *get_rx_status(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
|
|
||||||
return get_rxmem(precvframe);
|
return get_rxmem(precvframe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *get_recvframe_data(union recv_frame *precvframe)
|
static inline u8 *get_recvframe_data(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
|
/* always return rx_data */
|
||||||
/* alwasy return rx_data */
|
if (precvframe == NULL)
|
||||||
if (precvframe==NULL)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_data;
|
return precvframe->u.hdr.rx_data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *recvframe_push(union recv_frame *precvframe, int sz)
|
static inline u8 *recvframe_push(union recv_frame *precvframe, int sz)
|
||||||
{
|
{
|
||||||
/* append data before rx_data */
|
/* append data before rx_data */
|
||||||
|
|
||||||
|
@ -390,56 +366,42 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, int sz)
|
||||||
* This function extends the used data area of the recv_frame at the buffer
|
* This function extends the used data area of the recv_frame at the buffer
|
||||||
* start. rx_data must be still larger than rx_head, after pushing.
|
* start. rx_data must be still larger than rx_head, after pushing.
|
||||||
*/
|
*/
|
||||||
|
if (precvframe == NULL)
|
||||||
if (precvframe==NULL)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
precvframe->u.hdr.rx_data -= sz ;
|
precvframe->u.hdr.rx_data -= sz ;
|
||||||
if ( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head )
|
if ( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
||||||
{
|
|
||||||
precvframe->u.hdr.rx_data += sz ;
|
precvframe->u.hdr.rx_data += sz ;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
precvframe->u.hdr.len +=sz;
|
precvframe->u.hdr.len +=sz;
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_data;
|
return precvframe->u.hdr.rx_data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline u8 *recvframe_pull(union recv_frame *precvframe, int sz)
|
||||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, int sz)
|
|
||||||
{
|
{
|
||||||
/* rx_data += sz; move rx_data sz bytes hereafter */
|
/* rx_data += sz; move rx_data sz bytes hereafter */
|
||||||
|
|
||||||
/* used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller */
|
/* used for extract sz bytes from rx_data, update rx_data and return
|
||||||
|
* the updated rx_data to the caller */
|
||||||
|
|
||||||
|
if (precvframe == NULL)
|
||||||
if (precvframe==NULL)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
precvframe->u.hdr.rx_data += sz;
|
precvframe->u.hdr.rx_data += sz;
|
||||||
|
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
|
||||||
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail)
|
|
||||||
{
|
|
||||||
precvframe->u.hdr.rx_data -= sz;
|
precvframe->u.hdr.rx_data -= sz;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
precvframe->u.hdr.len -= sz;
|
||||||
precvframe->u.hdr.len -=sz;
|
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_data;
|
return precvframe->u.hdr.rx_data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
static inline u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
||||||
{
|
{
|
||||||
/* used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller */
|
/* used for append sz bytes from ptr to rx_tail, update rx_tail
|
||||||
|
* and return the updated rx_tail to the caller */
|
||||||
/* after putting, rx_tail must be still larger than rx_end. */
|
/* after putting, rx_tail must be still larger than rx_end. */
|
||||||
|
|
||||||
if (precvframe==NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
precvframe->u.hdr.rx_tail += sz;
|
precvframe->u.hdr.rx_tail += sz;
|
||||||
|
@ -452,105 +414,91 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
||||||
return precvframe->u.hdr.rx_tail;
|
return precvframe->u.hdr.rx_tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
|
static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
|
||||||
{
|
{
|
||||||
/* rmv data from rx_tail (by yitsen) */
|
/* rmv data from rx_tail (by yitsen) */
|
||||||
|
|
||||||
/* used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller */
|
/* used for extract sz bytes from rx_end, update rx_end and return
|
||||||
|
* the updated rx_end to the caller */
|
||||||
/* after pulling, rx_end must be still larger than rx_data. */
|
/* after pulling, rx_end must be still larger than rx_data. */
|
||||||
|
|
||||||
if (precvframe==NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
precvframe->u.hdr.rx_tail -= sz;
|
precvframe->u.hdr.rx_tail -= sz;
|
||||||
|
if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data) {
|
||||||
if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data)
|
|
||||||
{
|
|
||||||
precvframe->u.hdr.rx_tail += sz;
|
precvframe->u.hdr.rx_tail += sz;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
precvframe->u.hdr.len -= sz;
|
||||||
precvframe->u.hdr.len -=sz;
|
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_tail;
|
return precvframe->u.hdr.rx_tail;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
||||||
|
|
||||||
__inline static unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
|
||||||
{
|
{
|
||||||
unsigned char *buf_desc;
|
unsigned char *buf_desc;
|
||||||
|
|
||||||
if (precvframe==NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return buf_desc;
|
return buf_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||||
__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
|
||||||
{
|
{
|
||||||
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
||||||
/* from any given member of recv_frame. */
|
/* from any given member of recv_frame. */
|
||||||
/* rxmem indicates the any member/address in recv_frame */
|
/* rxmem indicates the any member/address in recv_frame */
|
||||||
|
|
||||||
return (union recv_frame*)(((size_t)rxmem >> RXFRAME_ALIGN) << RXFRAME_ALIGN);
|
return (union recv_frame *)(((size_t)rxmem >> RXFRAME_ALIGN) << RXFRAME_ALIGN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
|
static inline union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
|
u8 *buf_star;
|
||||||
u8 * buf_star;
|
union recv_frame *precv_frame;
|
||||||
union recv_frame * precv_frame;
|
precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
|
||||||
precv_frame = rxmem_to_recvframe((unsigned char*)buf_star);
|
|
||||||
|
|
||||||
return precv_frame;
|
return precv_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *pkt_to_recvmem(struct sk_buff *pkt)
|
static inline u8 *pkt_to_recvmem(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
/* return the rx_head */
|
/* return the rx_head */
|
||||||
|
|
||||||
union recv_frame * precv_frame = pkt_to_recvframe(pkt);
|
union recv_frame *precv_frame = pkt_to_recvframe(pkt);
|
||||||
|
|
||||||
return precv_frame->u.hdr.rx_head;
|
return precv_frame->u.hdr.rx_head;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *pkt_to_recvdata(struct sk_buff *pkt)
|
static inline u8 *pkt_to_recvdata(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
/* return the rx_data */
|
/* return the rx_data */
|
||||||
|
|
||||||
union recv_frame * precv_frame =pkt_to_recvframe(pkt);
|
union recv_frame *precv_frame =pkt_to_recvframe(pkt);
|
||||||
|
|
||||||
return precv_frame->u.hdr.rx_data;
|
return precv_frame->u.hdr.rx_data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int get_recvframe_len(union recv_frame *precvframe)
|
||||||
__inline static int get_recvframe_len(union recv_frame *precvframe)
|
|
||||||
{
|
{
|
||||||
return precvframe->u.hdr.len;
|
return precvframe->u.hdr.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline s32 translate_percentage_to_dbm(u32 sig_stren_index)
|
||||||
__inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
|
|
||||||
{
|
{
|
||||||
s32 SignalPower; /* in dBm. */
|
s32 power; /* in dBm. */
|
||||||
|
|
||||||
/* Translate to dBm (x=0.5y-95). */
|
/* Translate to dBm (x=0.5y-95). */
|
||||||
SignalPower = (s32)((SignalStrengthIndex + 1) >> 1);
|
power = (s32)((sig_stren_index + 1) >> 1);
|
||||||
SignalPower -= 95;
|
power -= 95;
|
||||||
|
|
||||||
return SignalPower;
|
return power;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct sta_info;
|
struct sta_info;
|
||||||
|
|
||||||
extern void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv);
|
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv);
|
||||||
|
|
||||||
extern void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame);
|
void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,31 +35,32 @@
|
||||||
#define RTL8711_RF_MAX_SENS 6
|
#define RTL8711_RF_MAX_SENS 6
|
||||||
#define RTL8711_RF_DEF_SENS 4
|
#define RTL8711_RF_DEF_SENS 4
|
||||||
|
|
||||||
/* */
|
/* We now define the following channels as the max channels in each
|
||||||
/* We now define the following channels as the max channels in each channel plan. */
|
* channel plan. */
|
||||||
/* 2G, total 14 chnls */
|
/* 2G, total 14 chnls */
|
||||||
/* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */
|
/* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */
|
||||||
/* 5G, total 24 chnls */
|
/* 5G, total 24 chnls */
|
||||||
/* {36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165} */
|
/* {36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,
|
||||||
#define MAX_CHANNEL_NUM_2G 14
|
* 128,132,136,140,149,153,157,161,165} */
|
||||||
#define MAX_CHANNEL_NUM_5G 24
|
#define MAX_CHANNEL_NUM_2G 14
|
||||||
#define MAX_CHANNEL_NUM 38/* 14+24 */
|
#define MAX_CHANNEL_NUM_5G 24
|
||||||
|
#define MAX_CHANNEL_NUM 38/* 14+24 */
|
||||||
|
|
||||||
/* define NUM_REGULATORYS 21 */
|
/* define NUM_REGULATORYS 21 */
|
||||||
#define NUM_REGULATORYS 1
|
#define NUM_REGULATORYS 1
|
||||||
|
|
||||||
/* Country codes */
|
/* Country codes */
|
||||||
#define USA 0x555320
|
#define USA 0x555320
|
||||||
#define EUROPE 0x1 /* temp, should be provided later */
|
#define EUROPE 0x1 /* temp, should be provided later */
|
||||||
#define JAPAN 0x2 /* temp, should be provided later */
|
#define JAPAN 0x2 /* temp, should be provided later */
|
||||||
|
|
||||||
struct regulatory_class {
|
struct regulatory_class {
|
||||||
u32 starting_freq; /* MHz, */
|
u32 starting_freq; /* MHz, */
|
||||||
u8 channel_set[MAX_CHANNEL_NUM];
|
u8 channel_set[MAX_CHANNEL_NUM];
|
||||||
u8 channel_cck_power[MAX_CHANNEL_NUM];/* dbm */
|
u8 channel_cck_power[MAX_CHANNEL_NUM]; /* dbm */
|
||||||
u8 channel_ofdm_power[MAX_CHANNEL_NUM];/* dbm */
|
u8 channel_ofdm_power[MAX_CHANNEL_NUM]; /* dbm */
|
||||||
u8 txpower_limit; /* dbm */
|
u8 txpower_limit; /* dbm */
|
||||||
u8 channel_spacing; /* MHz */
|
u8 channel_spacing; /* MHz */
|
||||||
u8 modem;
|
u8 modem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,7 +74,8 @@ enum capability {
|
||||||
cPBCC = 0x0040,
|
cPBCC = 0x0040,
|
||||||
cChannelAgility = 0x0080,
|
cChannelAgility = 0x0080,
|
||||||
cSpectrumMgnt = 0x0100,
|
cSpectrumMgnt = 0x0100,
|
||||||
cQos = 0x0200, /* For HCCA, use with CF-Pollable and CF-PollReq */
|
cQos = 0x0200, /* For HCCA, use with CF-Pollable
|
||||||
|
* and CF-PollReq */
|
||||||
cShortSlotTime = 0x0400,
|
cShortSlotTime = 0x0400,
|
||||||
cAPSD = 0x0800,
|
cAPSD = 0x0800,
|
||||||
cRM = 0x1000, /* RRM (Radio Request Measurement) */
|
cRM = 0x1000, /* RRM (Radio Request Measurement) */
|
||||||
|
@ -82,25 +84,23 @@ enum capability {
|
||||||
cImmediateBA = 0x8000,
|
cImmediateBA = 0x8000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _REG_PREAMBLE_MODE{
|
enum _REG_PREAMBLE_MODE {
|
||||||
PREAMBLE_LONG = 1,
|
PREAMBLE_LONG = 1,
|
||||||
PREAMBLE_AUTO = 2,
|
PREAMBLE_AUTO = 2,
|
||||||
PREAMBLE_SHORT = 3,
|
PREAMBLE_SHORT = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum _RTL8712_RF_MIMO_CONFIG_{
|
enum _RTL8712_RF_MIMO_CONFIG_{
|
||||||
RTL8712_RFCONFIG_1T=0x10,
|
RTL8712_RFCONFIG_1T = 0x10,
|
||||||
RTL8712_RFCONFIG_2T=0x20,
|
RTL8712_RFCONFIG_2T = 0x20,
|
||||||
RTL8712_RFCONFIG_1R=0x01,
|
RTL8712_RFCONFIG_1R = 0x01,
|
||||||
RTL8712_RFCONFIG_2R=0x02,
|
RTL8712_RFCONFIG_2R = 0x02,
|
||||||
RTL8712_RFCONFIG_1T1R=0x11,
|
RTL8712_RFCONFIG_1T1R = 0x11,
|
||||||
RTL8712_RFCONFIG_1T2R=0x12,
|
RTL8712_RFCONFIG_1T2R = 0x12,
|
||||||
RTL8712_RFCONFIG_TURBO=0x92,
|
RTL8712_RFCONFIG_TURBO = 0x92,
|
||||||
RTL8712_RFCONFIG_2T2R=0x22
|
RTL8712_RFCONFIG_2T2R = 0x22
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum rf90_radio_path {
|
enum rf90_radio_path {
|
||||||
RF90_PATH_A = 0, /* Radio Path A */
|
RF90_PATH_A = 0, /* Radio Path A */
|
||||||
RF90_PATH_B = 1, /* Radio Path B */
|
RF90_PATH_B = 1, /* Radio Path B */
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
#define _NO_PRIVACY_ 0x0
|
#define _NO_PRIVACY_ 0x0
|
||||||
#define _WEP40_ 0x1
|
#define _WEP40_ 0x1
|
||||||
#define _TKIP_ 0x2
|
#define _TKIP_ 0x2
|
||||||
#define _TKIP_WTMIC_ 0x3
|
#define _TKIP_WTMIC_ 0x3
|
||||||
#define _AES_ 0x4
|
#define _AES_ 0x4
|
||||||
#define _WEP104_ 0x5
|
#define _WEP104_ 0x5
|
||||||
#define _WEP_WPA_MIXED_ 0x07 /* WEP + WPA */
|
#define _WEP_WPA_MIXED_ 0x07 /* WEP + WPA */
|
||||||
#define _SMS4_ 0x06
|
#define _SMS4_ 0x06
|
||||||
|
|
||||||
#define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_))
|
#define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_))
|
||||||
|
@ -60,37 +60,33 @@ enum {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
union pn48 {
|
union pn48 {
|
||||||
|
|
||||||
u64 val;
|
u64 val;
|
||||||
|
|
||||||
#ifdef __LITTLE_ENDIAN
|
#ifdef __LITTLE_ENDIAN
|
||||||
|
struct {
|
||||||
struct {
|
u8 TSC0;
|
||||||
u8 TSC0;
|
u8 TSC1;
|
||||||
u8 TSC1;
|
u8 TSC2;
|
||||||
u8 TSC2;
|
u8 TSC3;
|
||||||
u8 TSC3;
|
u8 TSC4;
|
||||||
u8 TSC4;
|
u8 TSC5;
|
||||||
u8 TSC5;
|
u8 TSC6;
|
||||||
u8 TSC6;
|
u8 TSC7;
|
||||||
u8 TSC7;
|
} _byte_;
|
||||||
} _byte_;
|
|
||||||
|
|
||||||
#elif defined(__BIG_ENDIAN)
|
#elif defined(__BIG_ENDIAN)
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
u8 TSC7;
|
u8 TSC7;
|
||||||
u8 TSC6;
|
u8 TSC6;
|
||||||
u8 TSC5;
|
u8 TSC5;
|
||||||
u8 TSC4;
|
u8 TSC4;
|
||||||
u8 TSC3;
|
u8 TSC3;
|
||||||
u8 TSC2;
|
u8 TSC2;
|
||||||
u8 TSC1;
|
u8 TSC1;
|
||||||
u8 TSC0;
|
u8 TSC0;
|
||||||
} _byte_;
|
} _byte_;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
union Keytype {
|
union Keytype {
|
||||||
|
@ -98,7 +94,6 @@ union Keytype {
|
||||||
u32 lkey[4];
|
u32 lkey[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct rt_pmkid_list {
|
struct rt_pmkid_list {
|
||||||
u8 bUsed;
|
u8 bUsed;
|
||||||
u8 Bssid[6];
|
u8 Bssid[6];
|
||||||
|
@ -108,21 +103,26 @@ struct rt_pmkid_list {
|
||||||
u16 ssid_length;
|
u16 ssid_length;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct security_priv
|
struct security_priv {
|
||||||
{
|
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open,
|
||||||
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, 8021x and authswitch */
|
* shared, 8021x and authswitch */
|
||||||
u32 dot11PrivacyAlgrthm; /* This specify the privacy for shared auth. algorithm. */
|
u32 dot11PrivacyAlgrthm; /* This specify the privacy for
|
||||||
|
* shared auth. algorithm. */
|
||||||
/* WEP */
|
/* WEP */
|
||||||
u32 dot11PrivacyKeyIndex; /* this is only valid for legendary wep, 0~3 for key id. (tx key index) */
|
u32 dot11PrivacyKeyIndex; /* this is only valid for legendary
|
||||||
union Keytype dot11DefKey[4]; /* this is only valid for def. key */
|
* wep, 0~3 for key id.(tx key index) */
|
||||||
|
union Keytype dot11DefKey[4]; /* this is only valid for def. key */
|
||||||
u32 dot11DefKeylen[4];
|
u32 dot11DefKeylen[4];
|
||||||
u32 dot118021XGrpPrivacy; /* This specify the privacy algthm. used for Grp key */
|
u32 dot118021XGrpPrivacy; /* This specify the privacy algthm.
|
||||||
u32 dot118021XGrpKeyid; /* key id used for Grp Key ( tx key index) */
|
* used for Grp key */
|
||||||
union Keytype dot118021XGrpKey[4]; /* 802.1x Group Key, for inx0 and inx1 */
|
u32 dot118021XGrpKeyid; /* key id used for Grp Key
|
||||||
|
* ( tx key index) */
|
||||||
|
union Keytype dot118021XGrpKey[4]; /* 802.1x Group Key,
|
||||||
|
* for inx0 and inx1 */
|
||||||
union Keytype dot118021XGrptxmickey[4];
|
union Keytype dot118021XGrptxmickey[4];
|
||||||
union Keytype dot118021XGrprxmickey[4];
|
union Keytype dot118021XGrprxmickey[4];
|
||||||
union pn48 dot11Grptxpn; /* PN48 used for Grp Key xmit. */
|
union pn48 dot11Grptxpn; /* PN48 used for Grp Key xmit.*/
|
||||||
union pn48 dot11Grprxpn; /* PN48 used for Grp Key recv. */
|
union pn48 dot11Grprxpn; /* PN48 used for Grp Key recv.*/
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
/* extend security capabilities for AP_MODE */
|
/* extend security capabilities for AP_MODE */
|
||||||
unsigned int dot8021xalg;/* 0:disable, 1:psk, 2:802.1x */
|
unsigned int dot8021xalg;/* 0:disable, 1:psk, 2:802.1x */
|
||||||
|
@ -140,9 +140,11 @@ struct security_priv
|
||||||
u8 bgrpkey_handshake;
|
u8 bgrpkey_handshake;
|
||||||
s32 sw_encrypt;/* from registry_priv */
|
s32 sw_encrypt;/* from registry_priv */
|
||||||
s32 sw_decrypt;/* from registry_priv */
|
s32 sw_decrypt;/* from registry_priv */
|
||||||
s32 hw_decrypted;/* if the rx packets is hw_decrypted==false, it means the hw has not been ready. */
|
s32 hw_decrypted;/* if the rx packets is hw_decrypted==false,i
|
||||||
|
* it means the hw has not been ready. */
|
||||||
|
|
||||||
/* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */
|
/* keeps the auth_type & enc_status from upper layer
|
||||||
|
* ioctl(wpa_supplicant or wzc) */
|
||||||
u32 ndisauthtype; /* NDIS_802_11_AUTHENTICATION_MODE */
|
u32 ndisauthtype; /* NDIS_802_11_AUTHENTICATION_MODE */
|
||||||
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||||
struct wlan_bssid_ex sec_bss; /* for joinbss (h2c buffer) usage */
|
struct wlan_bssid_ex sec_bss; /* for joinbss (h2c buffer) usage */
|
||||||
|
@ -162,8 +164,8 @@ struct security_priv
|
||||||
/* */
|
/* */
|
||||||
/* For WPA2 Pre-Authentication. */
|
/* For WPA2 Pre-Authentication. */
|
||||||
/* */
|
/* */
|
||||||
struct rt_pmkid_list PMKIDList[NUM_PMKID_CACHE]; /* Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
|
struct rt_pmkid_list PMKIDList[NUM_PMKID_CACHE];
|
||||||
u8 PMKIDIndex;
|
u8 PMKIDIndex;
|
||||||
u8 bWepDefaultKeyIdxSet;
|
u8 bWepDefaultKeyIdxSet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,9 +176,8 @@ struct sha256_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
|
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
|
||||||
do{\
|
do {\
|
||||||
switch (psecuritypriv->dot11AuthAlgrthm)\
|
switch (psecuritypriv->dot11AuthAlgrthm) {\
|
||||||
{\
|
|
||||||
case dot11AuthAlgrthm_Open:\
|
case dot11AuthAlgrthm_Open:\
|
||||||
case dot11AuthAlgrthm_Shared:\
|
case dot11AuthAlgrthm_Shared:\
|
||||||
case dot11AuthAlgrthm_Auto:\
|
case dot11AuthAlgrthm_Auto:\
|
||||||
|
@ -192,13 +193,11 @@ do{\
|
||||||
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
|
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
|
||||||
break;\
|
break;\
|
||||||
}\
|
}\
|
||||||
}while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt)\
|
||||||
#define SET_ICE_IV_LEN( iv_len, icv_len, encrypt)\
|
do {\
|
||||||
do{\
|
switch (encrypt) {\
|
||||||
switch (encrypt)\
|
|
||||||
{\
|
|
||||||
case _WEP40_:\
|
case _WEP40_:\
|
||||||
case _WEP104_:\
|
case _WEP104_:\
|
||||||
iv_len = 4;\
|
iv_len = 4;\
|
||||||
|
@ -221,25 +220,24 @@ do{\
|
||||||
icv_len = 0;\
|
icv_len = 0;\
|
||||||
break;\
|
break;\
|
||||||
}\
|
}\
|
||||||
}while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define GET_TKIP_PN(iv,dot11txpn)\
|
#define GET_TKIP_PN(iv,dot11txpn)\
|
||||||
do{\
|
do {\
|
||||||
dot11txpn._byte_.TSC0=iv[2];\
|
dot11txpn._byte_.TSC0=iv[2];\
|
||||||
dot11txpn._byte_.TSC1=iv[0];\
|
dot11txpn._byte_.TSC1=iv[0];\
|
||||||
dot11txpn._byte_.TSC2=iv[4];\
|
dot11txpn._byte_.TSC2=iv[4];\
|
||||||
dot11txpn._byte_.TSC3=iv[5];\
|
dot11txpn._byte_.TSC3=iv[5];\
|
||||||
dot11txpn._byte_.TSC4=iv[6];\
|
dot11txpn._byte_.TSC4=iv[6];\
|
||||||
dot11txpn._byte_.TSC5=iv[7];\
|
dot11txpn._byte_.TSC5=iv[7];\
|
||||||
}while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )
|
#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
|
||||||
#define ROR32( A, n ) ROL32( (A), 32-(n) )
|
#define ROR32(A, n) ROL32((A), 32-(n))
|
||||||
|
|
||||||
struct mic_data
|
struct mic_data {
|
||||||
{
|
|
||||||
u32 K0, K1; /* Key */
|
u32 K0, K1; /* Key */
|
||||||
u32 L, R; /* Current state */
|
u32 L, R; /* Current state */
|
||||||
u32 M; /* Message accumulator (single word) */
|
u32 M; /* Message accumulator (single word) */
|
||||||
|
@ -301,33 +299,33 @@ static inline u32 rotr(u32 val, int bits)
|
||||||
(ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); \
|
(ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); \
|
||||||
(ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
|
(ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
|
||||||
|
|
||||||
#define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \
|
#define WPA_GET_BE32(a) ((((u32)(a)[0]) << 24) | (((u32)(a)[1]) << 16) | \
|
||||||
(((u32) (a)[2]) << 8) | ((u32) (a)[3]))
|
(((u32)(a)[2]) << 8) | ((u32)(a)[3]))
|
||||||
|
|
||||||
#define WPA_PUT_LE16(a, val) \
|
#define WPA_PUT_LE16(a, val) \
|
||||||
do { \
|
do { \
|
||||||
(a)[1] = ((u16) (val)) >> 8; \
|
(a)[1] = ((u16)(val)) >> 8; \
|
||||||
(a)[0] = ((u16) (val)) & 0xff; \
|
(a)[0] = ((u16)(val)) & 0xff; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define WPA_PUT_BE32(a, val) \
|
#define WPA_PUT_BE32(a, val) \
|
||||||
do { \
|
do { \
|
||||||
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
(a)[0] = (u8)((((u32)(val)) >> 24) & 0xff); \
|
||||||
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
(a)[1] = (u8)((((u32)(val)) >> 16) & 0xff); \
|
||||||
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
(a)[2] = (u8)((((u32)(val)) >> 8) & 0xff); \
|
||||||
(a)[3] = (u8) (((u32) (val)) & 0xff); \
|
(a)[3] = (u8)(((u32)(val)) & 0xff); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define WPA_PUT_BE64(a, val) \
|
#define WPA_PUT_BE64(a, val) \
|
||||||
do { \
|
do { \
|
||||||
(a)[0] = (u8) (((u64) (val)) >> 56); \
|
(a)[0] = (u8)(((u64)(val)) >> 56); \
|
||||||
(a)[1] = (u8) (((u64) (val)) >> 48); \
|
(a)[1] = (u8)(((u64)(val)) >> 48); \
|
||||||
(a)[2] = (u8) (((u64) (val)) >> 40); \
|
(a)[2] = (u8)(((u64)(val)) >> 40); \
|
||||||
(a)[3] = (u8) (((u64) (val)) >> 32); \
|
(a)[3] = (u8)(((u64)(val)) >> 32); \
|
||||||
(a)[4] = (u8) (((u64) (val)) >> 24); \
|
(a)[4] = (u8)(((u64)(val)) >> 24); \
|
||||||
(a)[5] = (u8) (((u64) (val)) >> 16); \
|
(a)[5] = (u8)(((u64)(val)) >> 16); \
|
||||||
(a)[6] = (u8) (((u64) (val)) >> 8); \
|
(a)[6] = (u8)(((u64)(val)) >> 8); \
|
||||||
(a)[7] = (u8) (((u64) (val)) & 0xff); \
|
(a)[7] = (u8)(((u64)(val)) & 0xff); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* ===== start - public domain SHA256 implementation ===== */
|
/* ===== start - public domain SHA256 implementation ===== */
|
||||||
|
@ -352,11 +350,10 @@ static const unsigned long K[64] = {
|
||||||
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Various logical functions */
|
/* Various logical functions */
|
||||||
#define RORc(x, y) \
|
#define RORc(x, y) \
|
||||||
( ((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
||||||
((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
|
((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
|
||||||
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
|
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
|
||||||
#define Maj(x,y,z) (((x | y) & z) | (x & y))
|
#define Maj(x,y,z) (((x | y) & z) | (x & y))
|
||||||
#define S(x, n) RORc((x), (n))
|
#define S(x, n) RORc((x), (n))
|
||||||
|
@ -369,26 +366,18 @@ static const unsigned long K[64] = {
|
||||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void rtw_secmicsetkey(struct mic_data *pmicdata, u8 * key );
|
void rtw_secmicsetkey(struct mic_data *pmicdata, u8 *key);
|
||||||
void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b );
|
void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b);
|
||||||
void rtw_secmicappend(struct mic_data *pmicdata, u8 * src, u32 nBytes );
|
void rtw_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nBytes);
|
||||||
void rtw_secgetmic(struct mic_data *pmicdata, u8 * dst );
|
void rtw_secgetmic(struct mic_data *pmicdata, u8 *dst);
|
||||||
|
void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len,
|
||||||
void rtw_seccalctkipmic(
|
u8 *Miccode, u8 priority);
|
||||||
u8 * key,
|
|
||||||
u8 *header,
|
|
||||||
u8 *data,
|
|
||||||
u32 data_len,
|
|
||||||
u8 *Miccode,
|
|
||||||
u8 priority);
|
|
||||||
|
|
||||||
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
||||||
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
||||||
void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
||||||
|
|
||||||
u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe);
|
u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||||
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe);
|
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||||
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe);
|
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||||
void rtw_use_tkipkey_handler(void* FunctionContext);
|
void rtw_use_tkipkey_handler(void *FunctionContext);
|
||||||
|
|
||||||
#endif /* __RTL871X_SECURITY_H_ */
|
#endif /* __RTL871X_SECURITY_H_ */
|
||||||
|
|
|
@ -24,20 +24,20 @@
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
#define MAX_XMITBUF_SZ (20480) /* 20k */
|
#define MAX_XMITBUF_SZ (20480) /* 20k */
|
||||||
#define NR_XMITBUFF (4)
|
#define NR_XMITBUFF (4)
|
||||||
|
|
||||||
#define XMITBUF_ALIGN_SZ 4
|
#define XMITBUF_ALIGN_SZ 4
|
||||||
|
|
||||||
/* xmit extension buff defination */
|
/* xmit extension buff defination */
|
||||||
#define MAX_XMIT_EXTBUF_SZ (1536)
|
#define MAX_XMIT_EXTBUF_SZ (1536)
|
||||||
#define NR_XMIT_EXTBUFF (32)
|
#define NR_XMIT_EXTBUFF (32)
|
||||||
|
|
||||||
#define MAX_NUMBLKS (1)
|
#define MAX_NUMBLKS (1)
|
||||||
|
|
||||||
#define XMIT_VO_QUEUE (0)
|
#define XMIT_VO_QUEUE (0)
|
||||||
#define XMIT_VI_QUEUE (1)
|
#define XMIT_VI_QUEUE (1)
|
||||||
#define XMIT_BE_QUEUE (2)
|
#define XMIT_BE_QUEUE (2)
|
||||||
#define XMIT_BK_QUEUE (3)
|
#define XMIT_BK_QUEUE (3)
|
||||||
|
|
||||||
#define VO_QUEUE_INX 0
|
#define VO_QUEUE_INX 0
|
||||||
#define VI_QUEUE_INX 1
|
#define VI_QUEUE_INX 1
|
||||||
|
@ -46,22 +46,22 @@
|
||||||
#define BCN_QUEUE_INX 4
|
#define BCN_QUEUE_INX 4
|
||||||
#define MGT_QUEUE_INX 5
|
#define MGT_QUEUE_INX 5
|
||||||
#define HIGH_QUEUE_INX 6
|
#define HIGH_QUEUE_INX 6
|
||||||
#define TXCMD_QUEUE_INX 7
|
#define TXCMD_QUEUE_INX 7
|
||||||
|
|
||||||
#define HW_QUEUE_ENTRY 8
|
#define HW_QUEUE_ENTRY 8
|
||||||
|
|
||||||
#define WEP_IV(pattrib_iv, dot11txpn, keyidx)\
|
#define WEP_IV(pattrib_iv, dot11txpn, keyidx)\
|
||||||
do{\
|
do {\
|
||||||
pattrib_iv[0] = dot11txpn._byte_.TSC0;\
|
pattrib_iv[0] = dot11txpn._byte_.TSC0;\
|
||||||
pattrib_iv[1] = dot11txpn._byte_.TSC1;\
|
pattrib_iv[1] = dot11txpn._byte_.TSC1;\
|
||||||
pattrib_iv[2] = dot11txpn._byte_.TSC2;\
|
pattrib_iv[2] = dot11txpn._byte_.TSC2;\
|
||||||
pattrib_iv[3] = ((keyidx & 0x3)<<6);\
|
pattrib_iv[3] = ((keyidx & 0x3)<<6);\
|
||||||
dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\
|
dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0i : (dot11txpn.val+1);\
|
||||||
}while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\
|
#define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\
|
||||||
do{\
|
do {\
|
||||||
pattrib_iv[0] = dot11txpn._byte_.TSC1;\
|
pattrib_iv[0] = dot11txpn._byte_.TSC1;\
|
||||||
pattrib_iv[1] = (dot11txpn._byte_.TSC1 | 0x20) & 0x7f;\
|
pattrib_iv[1] = (dot11txpn._byte_.TSC1 | 0x20) & 0x7f;\
|
||||||
pattrib_iv[2] = dot11txpn._byte_.TSC0;\
|
pattrib_iv[2] = dot11txpn._byte_.TSC0;\
|
||||||
|
@ -70,8 +70,8 @@ do{\
|
||||||
pattrib_iv[5] = dot11txpn._byte_.TSC3;\
|
pattrib_iv[5] = dot11txpn._byte_.TSC3;\
|
||||||
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
|
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
|
||||||
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
|
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
|
||||||
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
|
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0 : (dot11txpn.val+1);\
|
||||||
}while (0)
|
} while (0)
|
||||||
|
|
||||||
#define AES_IV(pattrib_iv, dot11txpn, keyidx)\
|
#define AES_IV(pattrib_iv, dot11txpn, keyidx)\
|
||||||
do { \
|
do { \
|
||||||
|
@ -83,7 +83,7 @@ do { \
|
||||||
pattrib_iv[5] = dot11txpn._byte_.TSC3; \
|
pattrib_iv[5] = dot11txpn._byte_.TSC3; \
|
||||||
pattrib_iv[6] = dot11txpn._byte_.TSC4; \
|
pattrib_iv[6] = dot11txpn._byte_.TSC4; \
|
||||||
pattrib_iv[7] = dot11txpn._byte_.TSC5; \
|
pattrib_iv[7] = dot11txpn._byte_.TSC5; \
|
||||||
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
|
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0 : (dot11txpn.val+1);\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define HWXMIT_ENTRY 4
|
#define HWXMIT_ENTRY 4
|
||||||
|
@ -93,7 +93,7 @@ do { \
|
||||||
#define PACKET_OFFSET_SZ (8)
|
#define PACKET_OFFSET_SZ (8)
|
||||||
#define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
|
#define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
|
||||||
|
|
||||||
struct tx_desc{
|
struct tx_desc {
|
||||||
/* DWORD 0 */
|
/* DWORD 0 */
|
||||||
__le32 txdw0;
|
__le32 txdw0;
|
||||||
__le32 txdw1;
|
__le32 txdw1;
|
||||||
|
@ -105,7 +105,6 @@ struct tx_desc{
|
||||||
__le32 txdw7;
|
__le32 txdw7;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
union txdesc {
|
union txdesc {
|
||||||
struct tx_desc txdesc;
|
struct tx_desc txdesc;
|
||||||
unsigned int value[TXDESC_SIZE>>2];
|
unsigned int value[TXDESC_SIZE>>2];
|
||||||
|
@ -117,8 +116,7 @@ struct hw_xmit {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* reduce size */
|
/* reduce size */
|
||||||
struct pkt_attrib
|
struct pkt_attrib {
|
||||||
{
|
|
||||||
u8 type;
|
u8 type;
|
||||||
u8 subtype;
|
u8 subtype;
|
||||||
u8 bswenc;
|
u8 bswenc;
|
||||||
|
@ -127,10 +125,12 @@ struct pkt_attrib
|
||||||
u16 seqnum;
|
u16 seqnum;
|
||||||
u16 pkt_hdrlen; /* the original 802.3 pkt header len */
|
u16 pkt_hdrlen; /* the original 802.3 pkt header len */
|
||||||
u16 hdrlen; /* the WLAN Header Len */
|
u16 hdrlen; /* the WLAN Header Len */
|
||||||
u32 pktlen; /* the original 802.3 pkt raw_data len (not include ether_hdr data) */
|
u32 pktlen; /* the original 802.3 pkt raw_data len (not include
|
||||||
|
* ether_hdr data) */
|
||||||
u32 last_txcmdsz;
|
u32 last_txcmdsz;
|
||||||
u8 nr_frags;
|
u8 nr_frags;
|
||||||
u8 encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
|
u8 encrypt; /* when 0 indicate no encrypt. when non-zero,
|
||||||
|
* indicate the encrypt algorith */
|
||||||
u8 iv_len;
|
u8 iv_len;
|
||||||
u8 icv_len;
|
u8 icv_len;
|
||||||
u8 iv[18];
|
u8 iv[18];
|
||||||
|
@ -159,7 +159,7 @@ struct pkt_attrib
|
||||||
u8 rate;
|
u8 rate;
|
||||||
u8 intel_proxim;
|
u8 intel_proxim;
|
||||||
u8 retry_ctrl;
|
u8 retry_ctrl;
|
||||||
struct sta_info * psta;
|
struct sta_info *psta;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WLANHDR_OFFSET 64
|
#define WLANHDR_OFFSET 64
|
||||||
|
@ -177,7 +177,7 @@ struct pkt_attrib
|
||||||
|
|
||||||
#define TXAGG_FRAMETAG 0x08
|
#define TXAGG_FRAMETAG 0x08
|
||||||
|
|
||||||
struct submit_ctx{
|
struct submit_ctx {
|
||||||
u32 submit_time; /* */
|
u32 submit_time; /* */
|
||||||
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
||||||
int status; /* status for operation */
|
int status; /* status for operation */
|
||||||
|
@ -199,20 +199,17 @@ enum {
|
||||||
RTW_SCTX_DONE_DEV_REMOVE,
|
RTW_SCTX_DONE_DEV_REMOVE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
|
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
|
||||||
int rtw_sctx_wait(struct submit_ctx *sctx);
|
int rtw_sctx_wait(struct submit_ctx *sctx);
|
||||||
void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
|
void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
|
||||||
void rtw_sctx_done(struct submit_ctx **sctx);
|
void rtw_sctx_done(struct submit_ctx **sctx);
|
||||||
|
|
||||||
struct xmit_buf
|
struct xmit_buf {
|
||||||
{
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
u8 *pallocated_buf;
|
u8 *pallocated_buf;
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
void *priv_data;
|
void *priv_data;
|
||||||
|
|
||||||
u16 ext_tag; /* 0: Normal xmitbuf, 1: extension xmitbuf. */
|
u16 ext_tag; /* 0: Normal xmitbuf, 1: extension xmitbuf. */
|
||||||
u16 flags;
|
u16 flags;
|
||||||
u32 alloc_sz;
|
u32 alloc_sz;
|
||||||
|
@ -225,8 +222,7 @@ struct xmit_buf
|
||||||
int last[8];
|
int last[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct xmit_frame
|
struct xmit_frame {
|
||||||
{
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct pkt_attrib attrib;
|
struct pkt_attrib attrib;
|
||||||
struct sk_buff *pkt;
|
struct sk_buff *pkt;
|
||||||
|
@ -246,27 +242,21 @@ struct tx_servq {
|
||||||
int qcnt;
|
int qcnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct sta_xmit_priv {
|
||||||
struct sta_xmit_priv
|
|
||||||
{
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
int option;
|
int option;
|
||||||
int apsd_setting; /* When bit mask is on, the associated edca queue supports APSD. */
|
int apsd_setting; /* When bit mask is on, the associated edca
|
||||||
|
* queue supports APSD. */
|
||||||
|
|
||||||
/* struct tx_servq blk_q[MAX_NUMBLKS]; */
|
|
||||||
struct tx_servq be_q; /* priority == 0,3 */
|
struct tx_servq be_q; /* priority == 0,3 */
|
||||||
struct tx_servq bk_q; /* priority == 1,2 */
|
struct tx_servq bk_q; /* priority == 1,2 */
|
||||||
struct tx_servq vi_q; /* priority == 4,5 */
|
struct tx_servq vi_q; /* priority == 4,5 */
|
||||||
struct tx_servq vo_q; /* priority == 6,7 */
|
struct tx_servq vo_q; /* priority == 6,7 */
|
||||||
struct list_head legacy_dz;
|
struct list_head legacy_dz;
|
||||||
struct list_head apsd;
|
struct list_head apsd;
|
||||||
|
|
||||||
u16 txseq_tid[16];
|
u16 txseq_tid[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct hw_txqueue {
|
||||||
struct hw_txqueue {
|
|
||||||
volatile int head;
|
volatile int head;
|
||||||
volatile int tail;
|
volatile int tail;
|
||||||
volatile int free_sz; /* in units of 64 bytes */
|
volatile int free_sz; /* in units of 64 bytes */
|
||||||
|
@ -277,48 +267,39 @@ struct hw_txqueue {
|
||||||
int ac_tag;
|
int ac_tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct agg_pkt_info{
|
struct agg_pkt_info {
|
||||||
u16 offset;
|
u16 offset;
|
||||||
u16 pkt_len;
|
u16 pkt_len;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct xmit_priv {
|
struct xmit_priv {
|
||||||
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
struct semaphore xmit_sema;
|
struct semaphore xmit_sema;
|
||||||
struct semaphore terminate_xmitthread_sema;
|
struct semaphore terminate_xmitthread_sema;
|
||||||
|
|
||||||
struct __queue be_pending;
|
struct __queue be_pending;
|
||||||
struct __queue bk_pending;
|
struct __queue bk_pending;
|
||||||
struct __queue vi_pending;
|
struct __queue vi_pending;
|
||||||
struct __queue vo_pending;
|
struct __queue vo_pending;
|
||||||
struct __queue bm_pending;
|
struct __queue bm_pending;
|
||||||
|
|
||||||
u8 *pallocated_frame_buf;
|
u8 *pallocated_frame_buf;
|
||||||
u8 *pxmit_frame_buf;
|
u8 *pxmit_frame_buf;
|
||||||
uint free_xmitframe_cnt;
|
uint free_xmitframe_cnt;
|
||||||
|
|
||||||
struct __queue free_xmit_queue;
|
struct __queue free_xmit_queue;
|
||||||
|
|
||||||
uint frag_len;
|
uint frag_len;
|
||||||
|
|
||||||
struct adapter *adapter;
|
struct adapter *adapter;
|
||||||
|
|
||||||
u8 vcs_setting;
|
u8 vcs_setting;
|
||||||
u8 vcs;
|
u8 vcs;
|
||||||
u8 vcs_type;
|
u8 vcs_type;
|
||||||
|
|
||||||
u64 tx_bytes;
|
u64 tx_bytes;
|
||||||
u64 tx_pkts;
|
u64 tx_pkts;
|
||||||
u64 tx_drop;
|
u64 tx_drop;
|
||||||
u64 last_tx_bytes;
|
u64 last_tx_bytes;
|
||||||
u64 last_tx_pkts;
|
u64 last_tx_pkts;
|
||||||
|
|
||||||
struct hw_xmit *hwxmits;
|
struct hw_xmit *hwxmits;
|
||||||
u8 hwxmit_entry;
|
u8 hwxmit_entry;
|
||||||
|
u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength
|
||||||
u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk. */
|
* from large to small. it's value is 0->vo,
|
||||||
|
* 1->vi, 2->be, 3->bk. */
|
||||||
struct semaphore tx_retevt;/* all tx return event; */
|
struct semaphore tx_retevt;/* all tx return event; */
|
||||||
u8 txirp_cnt;/* */
|
u8 txirp_cnt;/* */
|
||||||
struct tasklet_struct xmit_tasklet;
|
struct tasklet_struct xmit_tasklet;
|
||||||
|
@ -332,57 +313,57 @@ struct xmit_priv {
|
||||||
u8 *pallocated_xmitbuf;
|
u8 *pallocated_xmitbuf;
|
||||||
u8 *pxmitbuf;
|
u8 *pxmitbuf;
|
||||||
uint free_xmitbuf_cnt;
|
uint free_xmitbuf_cnt;
|
||||||
|
|
||||||
struct __queue free_xmit_extbuf_queue;
|
struct __queue free_xmit_extbuf_queue;
|
||||||
u8 *pallocated_xmit_extbuf;
|
u8 *pallocated_xmit_extbuf;
|
||||||
u8 *pxmit_extbuf;
|
u8 *pxmit_extbuf;
|
||||||
uint free_xmit_extbuf_cnt;
|
uint free_xmit_extbuf_cnt;
|
||||||
|
|
||||||
u16 nqos_ssn;
|
u16 nqos_ssn;
|
||||||
int ack_tx;
|
int ack_tx;
|
||||||
struct mutex ack_tx_mutex;
|
struct mutex ack_tx_mutex;
|
||||||
struct submit_ctx ack_tx_ops;
|
struct submit_ctx ack_tx_ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
||||||
extern s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv,
|
||||||
|
struct xmit_buf *pxmitbuf);
|
||||||
|
struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv);
|
||||||
|
s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv,
|
||||||
|
struct xmit_buf *pxmitbuf);
|
||||||
|
void rtw_count_tx_stats(struct adapter *padapter,
|
||||||
|
struct xmit_frame *pxmitframe, int sz);
|
||||||
|
void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len);
|
||||||
|
s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,
|
||||||
|
struct pkt_attrib *pattrib);
|
||||||
|
s32 rtw_put_snap(u8 *data, u16 h_proto);
|
||||||
|
|
||||||
extern struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv);
|
struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
||||||
extern s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv,
|
||||||
|
struct xmit_frame *pxmitframe);
|
||||||
|
void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv,
|
||||||
|
struct __queue *pframequeue);
|
||||||
|
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter,
|
||||||
|
struct sta_info *psta, int up, u8 *ac);
|
||||||
|
s32 rtw_xmitframe_enqueue(struct adapter *padapter,
|
||||||
|
struct xmit_frame *pxmitframe);
|
||||||
|
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv,
|
||||||
|
struct hw_xmit *phwxmit_i, int entry);
|
||||||
|
|
||||||
void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz);
|
s32 rtw_xmit_classifier(struct adapter *padapter,
|
||||||
extern void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len);
|
struct xmit_frame *pxmitframe);
|
||||||
extern s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib);
|
u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
||||||
extern s32 rtw_put_snap(u8 *data, u16 h_proto);
|
|
||||||
|
|
||||||
extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
|
||||||
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
|
||||||
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue);
|
|
||||||
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, int up, u8 *ac);
|
|
||||||
extern s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
|
||||||
extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, int entry);
|
|
||||||
|
|
||||||
extern s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
|
||||||
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
|
||||||
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
||||||
extern s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
|
s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt,
|
||||||
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
|
struct xmit_frame *pxmitframe);
|
||||||
|
s32 _rtw_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);
|
||||||
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
||||||
|
|
||||||
|
|
||||||
s32 rtw_txframes_pending(struct adapter *padapter);
|
s32 rtw_txframes_pending(struct adapter *padapter);
|
||||||
s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pattrib);
|
s32 rtw_txframes_sta_ac_pending(struct adapter *padapter,
|
||||||
|
struct pkt_attrib *pattrib);
|
||||||
void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry);
|
void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry);
|
||||||
|
|
||||||
|
|
||||||
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
|
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
|
||||||
void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv);
|
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv);
|
||||||
|
|
||||||
|
|
||||||
void rtw_alloc_hwxmits(struct adapter *padapter);
|
void rtw_alloc_hwxmits(struct adapter *padapter);
|
||||||
void rtw_free_hwxmits(struct adapter *padapter);
|
void rtw_free_hwxmits(struct adapter *padapter);
|
||||||
|
|
||||||
|
|
||||||
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
|
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
|
||||||
|
|
||||||
#if defined(CONFIG_AP_MODE)
|
#if defined(CONFIG_AP_MODE)
|
||||||
|
@ -393,13 +374,10 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u8 qos_acm(u8 acm_mask, u8 priority);
|
u8 qos_acm(u8 acm_mask, u8 priority);
|
||||||
|
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
||||||
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
|
||||||
|
|
||||||
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
||||||
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
||||||
|
|
||||||
|
|
||||||
/* include after declaring struct xmit_buf, in order to avoid warning */
|
/* include after declaring struct xmit_buf, in order to avoid warning */
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,12 @@
|
||||||
#define NUM_STA 32
|
#define NUM_STA 32
|
||||||
#define NUM_ACL 16
|
#define NUM_ACL 16
|
||||||
|
|
||||||
|
|
||||||
/* if mode ==0, then the sta is allowed once the addr is hit. */
|
/* if mode ==0, then the sta is allowed once the addr is hit. */
|
||||||
/* if mode ==1, then the sta is rejected once the addr is non-hit. */
|
/* if mode ==1, then the sta is rejected once the addr is non-hit. */
|
||||||
struct rtw_wlan_acl_node {
|
struct rtw_wlan_acl_node {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
u8 addr[ETH_ALEN];
|
u8 addr[ETH_ALEN];
|
||||||
u8 valid;
|
u8 valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* mode=0, disable */
|
/* mode=0, disable */
|
||||||
|
@ -56,36 +55,31 @@ struct rssi_sta {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stainfo_stats {
|
struct stainfo_stats {
|
||||||
|
|
||||||
u64 rx_mgnt_pkts;
|
u64 rx_mgnt_pkts;
|
||||||
u64 rx_beacon_pkts;
|
u64 rx_beacon_pkts;
|
||||||
u64 rx_probereq_pkts;
|
u64 rx_probereq_pkts;
|
||||||
u64 rx_probersp_pkts;
|
u64 rx_probersp_pkts;
|
||||||
u64 rx_probersp_bm_pkts;
|
u64 rx_probersp_bm_pkts;
|
||||||
u64 rx_probersp_uo_pkts;
|
u64 rx_probersp_uo_pkts;
|
||||||
u64 rx_ctrl_pkts;
|
u64 rx_ctrl_pkts;
|
||||||
u64 rx_data_pkts;
|
u64 rx_data_pkts;
|
||||||
|
|
||||||
u64 last_rx_mgnt_pkts;
|
u64 last_rx_mgnt_pkts;
|
||||||
u64 last_rx_beacon_pkts;
|
u64 last_rx_beacon_pkts;
|
||||||
u64 last_rx_probereq_pkts;
|
u64 last_rx_probereq_pkts;
|
||||||
u64 last_rx_probersp_pkts;
|
u64 last_rx_probersp_pkts;
|
||||||
u64 last_rx_probersp_bm_pkts;
|
u64 last_rx_probersp_bm_pkts;
|
||||||
u64 last_rx_probersp_uo_pkts;
|
u64 last_rx_probersp_uo_pkts;
|
||||||
u64 last_rx_ctrl_pkts;
|
u64 last_rx_ctrl_pkts;
|
||||||
u64 last_rx_data_pkts;
|
u64 last_rx_data_pkts;
|
||||||
|
|
||||||
u64 rx_bytes;
|
u64 rx_bytes;
|
||||||
u64 rx_drops;
|
u64 rx_drops;
|
||||||
|
|
||||||
u64 tx_pkts;
|
u64 tx_pkts;
|
||||||
u64 tx_bytes;
|
u64 tx_bytes;
|
||||||
u64 tx_drops;
|
u64 tx_drops;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sta_info {
|
struct sta_info {
|
||||||
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
struct list_head list; /* free_sta_queue */
|
struct list_head list; /* free_sta_queue */
|
||||||
struct list_head hash_list; /* sta_hash */
|
struct list_head hash_list; /* sta_hash */
|
||||||
|
@ -109,8 +103,6 @@ struct sta_info {
|
||||||
union Keytype dot118021x_UncstKey;
|
union Keytype dot118021x_UncstKey;
|
||||||
union pn48 dot11txpn; /* PN48 used for Unicast xmit. */
|
union pn48 dot11txpn; /* PN48 used for Unicast xmit. */
|
||||||
union pn48 dot11rxpn; /* PN48 used for Unicast recv. */
|
union pn48 dot11rxpn; /* PN48 used for Unicast recv. */
|
||||||
|
|
||||||
|
|
||||||
u8 bssrateset[16];
|
u8 bssrateset[16];
|
||||||
u32 bssratelen;
|
u32 bssratelen;
|
||||||
s32 rssi;
|
s32 rssi;
|
||||||
|
@ -135,12 +127,12 @@ struct sta_info {
|
||||||
/* unsigned char ampdu_txen_bitmap; */
|
/* unsigned char ampdu_txen_bitmap; */
|
||||||
u16 BA_starting_seqctrl[16];
|
u16 BA_starting_seqctrl[16];
|
||||||
|
|
||||||
|
|
||||||
struct ht_priv htpriv;
|
struct ht_priv htpriv;
|
||||||
|
|
||||||
/* Notes: */
|
/* Notes: */
|
||||||
/* STA_Mode: */
|
/* STA_Mode: */
|
||||||
/* curr_network(mlme_priv/security_priv/qos/ht) + sta_info: (STA & AP) CAP/INFO */
|
/* curr_network(mlme_priv/security_priv/qos/ht) +
|
||||||
|
* sta_info: (STA & AP) CAP/INFO */
|
||||||
/* scan_q: AP CAP/INFO */
|
/* scan_q: AP CAP/INFO */
|
||||||
|
|
||||||
/* AP_Mode: */
|
/* AP_Mode: */
|
||||||
|
@ -207,26 +199,21 @@ struct sta_info {
|
||||||
u16 dev_name_len;
|
u16 dev_name_len;
|
||||||
u8 dev_name[32];
|
u8 dev_name[32];
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
u8 under_exist_checking;
|
u8 under_exist_checking;
|
||||||
u8 keep_alive_trycnt;
|
u8 keep_alive_trycnt;
|
||||||
|
|
||||||
#endif /* CONFIG_AP_MODE */
|
#endif /* CONFIG_AP_MODE */
|
||||||
|
|
||||||
/* for DM */
|
/* for DM */
|
||||||
struct rssi_sta rssi_stat;
|
struct rssi_sta rssi_stat;
|
||||||
|
|
||||||
/* */
|
|
||||||
/* ================ODM Relative Info======================= */
|
/* ================ODM Relative Info======================= */
|
||||||
/* Please be care, dont declare too much structure here. It will cost memory * STA support num. */
|
/* Please be careful, don't declare too much structure here.
|
||||||
/* */
|
* It will cost memory * STA support num. */
|
||||||
/* */
|
|
||||||
/* 2011/10/20 MH Add for ODM STA info. */
|
/* 2011/10/20 MH Add for ODM STA info. */
|
||||||
/* */
|
|
||||||
/* Driver Write */
|
/* Driver Write */
|
||||||
u8 bValid; /* record the sta status link or not? */
|
u8 bValid; /* record the sta status link or not? */
|
||||||
u8 IOTPeer; /* Enum value. HT_IOT_PEER_E */
|
u8 IOTPeer; /* Enum value. HT_IOT_PEER_E */
|
||||||
u8 rssi_level; /* for Refresh RA mask */
|
u8 rssi_level; /* for Refresh RA mask */
|
||||||
/* ODM Write */
|
/* ODM Write */
|
||||||
/* 1 PHY_STATUS_INFO */
|
/* 1 PHY_STATUS_INFO */
|
||||||
u8 RSSI_Path[4]; /* */
|
u8 RSSI_Path[4]; /* */
|
||||||
|
@ -294,16 +281,16 @@ struct sta_info {
|
||||||
(sta->sta_stats.last_rx_probersp_uo_pkts)
|
(sta->sta_stats.last_rx_probersp_uo_pkts)
|
||||||
|
|
||||||
#define sta_update_last_rx_pkts(sta) \
|
#define sta_update_last_rx_pkts(sta) \
|
||||||
do { \
|
do { \
|
||||||
sta->sta_stats.last_rx_mgnt_pkts = sta->sta_stats.rx_mgnt_pkts; \
|
sta->sta_stats.last_rx_mgnt_pkts = sta->sta_stats.rx_mgnt_pkts; \
|
||||||
sta->sta_stats.last_rx_beacon_pkts = sta->sta_stats.rx_beacon_pkts; \
|
sta->sta_stats.last_rx_beacon_pkts = sta->sta_stats.rx_beacon_pkts; \
|
||||||
sta->sta_stats.last_rx_probereq_pkts = sta->sta_stats.rx_probereq_pkts; \
|
sta->sta_stats.last_rx_probereq_pkts = sta->sta_stats.rx_probereq_pkts; \
|
||||||
sta->sta_stats.last_rx_probersp_pkts = sta->sta_stats.rx_probersp_pkts; \
|
sta->sta_stats.last_rx_probersp_pkts = sta->sta_stats.rx_probersp_pkts; \
|
||||||
sta->sta_stats.last_rx_probersp_bm_pkts = sta->sta_stats.rx_probersp_bm_pkts; \
|
sta->sta_stats.last_rx_probersp_bm_pkts = sta->sta_stats.rx_probersp_bm_pkts; \
|
||||||
sta->sta_stats.last_rx_probersp_uo_pkts = sta->sta_stats.rx_probersp_uo_pkts; \
|
sta->sta_stats.last_rx_probersp_uo_pkts = sta->sta_stats.rx_probersp_uo_pkts; \
|
||||||
sta->sta_stats.last_rx_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \
|
sta->sta_stats.last_rx_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \
|
||||||
sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \
|
sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define STA_RX_PKTS_ARG(sta) \
|
#define STA_RX_PKTS_ARG(sta) \
|
||||||
sta->sta_stats.rx_mgnt_pkts \
|
sta->sta_stats.rx_mgnt_pkts \
|
||||||
|
@ -318,12 +305,11 @@ struct sta_info {
|
||||||
#define STA_RX_PKTS_DIFF_ARG(sta) \
|
#define STA_RX_PKTS_DIFF_ARG(sta) \
|
||||||
sta->sta_stats.rx_mgnt_pkts - sta->sta_stats.last_rx_mgnt_pkts \
|
sta->sta_stats.rx_mgnt_pkts - sta->sta_stats.last_rx_mgnt_pkts \
|
||||||
, sta->sta_stats.rx_ctrl_pkts - sta->sta_stats.last_rx_ctrl_pkts \
|
, sta->sta_stats.rx_ctrl_pkts - sta->sta_stats.last_rx_ctrl_pkts \
|
||||||
, sta->sta_stats.rx_data_pkts -sta->sta_stats.last_rx_data_pkts
|
, sta->sta_stats.rx_data_pkts - sta->sta_stats.last_rx_data_pkts
|
||||||
|
|
||||||
#define STA_PKTS_FMT "(m:%llu, c:%llu, d:%llu)"
|
#define STA_PKTS_FMT "(m:%llu, c:%llu, d:%llu)"
|
||||||
|
|
||||||
struct sta_priv {
|
struct sta_priv {
|
||||||
|
|
||||||
u8 *pallocated_stainfo_buf;
|
u8 *pallocated_stainfo_buf;
|
||||||
u8 *pstainfo_buf;
|
u8 *pstainfo_buf;
|
||||||
struct __queue free_sta_queue;
|
struct __queue free_sta_queue;
|
||||||
|
@ -355,8 +341,10 @@ struct sta_priv {
|
||||||
*/
|
*/
|
||||||
struct sta_info *sta_aid[NUM_STA];
|
struct sta_info *sta_aid[NUM_STA];
|
||||||
|
|
||||||
u16 sta_dz_bitmap;/* only support 15 stations, staion aid bitmap for sleeping sta. */
|
u16 sta_dz_bitmap;/* only support 15 stations, staion aid bitmap
|
||||||
u16 tim_bitmap;/* only support 15 stations, aid=0~15 mapping bit0~bit15 */
|
* for sleeping sta. */
|
||||||
|
u16 tim_bitmap; /* only support 15 stations, aid=0~15 mapping
|
||||||
|
* bit0~bit15 */
|
||||||
|
|
||||||
u16 max_num_sta;
|
u16 max_num_sta;
|
||||||
|
|
||||||
|
@ -365,22 +353,20 @@ struct sta_priv {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline u32 wifi_mac_hash(u8 *mac)
|
||||||
__inline static u32 wifi_mac_hash(u8 *mac)
|
|
||||||
{
|
{
|
||||||
u32 x;
|
u32 x;
|
||||||
|
|
||||||
x = mac[0];
|
x = mac[0];
|
||||||
x = (x << 2) ^ mac[1];
|
x = (x << 2) ^ mac[1];
|
||||||
x = (x << 2) ^ mac[2];
|
x = (x << 2) ^ mac[2];
|
||||||
x = (x << 2) ^ mac[3];
|
x = (x << 2) ^ mac[3];
|
||||||
x = (x << 2) ^ mac[4];
|
x = (x << 2) ^ mac[4];
|
||||||
x = (x << 2) ^ mac[5];
|
x = (x << 2) ^ mac[5];
|
||||||
|
|
||||||
x ^= x >> 8;
|
x ^= x >> 8;
|
||||||
x = x & (NUM_STA - 1);
|
x = x & (NUM_STA - 1);
|
||||||
|
return x;
|
||||||
return x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern u32 _rtw_init_sta_priv(struct sta_priv *pstapriv);
|
extern u32 _rtw_init_sta_priv(struct sta_priv *pstapriv);
|
||||||
|
@ -388,14 +374,14 @@ extern u32 _rtw_free_sta_priv(struct sta_priv *pstapriv);
|
||||||
|
|
||||||
#define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
|
#define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
|
||||||
int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);
|
int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);
|
||||||
struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int offset);
|
struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int off);
|
||||||
|
|
||||||
extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr);
|
extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||||
extern u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta);
|
extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
|
||||||
extern void rtw_free_all_stainfo(struct adapter *padapter);
|
extern void rtw_free_all_stainfo(struct adapter *adapt);
|
||||||
extern struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr);
|
extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||||
extern u32 rtw_init_bcmc_stainfo(struct adapter* padapter);
|
extern u32 rtw_init_bcmc_stainfo(struct adapter* adapt);
|
||||||
extern struct sta_info* rtw_get_bcmc_stainfo(struct adapter* padapter);
|
extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
|
||||||
extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
|
extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
|
||||||
|
|
||||||
#endif /* _STA_INFO_H_ */
|
#endif /* _STA_INFO_H_ */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef __USB_HAL_H__
|
#ifndef __USB_HAL_H__
|
||||||
#define __USB_HAL_H__
|
#define __USB_HAL_H__
|
||||||
|
|
||||||
void rtl8188eu_set_hal_ops(struct adapter * padapter);
|
void rtl8188eu_set_hal_ops(struct adapter *padapter);
|
||||||
#define hal_set_hal_ops rtl8188eu_set_hal_ops
|
#define hal_set_hal_ops rtl8188eu_set_hal_ops
|
||||||
|
|
||||||
#endif /* __USB_HAL_H__ */
|
#endif /* __USB_HAL_H__ */
|
||||||
|
|
|
@ -33,22 +33,31 @@ enum{
|
||||||
VENDOR_WRITE = 0x00,
|
VENDOR_WRITE = 0x00,
|
||||||
VENDOR_READ = 0x01,
|
VENDOR_READ = 0x01,
|
||||||
};
|
};
|
||||||
#define ALIGNMENT_UNIT 16
|
#define ALIGNMENT_UNIT 16
|
||||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
||||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
value, index, data, size, timeout_ms) \
|
||||||
|
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
|
||||||
|
(index), (data), (size), (timeout_ms))
|
||||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
||||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), (timeout_ms))
|
usb_bulk_msg((usb_dev), (pipe), (data), (len), \
|
||||||
|
(actual_length), (timeout_ms))
|
||||||
#else
|
#else
|
||||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size,timeout_ms) \
|
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), \
|
value, index, data, size,timeout_ms) \
|
||||||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
usb_control_msg((dev), (pipe), (request), (requesttype), \
|
||||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
(value), (index), (data), (size), \
|
||||||
|
((timeout_ms) == 0) || \
|
||||||
|
((timeout_ms)*HZ/1000 > 0) ? \
|
||||||
|
((timeout_ms)*HZ/1000) : 1)
|
||||||
|
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
|
||||||
|
actual_length, timeout_ms) \
|
||||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
||||||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
((timeout_ms) == 0) | |((timeout_ms)*HZ/1000 > 0) ?\
|
||||||
|
((timeout_ms)*HZ/1000) : 1)
|
||||||
#endif
|
#endif
|
||||||
#include <usb_ops_linux.h>
|
#include <usb_ops_linux.h>
|
||||||
|
|
||||||
|
@ -58,19 +67,20 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops);
|
||||||
#define usb_set_intf_ops rtl8188eu_set_intf_ops
|
#define usb_set_intf_ops rtl8188eu_set_intf_ops
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR
|
* Increase and check if the continual_urb_error of this @param dvobjprivei
|
||||||
* @return true:
|
* is larger than MAX_CONTINUAL_URB_ERR
|
||||||
* @return false:
|
* @return true:
|
||||||
*/
|
* @return false:
|
||||||
|
*/
|
||||||
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
||||||
{
|
{
|
||||||
int ret = false;
|
int ret = false;
|
||||||
int value;
|
int value;
|
||||||
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
|
value = ATOMIC_INC_RETURN(&dvobj->continual_urb_error);
|
||||||
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
|
if (value > MAX_CONTINUAL_URB_ERR) {
|
||||||
|
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n",
|
||||||
|
dvobj, value, MAX_CONTINUAL_URB_ERR);
|
||||||
ret = true;
|
ret = true;
|
||||||
} else {
|
|
||||||
/* DBG_88E("[dvobj:%p] continual_urb_error:%d\n", dvobj, value); */
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -86,17 +96,19 @@ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
|
||||||
#define USB_HIGH_SPEED_BULK_SIZE 512
|
#define USB_HIGH_SPEED_BULK_SIZE 512
|
||||||
#define USB_FULL_SPEED_BULK_SIZE 64
|
#define USB_FULL_SPEED_BULK_SIZE 64
|
||||||
|
|
||||||
static inline u8 rtw_usb_bulk_size_boundary(struct adapter * padapter,int buf_len)
|
static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
|
||||||
|
int buf_len)
|
||||||
{
|
{
|
||||||
u8 rst = true;
|
u8 rst = true;
|
||||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||||
|
|
||||||
if (pdvobjpriv->ishighspeed == true)
|
if (pdvobjpriv->ishighspeed)
|
||||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE)?true:false;
|
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
|
||||||
|
true : false;
|
||||||
else
|
else
|
||||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE)?true:false;
|
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
|
||||||
|
true : false;
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* __USB_OPS_H_ */
|
#endif /* __USB_OPS_H_ */
|
||||||
|
|
|
@ -29,13 +29,20 @@
|
||||||
|
|
||||||
#define RTW_USB_BULKOUT_TIME 5000/* ms */
|
#define RTW_USB_BULKOUT_TIME 5000/* ms */
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)) || \
|
||||||
#define _usbctrl_vendorreq_async_callback(urb, regs) _usbctrl_vendorreq_async_callback(urb)
|
(LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18))
|
||||||
#define usb_bulkout_zero_complete(purb, regs) usb_bulkout_zero_complete(purb)
|
#define _usbctrl_vendorreq_async_callback(urb, regs) \
|
||||||
#define usb_write_mem_complete(purb, regs) usb_write_mem_complete(purb)
|
_usbctrl_vendorreq_async_callback(urb)
|
||||||
#define usb_write_port_complete(purb, regs) usb_write_port_complete(purb)
|
#define usb_bulkout_zero_complete(purb, regs) \
|
||||||
#define usb_read_port_complete(purb, regs) usb_read_port_complete(purb)
|
usb_bulkout_zero_complete(purb)
|
||||||
#define usb_read_interrupt_complete(purb, regs) usb_read_interrupt_complete(purb)
|
#define usb_write_mem_complete(purb, regs) \
|
||||||
|
usb_write_mem_complete(purb)
|
||||||
|
#define usb_write_port_complete(purb, regs) \
|
||||||
|
usb_write_port_complete(purb)
|
||||||
|
#define usb_read_port_complete(purb, regs) \
|
||||||
|
usb_read_port_complete(purb)
|
||||||
|
#define usb_read_interrupt_complete(purb, regs) \
|
||||||
|
usb_read_interrupt_complete(purb)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
|
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
|
||||||
|
|
|
@ -24,16 +24,19 @@
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <usb_vendor_req.h>
|
#include <usb_vendor_req.h>
|
||||||
|
|
||||||
extern char* rtw_initmac;
|
extern char *rtw_initmac;
|
||||||
extern int rtw_mc2u_disable;
|
extern int rtw_mc2u_disable;
|
||||||
|
|
||||||
#define USBD_HALTED(Status) ((ULONG)(Status) >> 30 == 3)
|
#define USBD_HALTED(Status) ((ULONG)(Status) >> 30 == 3)
|
||||||
|
|
||||||
u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, enum bt_usb_request brequest, enum rt_usb_wvalue wvalue, u8 windex, void* data, u8 datalen, u8 isdirectionin);
|
u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, enum bt_usb_request brequest,
|
||||||
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
enum rt_usb_wvalue wvalue, u8 windex, void *data,
|
||||||
|
u8 datalen, u8 isdirectionin);
|
||||||
|
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
|
||||||
void netdev_br_init(struct net_device *netdev);
|
void netdev_br_init(struct net_device *netdev);
|
||||||
void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb);
|
void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb);
|
||||||
void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr, unsigned char *ipAddr);
|
void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
|
||||||
|
unsigned char *ipAddr);
|
||||||
void nat25_db_expire(struct adapter *priv);
|
void nat25_db_expire(struct adapter *priv);
|
||||||
int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method);
|
int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method);
|
||||||
|
|
||||||
|
|
689
include/wifi.h
689
include/wifi.h
File diff suppressed because it is too large
Load diff
|
@ -21,7 +21,7 @@
|
||||||
#define __WLAN_BSSDEF_H__
|
#define __WLAN_BSSDEF_H__
|
||||||
|
|
||||||
|
|
||||||
#define MAX_IE_SZ 768
|
#define MAX_IE_SZ 768
|
||||||
|
|
||||||
#define NDIS_802_11_LENGTH_SSID 32
|
#define NDIS_802_11_LENGTH_SSID 32
|
||||||
#define NDIS_802_11_LENGTH_RATES 8
|
#define NDIS_802_11_LENGTH_RATES 8
|
||||||
|
@ -39,21 +39,20 @@ enum NDIS_802_11_NETWORK_TYPE {
|
||||||
Ndis802_11DS,
|
Ndis802_11DS,
|
||||||
Ndis802_11OFDM5,
|
Ndis802_11OFDM5,
|
||||||
Ndis802_11OFDM24,
|
Ndis802_11OFDM24,
|
||||||
Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
|
Ndis802_11NetworkTypeMax /* dummy upper bound */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_config_fh {
|
struct ndis_802_11_config_fh {
|
||||||
ULONG Length; /* Length of structure */
|
ULONG Length; /* Length of structure */
|
||||||
ULONG HopPattern; /* As defined by 802.11, MSB set */
|
ULONG HopPattern; /* As defined by 802.11, MSB set */
|
||||||
ULONG HopSet; /* to one if non-802.11 */
|
ULONG HopSet; /* to one if non-802.11 */
|
||||||
ULONG DwellTime; /* units are Kusec */
|
ULONG DwellTime; /* units are Kusec */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FW will only save the channel number in DSConfig.
|
* FW will only save the channel number in DSConfig.
|
||||||
ODI Handler will convert the channel number to freq. number.
|
* ODI Handler will convert the channel number to freq. number.
|
||||||
*/
|
*/
|
||||||
struct ndis_802_11_config {
|
struct ndis_802_11_config {
|
||||||
ULONG Length; /* Length of structure */
|
ULONG Length; /* Length of structure */
|
||||||
ULONG BeaconPeriod; /* units are Kusec */
|
ULONG BeaconPeriod; /* units are Kusec */
|
||||||
|
@ -63,17 +62,17 @@ struct ndis_802_11_config {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ndis_802_11_network_infra {
|
enum ndis_802_11_network_infra {
|
||||||
Ndis802_11IBSS,
|
Ndis802_11IBSS,
|
||||||
Ndis802_11Infrastructure,
|
Ndis802_11Infrastructure,
|
||||||
Ndis802_11AutoUnknown,
|
Ndis802_11AutoUnknown,
|
||||||
Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */
|
Ndis802_11InfrastructureMax, /* dummy upper bound */
|
||||||
Ndis802_11APMode
|
Ndis802_11APMode
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_fixed_ie {
|
struct ndis_802_11_fixed_ie {
|
||||||
UCHAR Timestamp[8];
|
UCHAR Timestamp[8];
|
||||||
USHORT BeaconInterval;
|
USHORT BeaconInterval;
|
||||||
USHORT Capabilities;
|
USHORT Capabilities;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,43 +84,42 @@ struct ndis_802_11_var_ie {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Length is the 4 bytes multiples of the sume of
|
* Length is the 4 bytes multiples of the sume of
|
||||||
[ETH_ALEN] + 2 + sizeof (struct ndis_802_11_ssid) + sizeof (ULONG)
|
* [ETH_ALEN] + 2 + sizeof (struct ndis_802_11_ssid) + sizeof (ULONG)
|
||||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (enum NDIS_802_11_NETWORK_TYPE) + sizeof (struct ndis_802_11_config)
|
* + sizeof (NDIS_802_11_RSSI) + sizeof (enum NDIS_802_11_NETWORK_TYPE)
|
||||||
+ NDIS_802_11_LENGTH_RATES_EX + IELength
|
* + sizeof (struct ndis_802_11_config)
|
||||||
|
* + NDIS_802_11_LENGTH_RATES_EX + IELength
|
||||||
Except the IELength, all other fields are fixed length. Therefore, we can define a macro to represent the
|
*
|
||||||
partial sum.
|
* Except the IELength, all other fields are fixed length.
|
||||||
*/
|
* Therefore, we can define a macro to represent the partial sum. */
|
||||||
|
|
||||||
enum ndis_802_11_auth_mode {
|
enum ndis_802_11_auth_mode {
|
||||||
Ndis802_11AuthModeOpen,
|
Ndis802_11AuthModeOpen,
|
||||||
Ndis802_11AuthModeShared,
|
Ndis802_11AuthModeShared,
|
||||||
Ndis802_11AuthModeAutoSwitch,
|
Ndis802_11AuthModeAutoSwitch,
|
||||||
Ndis802_11AuthModeWPA,
|
Ndis802_11AuthModeWPA,
|
||||||
Ndis802_11AuthModeWPAPSK,
|
Ndis802_11AuthModeWPAPSK,
|
||||||
Ndis802_11AuthModeWPANone,
|
Ndis802_11AuthModeWPANone,
|
||||||
Ndis802_11AuthModeWAPI,
|
Ndis802_11AuthModeWAPI,
|
||||||
Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
|
Ndis802_11AuthModeMax /* Not a real mode, upper bound */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ndis_802_11_wep_status {
|
enum ndis_802_11_wep_status {
|
||||||
Ndis802_11WEPEnabled,
|
Ndis802_11WEPEnabled,
|
||||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||||
Ndis802_11WEPDisabled,
|
Ndis802_11WEPDisabled,
|
||||||
Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
|
Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
|
||||||
Ndis802_11WEPKeyAbsent,
|
Ndis802_11WEPKeyAbsent,
|
||||||
Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
|
Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
|
||||||
Ndis802_11WEPNotSupported,
|
Ndis802_11WEPNotSupported,
|
||||||
Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
|
Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
|
||||||
Ndis802_11Encryption2Enabled,
|
Ndis802_11Encryption2Enabled,
|
||||||
Ndis802_11Encryption2KeyAbsent,
|
Ndis802_11Encryption2KeyAbsent,
|
||||||
Ndis802_11Encryption3Enabled,
|
Ndis802_11Encryption3Enabled,
|
||||||
Ndis802_11Encryption3KeyAbsent,
|
Ndis802_11Encryption3KeyAbsent,
|
||||||
Ndis802_11_EncryptionWAPI
|
Ndis802_11_EncryptionWAPI
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||||
|
@ -143,22 +141,21 @@ struct ndis_802_11_ai_resfi {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_assoc_info {
|
struct ndis_802_11_assoc_info {
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
USHORT AvailableRequestFixedIEs;
|
USHORT AvailableRequestFixedIEs;
|
||||||
struct ndis_802_11_ai_reqfi RequestFixedIEs;
|
struct ndis_802_11_ai_reqfi RequestFixedIEs;
|
||||||
ULONG RequestIELength;
|
ULONG RequestIELength;
|
||||||
ULONG OffsetRequestIEs;
|
ULONG OffsetRequestIEs;
|
||||||
USHORT AvailableResponseFixedIEs;
|
USHORT AvailableResponseFixedIEs;
|
||||||
struct ndis_802_11_ai_resfi ResponseFixedIEs;
|
struct ndis_802_11_ai_resfi ResponseFixedIEs;
|
||||||
ULONG ResponseIELength;
|
ULONG ResponseIELength;
|
||||||
ULONG OffsetResponseIEs;
|
ULONG OffsetResponseIEs;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ndis_802_11_reload_def {
|
enum ndis_802_11_reload_def {
|
||||||
Ndis802_11ReloadWEPKeys
|
Ndis802_11ReloadWEPKeys
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Key mapping keys require a BSSID */
|
/* Key mapping keys require a BSSID */
|
||||||
struct ndis_802_11_key {
|
struct ndis_802_11_key {
|
||||||
ULONG Length; /* Length of this structure */
|
ULONG Length; /* Length of this structure */
|
||||||
|
@ -166,41 +163,43 @@ struct ndis_802_11_key {
|
||||||
ULONG KeyLength; /* length of key in bytes */
|
ULONG KeyLength; /* length of key in bytes */
|
||||||
unsigned char BSSID[ETH_ALEN];
|
unsigned char BSSID[ETH_ALEN];
|
||||||
unsigned long long KeyRSC;
|
unsigned long long KeyRSC;
|
||||||
UCHAR KeyMaterial[32]; /* variable length depending on above field */
|
UCHAR KeyMaterial[32]; /* var len depending on above field */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_remove_key {
|
struct ndis_802_11_remove_key {
|
||||||
ULONG Length; /* Length of this structure */
|
ULONG Length; /* Length */
|
||||||
ULONG KeyIndex;
|
ULONG KeyIndex;
|
||||||
unsigned char BSSID[ETH_ALEN];
|
unsigned char BSSID[ETH_ALEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_wep {
|
struct ndis_802_11_wep {
|
||||||
ULONG Length; /* Length of this structure */
|
ULONG Length; /* Length of this structure */
|
||||||
ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
|
ULONG KeyIndex; /* 0 is the per-client key,
|
||||||
|
* 1-N are the global keys */
|
||||||
ULONG KeyLength; /* length of key in bytes */
|
ULONG KeyLength; /* length of key in bytes */
|
||||||
UCHAR KeyMaterial[16];/* variable length depending on above field */
|
UCHAR KeyMaterial[16];/* variable len depending on above field */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_auth_req {
|
struct ndis_802_11_auth_req {
|
||||||
ULONG Length; /* Length of structure */
|
ULONG Length; /* Length of structure */
|
||||||
unsigned char Bssid[ETH_ALEN];
|
unsigned char Bssid[ETH_ALEN];
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ndis_802_11_status_type {
|
enum ndis_802_11_status_type {
|
||||||
Ndis802_11StatusType_Authentication,
|
Ndis802_11StatusType_Authentication,
|
||||||
Ndis802_11StatusType_MediaStreamMode,
|
Ndis802_11StatusType_MediaStreamMode,
|
||||||
Ndis802_11StatusType_PMKID_CandidateList,
|
Ndis802_11StatusType_PMKID_CandidateList,
|
||||||
Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */
|
Ndis802_11StatusTypeMax /* not a real type, defined as
|
||||||
|
* an upper bound */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_status_ind {
|
struct ndis_802_11_status_ind {
|
||||||
enum ndis_802_11_status_type StatusType;
|
enum ndis_802_11_status_type StatusType;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* mask for authentication/integrity fields */
|
/* mask for authentication/integrity fields */
|
||||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||||
#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
|
#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
|
||||||
#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
|
#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
|
||||||
#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
|
#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
|
||||||
|
@ -210,18 +209,17 @@ struct ndis_802_11_status_ind {
|
||||||
#define MIC_CHECK_TIME 60000000
|
#define MIC_CHECK_TIME 60000000
|
||||||
|
|
||||||
struct ndis_802_11_auth_evt {
|
struct ndis_802_11_auth_evt {
|
||||||
struct ndis_802_11_status_ind Status;
|
struct ndis_802_11_status_ind Status;
|
||||||
struct ndis_802_11_auth_req Request[1];
|
struct ndis_802_11_auth_req Request[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ndis_802_11_test {
|
struct ndis_802_11_test {
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
ULONG Type;
|
ULONG Type;
|
||||||
union
|
union {
|
||||||
{
|
struct ndis_802_11_auth_evt AuthenticationEvent;
|
||||||
struct ndis_802_11_auth_evt AuthenticationEvent;
|
NDIS_802_11_RSSI RssiTrigger;
|
||||||
NDIS_802_11_RSSI RssiTrigger;
|
} tt;
|
||||||
}tt;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,7 +263,8 @@ struct wlan_bssid_ex {
|
||||||
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||||
struct wlan_phy_info PhyInfo;
|
struct wlan_phy_info PhyInfo;
|
||||||
ULONG IELength;
|
ULONG IELength;
|
||||||
UCHAR IEs[MAX_IE_SZ]; /* timestamp, beacon interval, and capability information) */
|
UCHAR IEs[MAX_IE_SZ]; /* timestamp, beacon interval, and
|
||||||
|
* capability information) */
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||||
|
@ -276,23 +275,22 @@ static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||||
struct wlan_network {
|
struct wlan_network {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
int network_type; /* refer to ieee80211.h for WIRELESS_11A/B/G */
|
int network_type; /* refer to ieee80211.h for WIRELESS_11A/B/G */
|
||||||
int fixed; /* set to fixed when not to be removed as site-surveying */
|
int fixed; /* set fixed when not to be removed
|
||||||
|
* in site-surveying */
|
||||||
unsigned long last_scanned; /* timestamp for the network */
|
unsigned long last_scanned; /* timestamp for the network */
|
||||||
int aid; /* will only be valid when a BSS is joinned. */
|
int aid; /* will only be valid when a BSS is joinned. */
|
||||||
int join_res;
|
int join_res;
|
||||||
struct wlan_bssid_ex network; /* must be the last item */
|
struct wlan_bssid_ex network; /* must be the last item */
|
||||||
struct wlan_bcn_info BcnInfo;
|
struct wlan_bcn_info BcnInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum VRTL_CARRIER_SENSE
|
enum VRTL_CARRIER_SENSE {
|
||||||
{
|
|
||||||
DISABLE_VCS,
|
DISABLE_VCS,
|
||||||
ENABLE_VCS,
|
ENABLE_VCS,
|
||||||
AUTO_VCS
|
AUTO_VCS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum VCS_TYPE
|
enum VCS_TYPE {
|
||||||
{
|
|
||||||
NONE_VCS,
|
NONE_VCS,
|
||||||
RTS_CTS,
|
RTS_CTS,
|
||||||
CTS_TO_SELF
|
CTS_TO_SELF
|
||||||
|
@ -304,12 +302,11 @@ enum VCS_TYPE
|
||||||
#define PWR_UAPSD 3
|
#define PWR_UAPSD 3
|
||||||
#define PWR_VOIP 4
|
#define PWR_VOIP 4
|
||||||
|
|
||||||
enum UAPSD_MAX_SP
|
enum UAPSD_MAX_SP {
|
||||||
{
|
|
||||||
NO_LIMIT,
|
NO_LIMIT,
|
||||||
TWO_MSDU,
|
TWO_MSDU,
|
||||||
FOUR_MSDU,
|
FOUR_MSDU,
|
||||||
SIX_MSDU
|
SIX_MSDU
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_PRE_AUTH_KEY 16
|
#define NUM_PRE_AUTH_KEY 16
|
||||||
|
|
|
@ -44,21 +44,24 @@ struct sta_xmit_priv;
|
||||||
struct xmit_frame;
|
struct xmit_frame;
|
||||||
struct xmit_buf;
|
struct xmit_buf;
|
||||||
|
|
||||||
extern int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
|
int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
|
||||||
|
|
||||||
void rtw_os_xmit_schedule(struct adapter *padapter);
|
void rtw_os_xmit_schedule(struct adapter *padapter);
|
||||||
|
|
||||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
int rtw_os_xmit_resource_alloc(struct adapter *padapter,
|
||||||
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
struct xmit_buf *pxmitbuf, u32 alloc_sz);
|
||||||
|
void rtw_os_xmit_resource_free(struct adapter *padapter,
|
||||||
|
struct xmit_buf *pxmitbuf, u32 free_sz);
|
||||||
|
|
||||||
extern void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pattrib);
|
void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pattrib);
|
||||||
|
|
||||||
extern uint rtw_remainder_len(struct pkt_file *pfile);
|
uint rtw_remainder_len(struct pkt_file *pfile);
|
||||||
extern void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||||
extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||||
extern int rtw_endofpktfile (struct pkt_file *pfile);
|
int rtw_endofpktfile(struct pkt_file *pfile);
|
||||||
|
|
||||||
extern void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
|
void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
|
||||||
extern void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
|
void rtw_os_xmit_complete(struct adapter *padapter,
|
||||||
|
struct xmit_frame *pxframe);
|
||||||
|
|
||||||
#endif /* __XMIT_OSDEP_H_ */
|
#endif /* __XMIT_OSDEP_H_ */
|
||||||
|
|
Loading…
Reference in a new issue