mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-24 21:43:40 +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);
|
||||
|
||||
/* 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.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);
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
|
||||
/* 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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -53,12 +53,12 @@ _func_exit_;
|
|||
return status;
|
||||
}
|
||||
/* 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;
|
||||
u16 offset;
|
||||
u32 value;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -92,12 +92,12 @@ _func_exit_;
|
|||
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;
|
||||
u16 offset;
|
||||
u32 value;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -131,13 +131,13 @@ _func_exit_;
|
|||
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;
|
||||
u8 path;
|
||||
u8 offset;
|
||||
u32 value;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -176,14 +176,14 @@ _func_exit_;
|
|||
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;
|
||||
u8 path;
|
||||
u8 offset;
|
||||
u32 value;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -226,10 +226,10 @@ _func_exit_;
|
|||
|
||||
/* 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 */
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -260,10 +260,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -298,9 +298,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -321,10 +321,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -357,11 +357,11 @@ _func_exit_;
|
|||
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 channel_offset;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -396,10 +396,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -431,10 +431,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -469,9 +469,9 @@ _func_exit_;
|
|||
/* */
|
||||
/* 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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -493,9 +493,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -518,9 +518,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -564,9 +564,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -588,9 +588,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -609,9 +609,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -637,9 +637,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -668,10 +668,10 @@ _func_exit_;
|
|||
return status;
|
||||
}
|
||||
/* 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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -703,10 +703,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -738,10 +738,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -773,10 +773,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -797,15 +797,15 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
_func_enter_;
|
||||
|
||||
if (poid_par_priv->type_of_oid != SET_OID)
|
||||
|
@ -821,16 +821,16 @@ _func_exit_;
|
|||
}
|
||||
/* 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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
u32 offset, width;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -875,11 +875,11 @@ _func_exit_;
|
|||
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;
|
||||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -934,73 +934,73 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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);
|
||||
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1021,9 +1021,9 @@ _func_exit_;
|
|||
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;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
|
@ -1049,14 +1049,14 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
/* */
|
||||
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);
|
||||
|
||||
|
||||
|
@ -1084,59 +1084,59 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
/* */
|
||||
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;
|
||||
}
|
||||
/* */
|
||||
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;
|
||||
u8 *data;
|
||||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -1177,12 +1177,12 @@ _func_exit_;
|
|||
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;
|
||||
u8 *data;
|
||||
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);
|
||||
|
||||
|
||||
|
@ -1217,10 +1217,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -1268,11 +1268,11 @@ _func_exit_;
|
|||
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;
|
||||
u8 ret;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -1297,9 +1297,9 @@ _func_exit_;
|
|||
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);
|
||||
|
||||
_func_enter_;
|
||||
|
@ -1322,9 +1322,9 @@ _func_exit_;
|
|||
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_;
|
||||
|
||||
|
@ -1342,10 +1342,10 @@ _func_exit_;
|
|||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
|
||||
u16 maplen = 0;
|
||||
|
||||
|
@ -1399,16 +1399,16 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
int status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1428,17 +1428,17 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 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_;
|
||||
|
||||
|
@ -1498,7 +1498,7 @@ _func_exit_;
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define LOOP_LIMIT 5
|
||||
#define MAX_STALL_TIME 50 /* us */
|
||||
#define AntennaDiversityValue 0x80 /* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
|
||||
#define AntennaDiversityValue 0x80
|
||||
#define MAX_TXPWR_IDX_NMODE_92S 63
|
||||
#define Reset_Cnt_Limit 3
|
||||
|
||||
|
@ -79,8 +79,10 @@ enum rf_radio_path {
|
|||
#define MAX_RF_PATH RF_PATH_MAX
|
||||
#define MAX_TX_COUNT 4 /* path numbers */
|
||||
|
||||
#define CHANNEL_MAX_NUMBER 14 /* 14 is the max channel number */
|
||||
#define MAX_CHNL_GROUP_24G 6 /* ch1~2, ch3~5, ch6~8,ch9~11,ch12~13,CH 14 total three groups */
|
||||
#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 CHANNEL_GROUP_MAX_88E 6
|
||||
|
||||
enum wireless_mode {
|
||||
|
@ -131,26 +133,36 @@ struct bb_reg_def {
|
|||
u32 rfTxGainStage; /* Tx gain stage: */
|
||||
/* 0x80c~0x80f [4 bytes] */
|
||||
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 : */
|
||||
/* 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes] */
|
||||
/* 0x824~0x827,0x82c~0x82f, 0x834~0x837,
|
||||
* 0x83c~0x83f [16 bytes] */
|
||||
u32 rfSwitchControl; /* Tx Rx antenna control : */
|
||||
/* 0x858~0x85f [16 bytes] */
|
||||
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 : */
|
||||
/* 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 : */
|
||||
/* 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [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] */
|
||||
/* 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27,
|
||||
* 0xc2c~0xc2f [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 */
|
||||
/* 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 */
|
||||
/* 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 */
|
||||
/* 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 {
|
||||
|
@ -162,7 +174,7 @@ struct ant_sel_ofdm {
|
|||
u32 r_ant_ht_s1:4;
|
||||
u32 r_ant_non_ht_s1:4;
|
||||
u32 OFDM_TXSC:2;
|
||||
u32 Reserved:2;
|
||||
u32 reserved:2;
|
||||
};
|
||||
|
||||
struct ant_sel_cck {
|
||||
|
@ -186,105 +198,75 @@ struct ant_sel_cck {
|
|||
/* */
|
||||
/* BB and RF register read/write */
|
||||
/* */
|
||||
u32 rtl8188e_PHY_QueryBBReg( struct adapter * Adapter,
|
||||
u32 RegAddr,
|
||||
u32 BitMask );
|
||||
void rtl8188e_PHY_SetBBReg( struct adapter * Adapter,
|
||||
u32 RegAddr,
|
||||
u32 BitMask,
|
||||
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);
|
||||
u32 rtl8188e_PHY_QueryBBReg(struct adapter *adapter, u32 regaddr, u32 mask);
|
||||
void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr,
|
||||
u32 mask, u32 data);
|
||||
u32 rtl8188e_PHY_QueryRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||
u32 regaddr, u32 mask);
|
||||
void rtl8188e_PHY_SetRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||
u32 regaddr, u32 mask, u32 data);
|
||||
|
||||
/* */
|
||||
/* Initialization related function */
|
||||
/* */
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_MACConfig8188E( struct adapter * Adapter );
|
||||
int PHY_BBConfig8188E( struct adapter * Adapter );
|
||||
int PHY_RFConfig8188E( struct adapter * Adapter );
|
||||
int PHY_MACConfig8188E(struct adapter *adapter);
|
||||
int PHY_BBConfig8188E(struct adapter *adapter);
|
||||
int PHY_RFConfig8188E(struct adapter *adapter);
|
||||
|
||||
/* RF config */
|
||||
int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter * Adapter, u8 * pFileName, enum rf_radio_path eRFPath);
|
||||
int rtl8188e_PHY_ConfigRFWithHeaderFile( struct adapter * Adapter,
|
||||
enum rf_radio_path eRFPath);
|
||||
int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter *adapter, u8 *filename,
|
||||
enum rf_radio_path rfpath);
|
||||
int rtl8188e_PHY_ConfigRFWithHeaderFile(struct adapter *adapter,
|
||||
enum rf_radio_path rfpath);
|
||||
|
||||
/* 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 */
|
||||
/* */
|
||||
void PHY_GetTxPowerLevel8188E(struct adapter * Adapter, u32 *powerlevel);
|
||||
void PHY_SetTxPowerLevel8188E(struct adapter * Adapter, u8 channel);
|
||||
bool PHY_UpdateTxPowerDbm8188E(struct adapter * Adapter, int powerInDbm);
|
||||
void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
|
||||
void PHY_SetTxPowerLevel8188E(struct adapter *adapter, u8 channel);
|
||||
bool PHY_UpdateTxPowerDbm8188E(struct adapter *adapter, int power);
|
||||
|
||||
/* */
|
||||
void
|
||||
PHY_ScanOperationBackup8188E( struct adapter * Adapter,
|
||||
u8 Operation );
|
||||
void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
|
||||
|
||||
/* */
|
||||
/* Switch bandwidth for 8192S */
|
||||
/* */
|
||||
void PHY_SetBWMode8188E(struct adapter * pAdapter, enum ht_channel_width ChnlWidth, unsigned char Offset);
|
||||
void PHY_SetBWMode8188E(struct adapter *adapter,
|
||||
enum ht_channel_width chnlwidth, unsigned char offset);
|
||||
|
||||
/* */
|
||||
/* Set A2 entry to fw for 8192S */
|
||||
/* */
|
||||
extern void FillA2Entry8192C(struct adapter * Adapter, u8 index, u8 *val);
|
||||
void FillA2Entry8192C(struct adapter *adapter, u8 index, u8 *val);
|
||||
|
||||
/* */
|
||||
/* channel switch related funciton */
|
||||
/* */
|
||||
void PHY_SwChnl8188E( struct adapter * pAdapter,
|
||||
u8 channel );
|
||||
void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
|
||||
/* Call after initialization */
|
||||
void PHY_SwChnlPhy8192C( struct adapter * pAdapter,
|
||||
u8 channel );
|
||||
void PHY_SwChnlPhy8192C(struct adapter *adapter, u8 channel);
|
||||
|
||||
void ChkFwCmdIoDone( struct adapter * Adapter);
|
||||
void ChkFwCmdIoDone(struct adapter *adapter);
|
||||
|
||||
/* */
|
||||
/* BB/MAC/RF other monitor API */
|
||||
/* */
|
||||
void PHY_SetMonitorMode8192C( struct adapter * pAdapter,
|
||||
bool bEnableMonitorMode );
|
||||
void PHY_SetMonitorMode8192C(struct adapter *adapter, bool enablemonitormode);
|
||||
|
||||
bool PHY_CheckIsLegalRfPath8192C( struct adapter * pAdapter,
|
||||
u32 eRFPath );
|
||||
bool PHY_CheckIsLegalRfPath8192C(struct adapter *adapter, u32 rfpath);
|
||||
|
||||
void PHY_SetRFPathSwitch_8188E( struct adapter * pAdapter, bool bMain);
|
||||
void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
|
||||
|
||||
extern void
|
||||
PHY_SwitchEphyParameter(
|
||||
struct adapter * Adapter
|
||||
);
|
||||
void PHY_SwitchEphyParameter(struct adapter *adapter);
|
||||
|
||||
extern void
|
||||
PHY_EnableHostClkReq(
|
||||
struct adapter * Adapter
|
||||
);
|
||||
void PHY_EnableHostClkReq(struct adapter *adapter);
|
||||
|
||||
bool
|
||||
SetAntennaConfig92C(
|
||||
struct adapter * Adapter,
|
||||
u8 DefaultAnt
|
||||
);
|
||||
bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
|
||||
|
||||
void
|
||||
storePwrIndexDiffRateOffset(
|
||||
struct adapter * Adapter,
|
||||
u32 RegAddr,
|
||||
u32 BitMask,
|
||||
u32 Data
|
||||
);
|
||||
void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
|
||||
u32 mask, u32 data);
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
|
||||
#define PHY_QueryBBReg(Adapter, RegAddr, BitMask) rtl8188e_PHY_QueryBBReg((Adapter), (RegAddr), (BitMask))
|
||||
#define PHY_SetBBReg(Adapter, RegAddr, BitMask, Data) rtl8188e_PHY_SetBBReg((Adapter), (RegAddr), (BitMask), (Data))
|
||||
#define PHY_QueryRFReg(Adapter, eRFPath, RegAddr, BitMask) rtl8188e_PHY_QueryRFReg((Adapter), (eRFPath), (RegAddr), (BitMask))
|
||||
#define PHY_SetRFReg(Adapter, eRFPath, RegAddr, BitMask, Data) rtl8188e_PHY_SetRFReg((Adapter), (eRFPath), (RegAddr), (BitMask), (Data))
|
||||
#define PHY_QueryBBReg(adapt, regaddr, mask) \
|
||||
rtl8188e_PHY_QueryBBReg((adapt), (regaddr), (mask))
|
||||
#define PHY_SetBBReg(adapt, 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
|
||||
|
||||
|
|
|
@ -62,17 +62,13 @@
|
|||
#define rPMAC_CCKCRxRC32OK 0x188
|
||||
#define rPMAC_TxStatus 0x18c
|
||||
|
||||
/* */
|
||||
/* 2. Page2(0x200) */
|
||||
/* */
|
||||
/* The following two definition are only used for USB interface. */
|
||||
#define RF_BB_CMD_ADDR 0x02c0 /* RF/BB read/write command address. */
|
||||
#define RF_BB_CMD_DATA 0x02c4 /* RF/BB read/write command data. */
|
||||
#define RF_BB_CMD_ADDR 0x02c0 /* RF/BB r/w cmd address. */
|
||||
#define RF_BB_CMD_DATA 0x02c4 /* RF/BB r/w cmd data. */
|
||||
|
||||
/* */
|
||||
/* 3. Page8(0x800) */
|
||||
/* */
|
||||
#define rFPGA0_RFMOD 0x800 /* RF mode & CCK TxSC RF BW Setting?? */
|
||||
#define rFPGA0_RFMOD 0x800 /* RF mode & CCK TxSC RF BW Setting */
|
||||
|
||||
#define rFPGA0_TxInfo 0x804 /* Status report?? */
|
||||
#define rFPGA0_PSDFunction 0x808
|
||||
|
@ -99,16 +95,18 @@
|
|||
#define rFPGA0_XA_RFInterfaceOE 0x860 /* RF Channel switch */
|
||||
#define rFPGA0_XB_RFInterfaceOE 0x864
|
||||
|
||||
#define rFPGA0_XAB_RFInterfaceSW 0x870 /* RF Interface Software Control */
|
||||
#define rFPGA0_XAB_RFInterfaceSW 0x870 /* RF Iface Software Control */
|
||||
#define rFPGA0_XCD_RFInterfaceSW 0x874
|
||||
|
||||
#define rFPGA0_XAB_RFParameter 0x878 /* RF Parameter */
|
||||
#define rFPGA0_XCD_RFParameter 0x87c
|
||||
|
||||
#define rFPGA0_AnalogParameter1 0x880 /* Crystal cap setting RF-R/W protection for parameter4?? */
|
||||
/* Crystal cap setting RF-R/W protection for parameter4?? */
|
||||
#define rFPGA0_AnalogParameter1 0x880
|
||||
#define rFPGA0_AnalogParameter2 0x884
|
||||
#define rFPGA0_AnalogParameter3 0x888
|
||||
#define rFPGA0_AdDaClockEn 0x888 /* enable ad/da clock1 for dual-phy */
|
||||
/* enable ad/da clock1 for dual-phy */
|
||||
#define rFPGA0_AdDaClockEn 0x888
|
||||
#define rFPGA0_AnalogParameter4 0x88c
|
||||
|
||||
#define rFPGA0_XA_LSSIReadBack 0x8a0 /* Tranceiver LSSI Readback */
|
||||
|
@ -117,41 +115,46 @@
|
|||
#define rFPGA0_XD_LSSIReadBack 0x8ac
|
||||
|
||||
#define rFPGA0_PSDReport 0x8b4 /* Useless now */
|
||||
#define TransceiverA_HSPI_Readback 0x8b8 /* Transceiver A HSPI Readback */
|
||||
#define TransceiverB_HSPI_Readback 0x8bc /* Transceiver B HSPI Readback */
|
||||
#define rFPGA0_XAB_RFInterfaceRB 0x8e0 /* Useless now RF Interface Readback Value */
|
||||
/* Transceiver A HSPI Readback */
|
||||
#define TransceiverA_HSPI_Readback 0x8b8
|
||||
/* Transceiver B HSPI Readback */
|
||||
#define TransceiverB_HSPI_Readback 0x8bc
|
||||
/* Useless now RF Interface Readback Value */
|
||||
#define rFPGA0_XAB_RFInterfaceRB 0x8e0
|
||||
#define rFPGA0_XCD_RFInterfaceRB 0x8e4 /* Useless now */
|
||||
|
||||
/* */
|
||||
/* 4. Page9(0x900) */
|
||||
/* */
|
||||
#define rFPGA1_RFMOD 0x900 /* RF mode & OFDM TxSC RF BW Setting?? */
|
||||
/* RF mode & OFDM TxSC RF BW Setting?? */
|
||||
#define rFPGA1_RFMOD 0x900
|
||||
|
||||
#define rFPGA1_TxBlock 0x904 /* Useless now */
|
||||
#define rFPGA1_DebugSelect 0x908 /* Useless now */
|
||||
#define rFPGA1_TxInfo 0x90c /* Useless now Status report?? */
|
||||
#define rFPGA1_TxInfo 0x90c /* Useless now Status report */
|
||||
|
||||
/* */
|
||||
/* 5. PageA(0xA00) */
|
||||
/* */
|
||||
/* Set Control channel to upper or lower. These settings are required only for 40MHz */
|
||||
/* Set Control channel to upper or lower - required only for 40MHz */
|
||||
#define rCCK0_System 0xa00
|
||||
|
||||
#define rCCK0_AFESetting 0xa04 /* Disable init gain now Select RX path by RSSI */
|
||||
#define rCCK0_CCA 0xa08 /* Disable init gain now Init gain */
|
||||
/* Disable init gain now Select RX path by RSSI */
|
||||
#define rCCK0_AFESetting 0xa04
|
||||
/* Disable init gain now Init gain */
|
||||
#define rCCK0_CCA 0xa08
|
||||
|
||||
#define rCCK0_RxAGC1 0xa0c /* AGC default value, saturation level Antenna Diversity, RX AGC, LNA Threshold, RX LNA Threshold useless now. Not the same as 90 series */
|
||||
/* AGC default value, saturation level Antenna Diversity, RX AGC, LNA Threshold,
|
||||
* RX LNA Threshold useless now. Not the same as 90 series */
|
||||
#define rCCK0_RxAGC1 0xa0c
|
||||
#define rCCK0_RxAGC2 0xa10 /* AGC & DAGC */
|
||||
|
||||
#define rCCK0_RxHP 0xa14
|
||||
|
||||
#define rCCK0_DSPParameter1 0xa18 /* Timing recovery & Channel estimation threshold */
|
||||
/* Timing recovery & Channel estimation threshold */
|
||||
#define rCCK0_DSPParameter1 0xa18i
|
||||
#define rCCK0_DSPParameter2 0xa1c /* SQ threshold */
|
||||
|
||||
#define rCCK0_TxFilter1 0xa20
|
||||
#define rCCK0_TxFilter2 0xa24
|
||||
#define rCCK0_DebugPort 0xa28 /* debug port and Tx filter3 */
|
||||
#define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d useless now 0xa30-a4f channel report */
|
||||
#define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d useless now */
|
||||
#define rCCK0_TRSSIReport 0xa50
|
||||
#define rCCK0_RxReport 0xa54 /* 0xa57 */
|
||||
#define rCCK0_FACounterLower 0xa5c /* 0xa5b */
|
||||
|
@ -179,7 +182,8 @@
|
|||
#define rOFDM0_TRMuxPar 0xc08
|
||||
#define rOFDM0_TRSWIsolation 0xc0c
|
||||
|
||||
#define rOFDM0_XARxAFE 0xc10 /* RxIQ DC offset, Rx digital filter, DC notch filter */
|
||||
/* RxIQ DC offset, Rx digital filter, DC notch filter */
|
||||
#define rOFDM0_XARxAFE 0xc10
|
||||
#define rOFDM0_XARxIQImbalance 0xc14 /* RxIQ imblance matrix */
|
||||
#define rOFDM0_XBRxAFE 0xc18
|
||||
#define rOFDM0_XBRxIQImbalance 0xc1c
|
||||
|
@ -495,7 +499,8 @@
|
|||
#define bCCKTxStatus 0x1
|
||||
#define bOFDMTxStatus 0x2
|
||||
|
||||
#define IS_BB_REG_OFFSET_92S(_Offset) ((_Offset >= 0x800) && (_Offset <= 0xfff))
|
||||
#define IS_BB_REG_OFFSET_92S(_Offset) \
|
||||
((_Offset >= 0x800) && (_Offset <= 0xfff))
|
||||
|
||||
/* 2. Page8(0x800) */
|
||||
#define bRFMOD 0x1 /* Reg 0x800 rFPGA0_RFMOD */
|
||||
|
@ -526,7 +531,7 @@
|
|||
#define bR2RCCAMask 0x00000f00
|
||||
#define bHSSI_R2TDelay 0xf8000000
|
||||
#define bHSSI_T2RDelay 0xf80000
|
||||
#define bContTxHSSI 0x400 /* chane gain at continue Tx */
|
||||
#define bContTxHSSI 0x400 /* change gain at continue Tx */
|
||||
#define bIGFromCCK 0x200
|
||||
#define bAGCAddress 0x3f
|
||||
#define bRxHPTx 0x7000
|
||||
|
@ -535,7 +540,8 @@
|
|||
#define bAGCTxCode 0xc00000
|
||||
#define bAGCRxCode 0x300000
|
||||
|
||||
#define b3WireDataLength 0x800 /* Reg 0x820~84f rFPGA0_XA_HSSIParameter1 */
|
||||
/* Reg 0x820~84f rFPGA0_XA_HSSIParameter1 */
|
||||
#define b3WireDataLength 0x800
|
||||
#define b3WireAddressLength 0x400
|
||||
|
||||
#define b3WireRFPowerDown 0x1 /* Useless now */
|
||||
|
@ -598,12 +604,14 @@
|
|||
#define bDA6DebugMode 0x20000
|
||||
#define bDA6Swing 0x380000
|
||||
|
||||
#define bADClkPhase 0x4000000 /* Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
|
||||
/* Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
|
||||
#define bADClkPhase 0x4000000
|
||||
|
||||
#define b80MClkDelay 0x18000000 /* Useless */
|
||||
#define bAFEWatchDogEnable 0x20000000
|
||||
|
||||
#define bXtalCap01 0xc0000000 /* Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap */
|
||||
/* Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap */
|
||||
#define bXtalCap01 0xc0000000
|
||||
#define bXtalCap23 0x3
|
||||
#define bXtalCap92x 0x0f000000
|
||||
#define bXtalCap 0x0f000000
|
||||
|
@ -646,7 +654,7 @@
|
|||
#define bOFDMTxSC 0x30000000 /* Useless */
|
||||
#define bCCKTxOn 0x1
|
||||
#define bOFDMTxOn 0x2
|
||||
#define bDebugPage 0xfff /* reset debug page and also HWord, LWord */
|
||||
#define bDebugPage 0xfff /* reset debug page and HWord, LWord */
|
||||
#define bDebugItem 0xff /* reset debug page and LWord */
|
||||
#define bAntL 0x10
|
||||
#define bAntNonHT 0x100
|
||||
|
@ -660,7 +668,7 @@
|
|||
#define bCCKTxPowerSaving 0x80
|
||||
#define bCCKRxPowerSaving 0x40
|
||||
|
||||
#define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0_System 20/40 switch */
|
||||
#define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0_System 20/40 */
|
||||
|
||||
#define bCCKScramble 0x8 /* Useless */
|
||||
#define bCCKAntDiversity 0x8000
|
||||
|
@ -837,8 +845,8 @@
|
|||
#define bRxHP_BBP1 0x7000
|
||||
#define bRxHP_BBP2 0x70000
|
||||
#define bRxHP_BBP3 0x700000
|
||||
#define bRSSI_H 0x7f0000 /* the threshold for high power */
|
||||
#define bRSSI_Gen 0x7f000000 /* the threshold for ant diversity */
|
||||
#define bRSSI_H 0x7f0000 /* threshold for high power */
|
||||
#define bRSSI_Gen 0x7f000000 /* threshold for ant diversity */
|
||||
#define bRxSettle_TRSW 0x7
|
||||
#define bRxSettle_LNA 0x38
|
||||
#define bRxSettle_RSSI 0x1c0
|
||||
|
|
|
@ -24,82 +24,52 @@ Major Change History:
|
|||
/* */
|
||||
/* 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_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_RPT2_DESC_PKT_LEN_88E(__pRxStatusDesc) \
|
||||
LE_BITS_TO_4BYTE( __pRxStatusDesc, 0, 9)
|
||||
#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_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) LE_BITS_TO_1BYTE( __pAddr+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)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr) \
|
||||
LE_BITS_TO_4BYTE( __pAddr, 0, 16)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr) \
|
||||
LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) \
|
||||
LE_BITS_TO_1BYTE( __pAddr+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 */
|
||||
|
||||
void
|
||||
ODM_RASupport_Init(
|
||||
struct odm_dm_struct *pDM_Odm
|
||||
);
|
||||
void ODM_RASupport_Init(struct odm_dm_struct *dm_odm);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init_all(
|
||||
struct odm_dm_struct * pDM_Odm
|
||||
);
|
||||
int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte MacID
|
||||
);
|
||||
int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetShortGI_8188E(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte MacID
|
||||
);
|
||||
u1Byte ODM_RA_GetShortGI_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetDecisionRate_8188E(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte MacID
|
||||
);
|
||||
u1Byte ODM_RA_GetDecisionRate_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetHwPwrStatus_8188E(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte MacID
|
||||
);
|
||||
void
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte MacID,
|
||||
u1Byte RateID,
|
||||
u4Byte RateMask,
|
||||
u1Byte SGIEnable
|
||||
);
|
||||
u1Byte ODM_RA_GetHwPwrStatus_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID);
|
||||
void ODM_RA_UpdateRateInfo_8188E(struct odm_dm_struct *dm_odm, u1Byte MacID,
|
||||
u1Byte RateID, u4Byte RateMask,
|
||||
u1Byte SGIEnable);
|
||||
|
||||
void
|
||||
ODM_RA_SetRSSI_8188E(
|
||||
struct odm_dm_struct * pDM_Odm,
|
||||
u1Byte MacID,
|
||||
u1Byte Rssi
|
||||
);
|
||||
void ODM_RA_SetRSSI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid,
|
||||
u1Byte rssi);
|
||||
|
||||
void
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
struct odm_dm_struct * pDM_Odm,
|
||||
pu1Byte TxRPT_Buf,
|
||||
u2Byte TxRPT_Len,
|
||||
u4Byte MacIDValidEntry0,
|
||||
u4Byte MacIDValidEntry1
|
||||
);
|
||||
void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm,
|
||||
u1Byte *txrpt_buf, u2Byte txrpt_len,
|
||||
u4Byte validentry0, u4Byte validentry1);
|
||||
|
||||
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
|
||||
|
|
|
@ -27,27 +27,18 @@
|
|||
* AGC_TAB_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
enum HAL_STATUS
|
||||
ODM_ReadAndConfig_AGC_TAB_1T_8188E(
|
||||
struct odm_dm_struct * pDM_Odm
|
||||
);
|
||||
enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *odm);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
enum HAL_STATUS
|
||||
ODM_ReadAndConfig_PHY_REG_1T_8188E(
|
||||
struct odm_dm_struct * pDM_Odm
|
||||
);
|
||||
enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *odm);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_PG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(
|
||||
struct odm_dm_struct * pDM_Odm
|
||||
);
|
||||
void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
* 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 */
|
||||
|
|
|
@ -27,69 +27,37 @@
|
|||
#define AVG_THERMAL_NUM_88E 4
|
||||
|
||||
|
||||
void
|
||||
ODM_TxPwrTrackAdjust88E(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *pDM_Odm,
|
||||
u1Byte Type, /* 0 = OFDM, 1 = CCK */
|
||||
pu1Byte pDirection, /* 1 = +(increase) 2 = -(decrease) */
|
||||
pu4Byte pOutWriteVal /* Tx tracking CCK/OFDM BB swing index adjust */
|
||||
);
|
||||
pu1Byte pDirection,/* 1 = +(incr) 2 = -(decr) */
|
||||
pu4Byte pOutWriteVal); /* Tx tracking CCK/OFDM BB
|
||||
* swing index adjust */
|
||||
|
||||
|
||||
void
|
||||
odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||
struct adapter * Adapter
|
||||
);
|
||||
void odm_TXPowerTrackingCallback_ThermalMeter_8188E(struct adapter *Adapter);
|
||||
|
||||
|
||||
/* 1 7. IQK */
|
||||
|
||||
void
|
||||
PHY_IQCalibrate_8188E(struct adapter * Adapter, bool bReCovery);
|
||||
void PHY_IQCalibrate_8188E(struct adapter *Adapter, bool ReCovery);
|
||||
|
||||
|
||||
/* */
|
||||
/* LC calibrate */
|
||||
/* */
|
||||
void PHY_LCCalibrate_8188E(struct adapter *pAdapter);
|
||||
|
||||
/* */
|
||||
/* AP calibrate */
|
||||
/* */
|
||||
void PHY_APCalibrate_8188E(struct adapter *pAdapter, s1Byte delta);
|
||||
|
||||
void
|
||||
PHY_DigitalPredistortion_8188E( struct adapter * pAdapter);
|
||||
void PHY_DigitalPredistortion_8188E(struct adapter * pAdapter);
|
||||
|
||||
void _PHY_SaveADDARegisters(struct adapter *pAdapter, pu4Byte ADDAReg,
|
||||
pu4Byte ADDABackup, u4Byte RegisterNum);
|
||||
|
||||
void
|
||||
_PHY_SaveADDARegisters(
|
||||
struct adapter * pAdapter,
|
||||
pu4Byte ADDAReg,
|
||||
pu4Byte ADDABackup,
|
||||
u4Byte RegisterNum
|
||||
);
|
||||
void _PHY_PathADDAOn(struct adapter *pAdapter, pu4Byte ADDAReg,
|
||||
bool isPathAOn, bool is2T);
|
||||
|
||||
void
|
||||
_PHY_PathADDAOn(
|
||||
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_MACSettingCalibration(struct adapter *pAdapter, pu4Byte MACReg,
|
||||
pu4Byte MACBackup);
|
||||
|
||||
void _PHY_PathAStandBy(struct adapter *pAdapter);
|
||||
|
||||
#endif /* #ifndef __HAL_PHY_RF_8188E_H__ */
|
||||
|
|
|
@ -121,14 +121,8 @@ struct wl_pwr_cfg {
|
|||
#define GET_PWR_CFG_VALUE(__PWR_CMD) __PWR_CMD.value
|
||||
|
||||
|
||||
/* */
|
||||
/* 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
|
||||
|
|
|
@ -83,57 +83,85 @@ struct HAL_VERSION {
|
|||
#define GET_CVID_CUT_VERSION(version) (((version).CUTVersion))
|
||||
#define GET_CVID_ROM_VERSION(version) (((version).ROMVer) & ROM_VERSION_MASK)
|
||||
|
||||
/* */
|
||||
/* Common Macro. -- */
|
||||
/* */
|
||||
/* HAL_VERSION VersionID */
|
||||
|
||||
/* 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_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)
|
||||
#define IS_81XXC(version) \
|
||||
(((GET_CVID_IC_TYPE(version) == CHIP_8192C) || \
|
||||
(GET_CVID_IC_TYPE(version) == CHIP_8188C)) ? 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 */
|
||||
#define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==TEST_CHIP)? true: false)
|
||||
#define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==NORMAL_CHIP)? true: false)
|
||||
#define IS_TEST_CHIP(version) \
|
||||
((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 */
|
||||
#define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
|
||||
#define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_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)
|
||||
#define IS_A_CUT(version) \
|
||||
((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false)
|
||||
#define IS_B_CUT(version) \
|
||||
((GET_CVID_CUT_VERSION(version) == B_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 */
|
||||
#define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC)? true: false)
|
||||
#define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC)? true: false)
|
||||
#define IS_CHIP_VENDOR_TSMC(version) \
|
||||
((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 */
|
||||
#define IS_1T1R(version) ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? 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)
|
||||
#define IS_1T1R(version) \
|
||||
((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? 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. -- */
|
||||
/* */
|
||||
#define IS_81XXC_TEST_CHIP(version) ((IS_81XXC(version) && (!IS_NORMAL_CHIP(version)))? true: false)
|
||||
#define IS_81XXC_TEST_CHIP(version) \
|
||||
((IS_81XXC(version) && (!IS_NORMAL_CHIP(version))) ? true : false)
|
||||
|
||||
#define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? true : false)
|
||||
#define IS_81xxC_VENDOR_UMC_A_CUT(version) (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_92C_SERIAL(version) \
|
||||
((IS_81XXC(version) && IS_2T2R(version)) ? true : false)
|
||||
#define IS_81xxC_VENDOR_UMC_A_CUT(version) \
|
||||
(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_C_CUT(version) ((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_92D_SINGLEPHY(version) \
|
||||
((IS_92D(version)) ? (IS_2T2R(version) ? true: false) : false)
|
||||
#define IS_92D_C_CUT(version) \
|
||||
((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_B_CUT(version) ((IS_8723_SERIES(version)) ? ( IS_B_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_B_CUT(version) \
|
||||
((IS_8723_SERIES(version)) ? ( IS_B_CUT(version)?true : false) : false)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
|
@ -39,8 +38,9 @@ typedef void (*proc_t)(void*);
|
|||
#define MEM_ALIGNMENT_OFFSET (sizeof(size_t))
|
||||
#define MEM_ALIGNMENT_PADDING (sizeof(size_t) - 1)
|
||||
|
||||
/* port from fw by thomas */
|
||||
/* TODO: Belows are Sync from SD7-Driver. It is necessary to check correctness */
|
||||
/* port from fw */
|
||||
/* TODO: Macros Below are Sync from SD7-Driver. It is necessary
|
||||
* to check correctness */
|
||||
|
||||
/*
|
||||
* Call endian free function when
|
||||
|
@ -68,12 +68,19 @@ typedef void (*proc_t)(void*);
|
|||
|
||||
/* Write data to memory */
|
||||
#define WRITEEF1BYTE(_ptr, _val) \
|
||||
(*((u8 *)(_ptr))) = EF1BYTE(_val)
|
||||
do { \
|
||||
(*((u8 *)(_ptr))) = EF1BYTE(_val) \
|
||||
} while (0)
|
||||
/* Write le data to memory in host ordering */
|
||||
#define WRITEEF2BYTE(_ptr, _val) \
|
||||
(*((u16 *)(_ptr))) = EF2BYTE(_val)
|
||||
do { \
|
||||
(*((u16 *)(_ptr))) = EF2BYTE(_val) \
|
||||
} while (0)
|
||||
|
||||
#define WRITEEF4BYTE(_ptr, _val) \
|
||||
(*((u32 *)(_ptr))) = EF2BYTE(_val)
|
||||
do { \
|
||||
(*((u32 *)(_ptr))) = EF2BYTE(_val) \
|
||||
} while (0)
|
||||
|
||||
/* Create a bit mask
|
||||
* Examples:
|
||||
|
@ -155,23 +162,31 @@ value to host byte ordering.*/
|
|||
* Set subfield of little-endian 4-byte value to specified value.
|
||||
*/
|
||||
#define SET_BITS_TO_LE_4BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||
do { \
|
||||
*((u32 *)(__pstart)) = \
|
||||
( \
|
||||
LE_BITS_CLEARED_TO_4BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||
((((u32)__val) & BIT_LEN_MASK_32(__bitlen)) << (__bitoffset)) \
|
||||
);
|
||||
); \
|
||||
} while (0)
|
||||
|
||||
#define SET_BITS_TO_LE_2BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||
do { \
|
||||
*((u16 *)(__pstart)) = \
|
||||
( \
|
||||
LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||
((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
|
||||
);
|
||||
); \
|
||||
} while (0)
|
||||
|
||||
#define SET_BITS_TO_LE_1BYTE(__pstart, __bitoffset, __bitlen, __val) \
|
||||
do { \
|
||||
*((u8 *)(__pstart)) = EF1BYTE \
|
||||
( \
|
||||
LE_BITS_CLEARED_TO_1BYTE(__pstart, __bitoffset, __bitlen) | \
|
||||
((((u8)__val) & BIT_LEN_MASK_8(__bitlen)) << (__bitoffset)) \
|
||||
);
|
||||
); \
|
||||
} while (0)
|
||||
|
||||
/* Get the N-bytes aligment offset from the current length */
|
||||
#define N_BYTE_ALIGMENT(__value, __aligment) ((__aligment == 1) ? \
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#ifndef __CIRC_BUF_H_
|
||||
#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_ */
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
/*-------------------------------------------------------------------------------
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
For type defines and data structure defines
|
||||
|
||||
--------------------------------------------------------------------------------*/
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef __DRV_TYPES_H__
|
||||
|
@ -31,15 +31,6 @@
|
|||
#include <osdep_service.h>
|
||||
#include <wlan_bssdef.h>
|
||||
#include <drv_types_linux.h>
|
||||
|
||||
enum _NIC_VERSION {
|
||||
|
||||
RTL8711_NIC,
|
||||
RTL8712_NIC,
|
||||
RTL8713_NIC,
|
||||
RTL8716_NIC
|
||||
};
|
||||
|
||||
#include <rtw_ht.h>
|
||||
#include <rtw_cmd.h>
|
||||
#include <wlan_bssdef.h>
|
||||
|
@ -62,8 +53,15 @@ enum _NIC_VERSION {
|
|||
#include <rtw_p2p.h>
|
||||
#include <rtw_ap.h>
|
||||
#include <rtw_mp.h>
|
||||
|
||||
#include <rtw_br_ext.h>
|
||||
|
||||
enum _NIC_VERSION {
|
||||
RTL8711_NIC,
|
||||
RTL8712_NIC,
|
||||
RTL8713_NIC,
|
||||
RTL8716_NIC
|
||||
};
|
||||
|
||||
#define SPEC_DEV_ID_NONE BIT(0)
|
||||
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
||||
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
|
||||
|
@ -72,16 +70,12 @@ enum _NIC_VERSION {
|
|||
#define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
|
||||
|
||||
struct specific_device_id {
|
||||
|
||||
u32 flags;
|
||||
|
||||
u16 idVendor;
|
||||
u16 idProduct;
|
||||
|
||||
};
|
||||
|
||||
struct registry_priv
|
||||
{
|
||||
struct registry_priv {
|
||||
u8 chip_version;
|
||||
u8 rfintfs;
|
||||
u8 lbkmode;
|
||||
|
@ -151,7 +145,7 @@ struct registry_priv
|
|||
|
||||
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 */
|
||||
|
||||
|
@ -167,12 +161,11 @@ struct registry_priv
|
|||
#define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv, 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_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
|
||||
|
||||
struct dvobj_priv
|
||||
{
|
||||
struct dvobj_priv {
|
||||
struct adapter *if1;
|
||||
struct adapter *if2;
|
||||
|
||||
|
@ -209,7 +202,8 @@ struct dvobj_priv
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -232,7 +226,8 @@ enum driver_state {
|
|||
};
|
||||
|
||||
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 bDongle;/* build-in module or external dongle */
|
||||
u16 chip_type;
|
||||
|
@ -244,7 +239,6 @@ struct adapter {
|
|||
struct mlme_ext_priv mlmeextpriv;
|
||||
struct cmd_priv cmdpriv;
|
||||
struct evt_priv evtpriv;
|
||||
/* struct io_queue *pio_queue; */
|
||||
struct io_priv iopriv;
|
||||
struct xmit_priv xmitpriv;
|
||||
struct recv_priv recvpriv;
|
||||
|
@ -308,12 +302,12 @@ struct adapter {
|
|||
u8 bReadPortCancel;
|
||||
u8 bWritePortCancel;
|
||||
u8 bRxRSSIDisplay;
|
||||
/* Added by Albert 2012/10/26 */
|
||||
/* The driver will show up the desired channel number when this flag is 1. */
|
||||
/* The driver will show up the desired channel number
|
||||
* when this flag is 1. */
|
||||
u8 bNotifyChannelChange;
|
||||
#ifdef CONFIG_P2P
|
||||
/* Added by Albert 2012/12/06 */
|
||||
/* The driver will show the current P2P status when the upper application reads it. */
|
||||
/* The driver will show the current P2P status when the
|
||||
* upper application reads it. */
|
||||
u8 bShowGetP2PState;
|
||||
#endif
|
||||
struct adapter *pbuddy_adapter;
|
||||
|
@ -340,10 +334,9 @@ struct adapter {
|
|||
|
||||
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__ */
|
||||
|
|
|
@ -25,17 +25,18 @@
|
|||
#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */
|
||||
#define LLC_HEADER_SIZE 6 /* LLC Header Length */
|
||||
#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */
|
||||
#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Minimum Ethernet Packet Size */
|
||||
#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* Maximum Ethernet Packet Size */
|
||||
#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min 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? */
|
||||
#define RT_ETH_IS_BROADCAST(_pAddr) ( \
|
||||
((UCHAR *)(_pAddr))[0]==0xff && \
|
||||
((UCHAR *)(_pAddr))[1]==0xff && \
|
||||
((UCHAR *)(_pAddr))[2]==0xff && \
|
||||
((UCHAR *)(_pAddr))[3]==0xff && \
|
||||
((UCHAR *)(_pAddr))[4]==0xff && \
|
||||
((UCHAR *)(_pAddr))[5]==0xff) /* Is Broadcast Address? */
|
||||
/* Is Multicast Address? */
|
||||
#define RT_ETH_IS_MULTICAST(_addr) ((((UCHAR *)(_addr))[0]&0x01) != 0)
|
||||
#define RT_ETH_IS_BROADCAST(_addr) ( \
|
||||
((UCHAR *)(_addr))[0] == 0xff && \
|
||||
((UCHAR *)(_addr))[1] == 0xff && \
|
||||
((UCHAR *)(_addr))[2] == 0xff && \
|
||||
((UCHAR *)(_addr))[3] == 0xff && \
|
||||
((UCHAR *)(_addr))[4] == 0xff && \
|
||||
((UCHAR *)(_addr))[5] == 0xff) /* Is Broadcast Address? */
|
||||
|
||||
|
||||
#endif /* #ifndef __INC_ETHERNET_H */
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
#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);
|
||||
|
|
|
@ -90,20 +90,19 @@
|
|||
#define RATE_MCS15 BIT(27)
|
||||
|
||||
/* ALL CCK Rate */
|
||||
#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|\
|
||||
RATR_36M|RATR_48M|RATR_54M
|
||||
#define RATE_ALL_OFDM_1SS RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 |\
|
||||
RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7
|
||||
#define RATE_ALL_OFDM_2SS RATR_MCS8|RATR_MCS9 |RATR_MCS10|RATR_MCS11|\
|
||||
RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15
|
||||
#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 | RATR_36M | RATR_48M | RATR_54M)
|
||||
#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | \
|
||||
RATR_MCS3 | RATR_MCS4 | RATR_MCS5|RATR_MCS6 | \
|
||||
RATR_MCS7)
|
||||
#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. -- */
|
||||
/* */
|
||||
/* */
|
||||
/* Rate */
|
||||
/* */
|
||||
/* CCK Rates, TxHT = 0 */
|
||||
#define DESC_RATE1M 0x00
|
||||
#define DESC_RATE2M 0x01
|
||||
|
@ -140,7 +139,8 @@
|
|||
#define DESC_RATEMCS15_SG 0x1c
|
||||
#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_DURATION 0x05E0
|
||||
#define REG_NOA_DESC_INTERVAL 0x05E4
|
||||
|
@ -151,27 +151,19 @@
|
|||
void dump_chip_info(struct HAL_VERSION ChipVersion);
|
||||
|
||||
|
||||
u8 /* return the final channel plan decision */
|
||||
hal_com_get_channel_plan(
|
||||
struct adapter * padapter,
|
||||
u8 hw_channel_plan, /* channel plan from HW (efuse/eeprom) */
|
||||
u8 sw_channel_plan, /* channel plan from SW (registry/module param) */
|
||||
u8 def_channel_plan, /* channel plan used when the former two is invalid */
|
||||
/* return the final channel plan decision */
|
||||
u8 hal_com_get_channel_plan(struct adapter *padapter,
|
||||
u8 hw_channel_plan,
|
||||
u8 sw_channel_plan,
|
||||
u8 def_channel_plan,
|
||||
bool AutoLoadFail
|
||||
);
|
||||
|
||||
u8 MRateToHwRate(u8 rate);
|
||||
|
||||
void HalSetBrateCfg(
|
||||
struct adapter * Adapter,
|
||||
u8 *mBratesOS,
|
||||
u16 *pBrateCfg);
|
||||
void HalSetBrateCfg(struct adapter *Adapter, u8 *mBratesOS, u16 *pBrateCfg);
|
||||
|
||||
bool
|
||||
Hal_MappingOutPipe(
|
||||
struct adapter * pAdapter,
|
||||
u8 NumOutPipe
|
||||
);
|
||||
bool Hal_MappingOutPipe(struct adapter *pAdapter, u8 NumOutPipe);
|
||||
|
||||
void hal_init_macaddr(struct adapter *adapter);
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ enum RTL871X_HCI_TYPE {
|
|||
};
|
||||
|
||||
enum _CHIP_TYPE {
|
||||
|
||||
NULL_CHIP_TYPE,
|
||||
RTL8712_8188S_8191S_8192S,
|
||||
RTL8188C_8192C,
|
||||
|
@ -42,7 +41,6 @@ enum _CHIP_TYPE {
|
|||
MAX_CHIP_TYPE
|
||||
};
|
||||
|
||||
|
||||
enum hw_variables {
|
||||
HW_VAR_MEDIA_STATUS,
|
||||
HW_VAR_MEDIA_STATUS1,
|
||||
|
@ -104,8 +102,10 @@ enum hw_variables {
|
|||
HW_VAR_EFUSE_BT_BYTES,
|
||||
HW_VAR_FIFO_CLEARN_UP,
|
||||
HW_VAR_CHECK_TXBUF,
|
||||
HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation, 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. */
|
||||
HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation,
|
||||
* 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. */
|
||||
#ifdef CONFIG_WOWLAN
|
||||
HW_VAR_WOWLAN,
|
||||
|
@ -182,47 +182,81 @@ struct hal_ops {
|
|||
void (*disable_interrupt)(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 (*hal_dm_watchdog)(struct adapter *padapter);
|
||||
|
||||
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,u8* val);
|
||||
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,u8* val);
|
||||
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
|
||||
u8 *val);
|
||||
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
|
||||
u8 *val);
|
||||
|
||||
u8 (*GetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
||||
u8 (*SetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
||||
u8 (*GetHalDefVarHandler)(struct adapter *padapter,
|
||||
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 (*SetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
||||
void (*GetHalODMVarHandler)(struct adapter *padapter,
|
||||
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 (*Add_RateATid)(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
||||
void (*run_thread)(struct adapter *padapter);
|
||||
void (*cancel_thread)(struct adapter *padapter);
|
||||
void (*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg,
|
||||
u8 rssi_level);
|
||||
void (*run_thread)(struct adapter *adapter);
|
||||
void (*cancel_thread)(struct adapter *adapter);
|
||||
|
||||
u8 (*AntDivBeforeLinkHandler)(struct adapter *padapter);
|
||||
void (*AntDivCompareHandler)(struct adapter *padapter, 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);
|
||||
u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter);
|
||||
void (*AntDivCompareHandler)(struct adapter *adapter,
|
||||
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 (*mgnt_xmit)(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
s32 (*hal_xmit)(struct adapter *padapter,
|
||||
struct xmit_frame *pxmitframe);
|
||||
s32 (*mgnt_xmit)(struct adapter *padapter,
|
||||
struct xmit_frame *pmgntframe);
|
||||
|
||||
u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr, u32 BitMask);
|
||||
void (*write_bbreg)(struct adapter *padapter, u32 RegAddr, 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);
|
||||
u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||
u32 BitMask);
|
||||
void (*write_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||
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 (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest);
|
||||
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest);
|
||||
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType, bool bPseudoTest);
|
||||
int (*Efuse_PgPacketRead)(struct adapter *padapter, 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 bPseudoTest);
|
||||
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite,
|
||||
u8 PwrState);
|
||||
void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
|
||||
u16 _size_byte, u8 *pbuf, bool bPseudoTest);
|
||||
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
|
||||
u8 type, void *pOut, bool bPseudoTest);
|
||||
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
|
||||
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_reset_value)(struct adapter *padapter);
|
||||
|
@ -231,11 +265,14 @@ struct hal_ops {
|
|||
void (*sreset_linked_status_check) (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_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;
|
||||
};
|
||||
|
||||
|
@ -274,39 +311,43 @@ enum hardware_type {
|
|||
HARDWARE_TYPE_MAX,
|
||||
};
|
||||
|
||||
/* */
|
||||
/* RTL8192C Series */
|
||||
/* */
|
||||
#define IS_HARDWARE_TYPE_8192CE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CE)
|
||||
#define IS_HARDWARE_TYPE_8192CU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CU)
|
||||
#define IS_HARDWARE_TYPE_8192CE(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CE)
|
||||
#define IS_HARDWARE_TYPE_8192CU(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192CU)
|
||||
#define IS_HARDWARE_TYPE_8192C(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8192CE(_Adapter) || IS_HARDWARE_TYPE_8192CU(_Adapter))
|
||||
|
||||
/* */
|
||||
/* RTL8192D Series */
|
||||
/* */
|
||||
#define IS_HARDWARE_TYPE_8192DE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DE)
|
||||
#define IS_HARDWARE_TYPE_8192DU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DU)
|
||||
#define IS_HARDWARE_TYPE_8192DE(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DE)
|
||||
#define IS_HARDWARE_TYPE_8192DU(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8192DU)
|
||||
#define IS_HARDWARE_TYPE_8192D(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8192DE(_Adapter) || IS_HARDWARE_TYPE_8192DU(_Adapter))
|
||||
|
||||
/* */
|
||||
/* RTL8723A Series */
|
||||
/* */
|
||||
#define IS_HARDWARE_TYPE_8723AE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AE)
|
||||
#define IS_HARDWARE_TYPE_8723AU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AU)
|
||||
#define IS_HARDWARE_TYPE_8723AS(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AS)
|
||||
#define IS_HARDWARE_TYPE_8723AE(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8723AE)
|
||||
#define IS_HARDWARE_TYPE_8723AU(_Adapter) \
|
||||
(((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) \
|
||||
(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 */
|
||||
/* */
|
||||
#define IS_HARDWARE_TYPE_8188EE(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EE)
|
||||
#define IS_HARDWARE_TYPE_8188EU(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EU)
|
||||
#define IS_HARDWARE_TYPE_8188ES(_Adapter) (((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188ES)
|
||||
#define IS_HARDWARE_TYPE_8188EE(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType==HARDWARE_TYPE_RTL8188EE)
|
||||
#define IS_HARDWARE_TYPE_8188EU(_Adapter) \
|
||||
(((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) \
|
||||
(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)
|
||||
|
||||
|
@ -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_version(struct adapter *padapter);
|
||||
|
||||
u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
||||
u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue);
|
||||
u8 rtw_hal_set_def_var(struct adapter *padapter,
|
||||
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_get_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet);
|
||||
void rtw_hal_set_odm_var(struct adapter *padapter,
|
||||
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_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_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_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);
|
||||
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);
|
||||
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_add_ra_tid(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
||||
void rtw_hal_clone_data(struct adapter *dst_padapter, struct adapter *src_padapter);
|
||||
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
|
||||
void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
|
||||
void rtw_hal_clone_data(struct adapter *dst_adapt,
|
||||
struct adapter *src_adapt);
|
||||
void rtw_hal_start_thread(struct adapter *padapter);
|
||||
void rtw_hal_stop_thread(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);
|
||||
void rtw_hal_write_bbreg(struct adapter *padapter, 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);
|
||||
void rtw_hal_write_bbreg(struct adapter *padapter, 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);
|
||||
|
||||
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_dm_watchdog(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_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);
|
||||
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_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);
|
||||
|
||||
#endif /* __HAL_INTF_H__ */
|
||||
|
|
|
@ -179,22 +179,32 @@ enum NETWORK_TYPE {
|
|||
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_5G_NETTYPE_MSK (WIRELESS_11A | WIRELESS_11_5N)
|
||||
#define SUPPORTED_24G_NETTYPE_MSK \
|
||||
(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 IsSupported5G(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
||||
#define IsSupported24G(NetType) \
|
||||
((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
||||
#define IsSupported5G(NetType) \
|
||||
((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
||||
|
||||
#define IsEnableHWCCK(NetType) IsSupported24G(NetType)
|
||||
#define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11_24N|SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
||||
#define IsEnableHWCCK(NetType) \
|
||||
IsSupported24G(NetType)
|
||||
#define IsEnableHWOFDM(NetType) \
|
||||
((NetType) & (WIRELESS_11G | WIRELESS_11_24N | \
|
||||
SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
||||
|
||||
#define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
|
||||
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
|
||||
#define IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
|
||||
|
||||
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false)
|
||||
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false)
|
||||
#define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
|
||||
#define IsSupportedTxCCK(NetType) \
|
||||
((NetType) & (WIRELESS_11B) ? 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 {
|
||||
|
@ -264,7 +274,6 @@ struct sta_data{
|
|||
};
|
||||
#endif
|
||||
|
||||
|
||||
#if WIRELESS_EXT < 17
|
||||
#define IW_QUAL_QUAL_INVALID 0x10
|
||||
#define IW_QUAL_LEVEL_INVALID 0x20
|
||||
|
@ -307,7 +316,7 @@ struct rtw_ieee80211_hdr {
|
|||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr {
|
||||
u16 frame_ctl;
|
||||
|
@ -316,8 +325,7 @@ struct rtw_ieee80211_hdr_3addr {
|
|||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
} __packed;
|
||||
|
||||
struct rtw_ieee80211_hdr_qos {
|
||||
u16 frame_ctl;
|
||||
|
@ -328,7 +336,7 @@ struct rtw_ieee80211_hdr_qos {
|
|||
u16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
u16 qc;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr_qos {
|
||||
u16 frame_ctl;
|
||||
|
@ -338,7 +346,7 @@ struct rtw_ieee80211_hdr_3addr_qos {
|
|||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
u16 qc;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct eapol {
|
||||
u8 snap[6];
|
||||
|
@ -346,7 +354,7 @@ struct eapol {
|
|||
u8 version;
|
||||
u8 type;
|
||||
u16 length;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
enum eap_type {
|
||||
EAP_PACKET = 0,
|
||||
|
@ -457,13 +465,11 @@ enum eap_type {
|
|||
#define P80211_OUI_LEN 3
|
||||
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
u8 dsap; /* always 0xAA */
|
||||
u8 ssap; /* always 0xAA */
|
||||
u8 ctrl; /* always 0x03 */
|
||||
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
||||
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||
|
||||
|
@ -633,9 +639,6 @@ struct ieee80211_snap_hdr {
|
|||
#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
|
||||
* information for frames received. Not setting these will not cause
|
||||
* any adverse affects. */
|
||||
|
@ -742,7 +745,7 @@ struct ieee80211_security {
|
|||
u8 keys[WEP_KEYS][WEP_KEY_LEN];
|
||||
u8 level;
|
||||
u16 flags;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
|
||||
|
@ -787,13 +790,13 @@ struct ieee80211_header_data {
|
|||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_info_element {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
|
@ -806,7 +809,7 @@ struct ieee80211_info_element {
|
|||
u16 listen_interval;
|
||||
struct {
|
||||
u16 association_id:14, reserved:2;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
u32 time_stamp[2];
|
||||
u16 reason;
|
||||
u16 status;
|
||||
|
@ -821,8 +824,7 @@ struct ieee80211_authentication {
|
|||
u16 transaction;
|
||||
u16 status;
|
||||
/* struct ieee80211_info_element_hdr info_element; */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
|
@ -830,27 +832,25 @@ struct ieee80211_probe_response {
|
|||
u16 beacon_interval;
|
||||
u16 capability;
|
||||
struct ieee80211_info_element info_element;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_probe_request {
|
||||
struct ieee80211_header_data header;
|
||||
/*struct ieee80211_info_element info_element;*/
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_assoc_request_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 listen_interval;
|
||||
/* u8 current_ap[ETH_ALEN]; */
|
||||
struct ieee80211_info_element_hdr info_element;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_assoc_response_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 status;
|
||||
u16 aid;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
|
@ -945,15 +945,15 @@ enum ieee80211_state {
|
|||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||
#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]));
|
||||
}
|
||||
|
||||
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) && \
|
||||
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
||||
return (addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
||||
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff);
|
||||
}
|
||||
|
||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||
|
@ -1048,7 +1048,6 @@ enum rtw_ieee80211_back_parties {
|
|||
RTW_WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
|
||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
#define WME_OUI_TYPE 2
|
||||
|
@ -1175,7 +1174,8 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
struct rtw_ieee802_11_elems *elems,
|
||||
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);
|
||||
|
||||
enum secondary_ch_offset {
|
||||
|
@ -1185,13 +1185,18 @@ enum secondary_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 *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_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_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
|
||||
u8 new_ch, u8 ch_switch_cnt);
|
||||
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_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, 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);
|
||||
u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui,
|
||||
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);
|
||||
|
||||
|
@ -1200,15 +1205,20 @@ 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_wpa2_cipher_suite(u8 *s);
|
||||
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_wpa2_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 *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_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_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content);
|
||||
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_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
|
||||
u8 *buf_content, uint *len_content);
|
||||
|
||||
/**
|
||||
* 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:
|
||||
*/
|
||||
#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_wps_ie(u8 *ie, u32 ie_len);
|
||||
|
@ -1225,10 +1236,14 @@ void dump_wps_ie(u8 *ie, u32 ie_len);
|
|||
#ifdef CONFIG_P2P
|
||||
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_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr, u32 *len_attr);
|
||||
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_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);
|
||||
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_content(u8 *p2p_ie, uint p2p_ielen, u8 target_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
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
#endif /* IEEE80211_H */
|
||||
|
|
|
@ -52,13 +52,13 @@ struct wpa_ie_hdr {
|
|||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct wme_ac_parameter {
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
|
@ -87,7 +87,7 @@ struct wme_ac_parameter {
|
|||
|
||||
/* bytes 3 & 4 */
|
||||
u16 txopLimit;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct wme_parameter_element {
|
||||
/* required fields for WME version 1 */
|
||||
|
@ -99,7 +99,7 @@ struct wme_parameter_element {
|
|||
u8 reserved;
|
||||
struct wme_ac_parameter ac[4];
|
||||
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
|
@ -186,33 +186,33 @@ struct ieee80211_mgmt {
|
|||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) auth;
|
||||
} __packed auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) deauth;
|
||||
} __packed deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_req;
|
||||
} __packed assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_resp, reassoc_resp;
|
||||
} __packed assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) reassoc_req;
|
||||
} __packed reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) disassoc;
|
||||
} __packed disassoc;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
|
@ -220,11 +220,11 @@ struct ieee80211_mgmt {
|
|||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) beacon;
|
||||
} __packed beacon;
|
||||
struct {
|
||||
/* only variable items: SSID, Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_req;
|
||||
} __packed probe_req;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
|
@ -232,7 +232,7 @@ struct ieee80211_mgmt {
|
|||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_resp;
|
||||
} __packed probe_resp;
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
|
@ -241,27 +241,27 @@ struct ieee80211_mgmt {
|
|||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) wme_action;
|
||||
} __packed wme_action;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} __attribute__ ((packed)) addba_req;
|
||||
} __packed addba_req;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} __attribute__ ((packed)) addba_resp;
|
||||
} __packed addba_resp;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) delba;
|
||||
struct{
|
||||
} __packed delba;
|
||||
structi {
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
|
@ -273,15 +273,15 @@ struct ieee80211_mgmt {
|
|||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) plink_action;
|
||||
} __packed plink_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) mesh_action;
|
||||
} __attribute__ ((packed)) u;
|
||||
} __attribute__ ((packed)) action;
|
||||
} __attribute__ ((packed)) u;
|
||||
}__attribute__ ((packed));
|
||||
} __packed mesh_action;
|
||||
} __packed u;
|
||||
} __packed action;
|
||||
} __packed u;
|
||||
} __packed;
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#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_X25 0x0805 /* CCITT X.25 */
|
||||
#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_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_DNA_DL 0x6001 /* DEC DNA Dump/Load */
|
||||
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
|
||||
|
@ -98,15 +98,15 @@ struct ethhdr
|
|||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define get_vlan_id(pvlan) ((ntohs((unsigned short )pvlan->h_vlan_TCI)) & 0xfff)
|
||||
#define get_vlan_priority(pvlan) ((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_id(pvlan) \
|
||||
((ntohs((unsigned short )pvlan->h_vlan_TCI)) & 0xfff)
|
||||
#define get_vlan_priority(pvlan) \
|
||||
((ntohs((unsigned short )pvlan->h_vlan_TCI))>>13)
|
||||
#define get_vlan_encap_proto(pvlan) \
|
||||
(ntohs((unsigned short)pvlan->h_vlan_encapsulated_proto))
|
||||
|
||||
#endif /* _LINUX_IF_ETHER_H */
|
||||
|
|
|
@ -37,8 +37,7 @@ struct rtw_wdev_invit_info {
|
|||
(invit_info)->rsp_op_ch = 0; \
|
||||
} while (0)
|
||||
|
||||
struct rtw_wdev_priv
|
||||
{
|
||||
struct rtw_wdev_priv {
|
||||
struct wireless_dev *rtw_wdev;
|
||||
|
||||
struct adapter *padapter;
|
||||
|
@ -47,7 +46,7 @@ struct rtw_wdev_priv
|
|||
spinlock_t scan_req_lock;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -62,9 +61,11 @@ struct rtw_wdev_priv
|
|||
|
||||
#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);
|
||||
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_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
|
||||
void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char *da, unsigned short reason);
|
||||
void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter,
|
||||
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 */
|
||||
|
||||
void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8 *buf, size_t len);
|
||||
void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter, 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);
|
||||
void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter,
|
||||
const u8 *buf, size_t len);
|
||||
void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter,
|
||||
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);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && !defined(COMPAT_KERNEL_RELEASE)
|
||||
#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)
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && \
|
||||
!defined(COMPAT_KERNEL_RELEASE)
|
||||
#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
|
||||
#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_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, bss, buf, len)
|
||||
#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_send_rx_assoc(dev, bss, buf, len) \
|
||||
cfg80211_send_rx_assoc(dev, bss, buf, len)
|
||||
#endif
|
||||
|
||||
#endif /* __IOCTL_CFG80211_H__ */
|
||||
|
|
17
include/ip.h
17
include/ip.h
|
@ -68,15 +68,6 @@
|
|||
#define IPVERSION 4
|
||||
#define MAXTTL 255
|
||||
#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_OLEN 1
|
||||
#define IPOPT_OFFSET 2
|
||||
|
@ -99,11 +90,11 @@ struct ip_options {
|
|||
unsigned char is_setbyuser:1, /* Set by setsockopt? */
|
||||
is_data:1, /* Options in __data, rather than skb*/
|
||||
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 */
|
||||
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_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 __pad1;
|
||||
unsigned char __pad2;
|
||||
|
@ -119,8 +110,6 @@ struct iphdr {
|
|||
#elif defined (__BIG_ENDIAN_BITFIELD)
|
||||
__u8 version:4,
|
||||
ihl:4;
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
__u8 tos;
|
||||
__u16 tot_len;
|
||||
|
|
|
@ -64,14 +64,12 @@
|
|||
#define OID_MP_SEG4 0xFF011100
|
||||
|
||||
#define DEBUG_OID(dbg, str) \
|
||||
if ((!dbg)) \
|
||||
{ \
|
||||
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_info_,("%s(%d): %s", __func__, __LINE__, str)); \
|
||||
if ((!dbg)) { \
|
||||
RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_, \
|
||||
("%s(%d): %s", __func__, __LINE__, str)); \
|
||||
}
|
||||
|
||||
|
||||
enum oid_type
|
||||
{
|
||||
enum oid_type {
|
||||
QUERY_OID,
|
||||
SET_OID
|
||||
};
|
||||
|
@ -99,11 +97,11 @@ struct oid_par_priv
|
|||
|
||||
struct oid_obj_priv {
|
||||
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_)
|
||||
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_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;
|
||||
#endif
|
||||
|
||||
extern NDIS_STATUS drv_query_info(
|
||||
struct net_device *MiniportAdapterContext,
|
||||
NDIS_OID Oid,
|
||||
void * InformationBuffer,
|
||||
u32 InformationBufferLength,
|
||||
u32* BytesWritten,
|
||||
u32* BytesNeeded
|
||||
);
|
||||
int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
|
||||
void *informationbuffer, u32 informationbufferlength,
|
||||
u32 *byteswritten, u32 *bytesneeded);
|
||||
|
||||
extern NDIS_STATUS drv_set_info(
|
||||
struct net_device *MiniportAdapterContext,
|
||||
NDIS_OID Oid,
|
||||
void * InformationBuffer,
|
||||
u32 InformationBufferLength,
|
||||
u32* BytesRead,
|
||||
u32* BytesNeeded
|
||||
);
|
||||
int drv_set_info(struct net_device *MiniportAdapterContext,
|
||||
NDIS_OID oid, void *informationbuffer,
|
||||
u32 informationbufferlength, u32 *bytesread,
|
||||
u32 *bytesneeded);
|
||||
|
||||
extern int ui_pid[3];
|
||||
|
||||
|
|
|
@ -24,57 +24,57 @@
|
|||
#include <drv_types.h>
|
||||
|
||||
/* oid_rtl_seg_01_01 ************** */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS oid_rt_get_tx_beacon_err_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_signal_quality_hdl(struct oid_par_priv* poid_par_priv);/* 84 */
|
||||
int oid_rt_get_small_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);
|
||||
int oid_rt_get_large_packet_crc_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_tx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_rx_retry_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_rx_total_packet_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_tx_beacon_ok_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 */
|
||||
NDIS_STATUS oid_rt_pro_set_fw_ra_state_hdl(struct oid_par_priv* poid_par_priv); /* 8b */
|
||||
int oid_rt_pro_set_fw_dig_state_hdl(struct oid_par_priv* poid_par_priv); /* 8a */
|
||||
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 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS oid_rt_scan_with_magic_packet_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_rx_icv_err_hdl(struct oid_par_priv* poid_par_priv);/* 93 */
|
||||
int oid_rt_set_encryption_algorithm_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_ap_ip_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_set_channelplan_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_set_preamble_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_set_bcn_intvl_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_dedicate_probe_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_total_tx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_current_tx_power_level_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_enc_key_mismatch_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);
|
||||
int oid_rt_get_channel_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_hardware_radio_off_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_key_mismatch_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_supported_wireless_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_channel_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_scan_in_progress_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_forced_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_wireless_mode_for_scan_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_get_bss_wireless_mode_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 ************** */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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_get_associated_station_list_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_ap_switch_into_ap_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_ap_supported_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 */
|
||||
NDIS_STATUS 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_write_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 ************** */
|
||||
NDIS_STATUS 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_get_connect_state_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_NOT_SUPPORTED (0xC00000BBL)
|
||||
|
||||
#define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
|
||||
#define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
|
||||
#define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
|
||||
#define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
|
||||
#define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
|
||||
#define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
|
||||
#define NDIS_STATUS_SUCCESS ((int)STATUS_SUCCESS)
|
||||
#define NDIS_STATUS_PENDING ((int)STATUS_PENDING)
|
||||
#define NDIS_STATUS_NOT_RECOGNIZED ((int)0x00010001L)
|
||||
#define NDIS_STATUS_NOT_COPIED ((int)0x00010002L)
|
||||
#define NDIS_STATUS_NOT_ACCEPTED ((int)0x00010003L)
|
||||
#define NDIS_STATUS_CALL_ACTIVE ((int)0x00010007L)
|
||||
|
||||
#define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
|
||||
#define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
|
||||
#define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
|
||||
#define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
|
||||
#define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
|
||||
#define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
|
||||
#define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
|
||||
#define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
|
||||
#define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
|
||||
#define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
|
||||
#define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
|
||||
#define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
|
||||
#define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
|
||||
#define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
|
||||
#define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
|
||||
#define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
|
||||
#define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
|
||||
#define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
|
||||
#define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
|
||||
#define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
|
||||
#define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
|
||||
#define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
|
||||
#define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
|
||||
#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
|
||||
#define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
|
||||
#define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
|
||||
#define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
|
||||
#define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
|
||||
#define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
|
||||
#define NDIS_STATUS_FAILURE ((int)STATUS_UNSUCCESSFUL)
|
||||
#define NDIS_STATUS_RESOURCES ((int)STATUS_INSUFFICIENT_RESOURCES)
|
||||
#define NDIS_STATUS_CLOSING ((int)0xC0010002L)
|
||||
#define NDIS_STATUS_BAD_VERSION ((int)0xC0010004L)
|
||||
#define NDIS_STATUS_BAD_CHARACTERISTICS ((int)0xC0010005L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_FOUND ((int)0xC0010006L)
|
||||
#define NDIS_STATUS_OPEN_FAILED ((int)0xC0010007L)
|
||||
#define NDIS_STATUS_DEVICE_FAILED ((int)0xC0010008L)
|
||||
#define NDIS_STATUS_MULTICAST_FULL ((int)0xC0010009L)
|
||||
#define NDIS_STATUS_MULTICAST_EXISTS ((int)0xC001000AL)
|
||||
#define NDIS_STATUS_MULTICAST_NOT_FOUND ((int)0xC001000BL)
|
||||
#define NDIS_STATUS_REQUEST_ABORTED ((int)0xC001000CL)
|
||||
#define NDIS_STATUS_RESET_IN_PROGRESS ((int)0xC001000DL)
|
||||
#define NDIS_STATUS_CLOSING_INDICATING ((int)0xC001000EL)
|
||||
#define NDIS_STATUS_NOT_SUPPORTED ((int)STATUS_NOT_SUPPORTED)
|
||||
#define NDIS_STATUS_INVALID_PACKET ((int)0xC001000FL)
|
||||
#define NDIS_STATUS_OPEN_LIST_FULL ((int)0xC0010010L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_READY ((int)0xC0010011L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_OPEN ((int)0xC0010012L)
|
||||
#define NDIS_STATUS_NOT_INDICATING ((int)0xC0010013L)
|
||||
#define NDIS_STATUS_INVALID_LENGTH ((int)0xC0010014L)
|
||||
#define NDIS_STATUS_INVALID_DATA ((int)0xC0010015L)
|
||||
#define NDIS_STATUS_BUFFER_TOO_SHORT ((int)0xC0010016L)
|
||||
#define NDIS_STATUS_INVALID_OID ((int)0xC0010017L)
|
||||
#define NDIS_STATUS_ADAPTER_REMOVED ((int)0xC0010018L)
|
||||
#define NDIS_STATUS_UNSUPPORTED_MEDIA ((int)0xC0010019L)
|
||||
#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((int)0xC001001AL)
|
||||
#define NDIS_STATUS_FILE_NOT_FOUND ((int)0xC001001BL)
|
||||
#define NDIS_STATUS_ERROR_READING_FILE ((int)0xC001001CL)
|
||||
#define NDIS_STATUS_ALREADY_MAPPED ((int)0xC001001DL)
|
||||
#define NDIS_STATUS_RESOURCE_CONFLICT ((int)0xC001001EL)
|
||||
#define NDIS_STATUS_NO_CABLE ((int)0xC001001FL)
|
||||
|
||||
#define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
|
||||
#define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
|
||||
#define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
|
||||
#define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
|
||||
#define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L) /* cause 27 */
|
||||
#define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L) /* cause 35,45 */
|
||||
#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L) /* cause 37 */
|
||||
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */
|
||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */
|
||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */
|
||||
#define NDIS_STATUS_INVALID_SAP ((int)0xC0010020L)
|
||||
#define NDIS_STATUS_SAP_IN_USE ((int)0xC0010021L)
|
||||
#define NDIS_STATUS_INVALID_ADDRESS ((int)0xC0010022L)
|
||||
#define NDIS_STATUS_VC_NOT_ACTIVATED ((int)0xC0010023L)
|
||||
#define NDIS_STATUS_DEST_OUT_OF_ORDER ((int)0xC0010024L) /* cause 27 */
|
||||
#define NDIS_STATUS_VC_NOT_AVAILABLE ((int)0xC0010025L) /* cause 35,45 */
|
||||
#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((int)0xC0010026L) /* cause 37 */
|
||||
#define NDIS_STATUS_INCOMPATABLE_QOS ((int)0xC0010027L) /* cause 49 */
|
||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((int)0xC0010028L) /* cause 93 */
|
||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((int)0xC0010029L) /* cause 3 */
|
||||
|
||||
enum antenna_path {
|
||||
ANTENNA_NONE = 0x00,
|
||||
|
|
|
@ -69,106 +69,91 @@ struct dr_variable_struct {
|
|||
#define _irqlevel_changed_(a, b)
|
||||
|
||||
/* oid_rtl_seg_81_80_00 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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_data_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_antenna_bb_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 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS oid_rt_pro_query_rx_packet_crc32_error_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);
|
||||
NDIS_STATUS oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv* poid_par_priv);
|
||||
NDIS_STATUS oid_rt_pro_set_modulation_hdl(struct oid_par_priv* poid_par_priv);
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_continuous_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);
|
||||
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);
|
||||
|
||||
int oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_query_rx_packet_received_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);
|
||||
int 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);
|
||||
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);
|
||||
int oid_rt_pro_set_carrier_suppression_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);
|
||||
|
||||
/* oid_rtl_seg_81_87 */
|
||||
NDIS_STATUS 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);
|
||||
|
||||
NDIS_STATUS oid_rt_pro_write_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);
|
||||
|
||||
int oid_rt_pro_write_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);
|
||||
int oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
/* 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 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_write16_eeprom_hdl (struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_rf_intfs_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 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv* poid_par_priv);
|
||||
int oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_read_tssi_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 */
|
||||
NDIS_STATUS 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_qry_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 */
|
||||
NDIS_STATUS 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_set_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 */
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS 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);
|
||||
NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv* poid_par_priv);
|
||||
|
||||
NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv* poid_par_priv);
|
||||
NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv* poid_par_priv);
|
||||
NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv* poid_par_priv);
|
||||
NDIS_STATUS oid_rt_get_efuse_max_size_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);
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv* poid_par_priv);
|
||||
|
||||
NDIS_STATUS oid_rt_get_thermal_meter_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);
|
||||
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);
|
||||
int oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_add_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);
|
||||
int oid_rt_pro_query_dr_variable_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);
|
||||
int 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);
|
||||
int 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);
|
||||
int 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);
|
||||
int oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv);
|
||||
int oid_rt_pro_set_pkt_test_mode_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);
|
||||
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);
|
||||
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);
|
||||
int oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
#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_rt_pro_set_data_rate_hdl}, /* 0x01 */
|
||||
{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}, /* 0x1E OID_RT_PRO_READ_CIS_DATA */
|
||||
{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}, /* 0x21 OID_RT_PRO_WRITE_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}, /* 0x2E OID_RT_PRO_READ_EEPROM_BYTE */
|
||||
{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}, /* 0x41 */
|
||||
{1, &oid_null_function}, /* 0x42 */
|
||||
|
@ -235,21 +216,17 @@ static const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
|||
{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}, /* 0x81 OID_RT_RF_OFF */
|
||||
{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 */
|
||||
};
|
||||
|
||||
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_rt_pro_write_bb_reg_hdl}, /* 0x81 */
|
||||
{1, &oid_rt_pro_read_bb_reg_hdl}, /* 0x82 */
|
||||
|
@ -257,8 +234,7 @@ static struct oid_obj_priv oid_rtl_seg_81_87[] =
|
|||
{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_pro_read_register_hdl}, /* 0x01 */
|
||||
{1, &oid_rt_pro_write_register_hdl}, /* 0x02 */
|
||||
|
@ -293,8 +269,7 @@ static struct oid_obj_priv oid_rtl_seg_87_11_00[] =
|
|||
{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_set_data_rate_ex_hdl}, /* 0x21 */
|
||||
{1, &oid_rt_pro_set_basic_rate_hdl}, /* 0x22 */
|
||||
|
@ -302,25 +277,20 @@ static struct oid_obj_priv oid_rtl_seg_87_11_20[] =
|
|||
{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 */
|
||||
};
|
||||
|
||||
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 */
|
||||
};
|
||||
|
||||
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 */
|
||||
};
|
||||
|
||||
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}, /* 0xF1 */
|
||||
{1, &oid_null_function}, /* 0xF2 */
|
||||
|
@ -337,11 +307,9 @@ static struct oid_obj_priv oid_rtl_seg_87_11_F0[] =
|
|||
{1, &oid_null_function}, /* 0xFD */
|
||||
{1, &oid_null_function}, /* 0xFE OID_RT_PRO_H2C_C2H_LBK_TEST */
|
||||
{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_add_sta_info_hdl}, /* 0x01 S */
|
||||
{1, &oid_rt_pro_dele_sta_info_hdl}, /* 0x02 S */
|
||||
|
@ -379,22 +347,15 @@ struct bbreg_param{
|
|||
u32 phymask;
|
||||
u32 value;
|
||||
};
|
||||
/*
|
||||
struct rfchannel_param{
|
||||
u32 ch;
|
||||
u32 modem;
|
||||
};
|
||||
*/
|
||||
|
||||
struct txpower_param {
|
||||
u32 pwr_index;
|
||||
};
|
||||
|
||||
|
||||
struct datarate_param {
|
||||
u32 rate_index;
|
||||
};
|
||||
|
||||
|
||||
struct rfintfs_parm {
|
||||
u32 rfintfs;
|
||||
};
|
||||
|
@ -425,7 +386,7 @@ struct eeprom_rw_param {
|
|||
|
||||
struct mp_ioctl_handler {
|
||||
u32 paramsize;
|
||||
u32 (*handler)(struct oid_par_priv* poid_par_priv);
|
||||
s32 (*handler)(struct oid_par_priv* poid_par_priv);
|
||||
u32 oid;
|
||||
};
|
||||
|
||||
|
@ -476,55 +437,53 @@ enum RTL871X_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 EXT_MP_IOCTL_HANDLER(sz, subcode, oid) {sz, mp_ioctl_ ## subcode ## _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},
|
||||
|
||||
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_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_read_register_hdl, OID_RT_PRO_READ_REGISTER)
|
||||
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_MP_IOCTL_HANDLER(sizeof(struct rwreg_param), oid_rt_pro_write_register_hdl, OID_RT_PRO_WRITE_REGISTER)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_read_bb_reg_hdl, OID_RT_PRO_READ_BB_REG)
|
||||
/*5*/ GEN_MP_IOCTL_HANDLER(sizeof(struct bb_reg_param), oid_rt_pro_write_bb_reg_hdl, OID_RT_PRO_WRITE_BB_REG)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_read_rf_reg_hdl, OID_RT_PRO_RF_READ_REGISTRY)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(struct rf_reg_param), oid_rt_pro_write_rf_reg_hdl, OID_RT_PRO_RF_WRITE_REGISTRY)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_channel_direct_call_hdl, OID_RT_PRO_SET_CHANNEL_DIRECT_CALL)
|
||||
GEN_HANDLER(sizeof(struct txpower_param), oid_rt_pro_set_tx_power_control_hdl, OID_RT_PRO_SET_TX_POWER_CONTROL)
|
||||
/*10*/ GEN_HANDLER(sizeof(u32), oid_rt_pro_set_data_rate_hdl, OID_RT_PRO_SET_DATA_RATE)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_set_bandwidth_hdl, OID_RT_SET_BANDWIDTH)
|
||||
GEN_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_channel_direct_call_hdl, OID_RT_PRO_SET_CHANNEL_DIRECT_CALL)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(struct txpower_param), oid_rt_pro_set_tx_power_control_hdl, OID_RT_PRO_SET_TX_POWER_CONTROL)
|
||||
/*10*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_set_data_rate_hdl, OID_RT_PRO_SET_DATA_RATE)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_set_bandwidth_hdl, OID_RT_SET_BANDWIDTH)
|
||||
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)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_continuous_tx_hdl, OID_RT_PRO_SET_CONTINUOUS_TX)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_pro_set_single_carrier_tx_hdl, OID_RT_PRO_SET_SINGLE_CARRIER_TX)
|
||||
/*15*/ GEN_HANDLER(sizeof(u32), oid_rt_pro_set_carrier_suppression_tx_hdl, OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX)
|
||||
GEN_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)
|
||||
|
||||
GEN_MP_IOCTL_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)
|
||||
/*20*/ GEN_MP_IOCTL_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_set_rx_packet_type_hdl, OID_RT_SET_RX_PACKET_TYPE)
|
||||
GEN_HANDLER(0, oid_rt_reset_phy_rx_packet_count_hdl, OID_RT_RESET_PHY_RX_PACKET_COUNT)
|
||||
/*20*/ GEN_HANDLER(sizeof(u32), oid_rt_get_phy_rx_packet_received_hdl, OID_RT_GET_PHY_RX_PACKET_RECEIVED)
|
||||
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_MP_IOCTL_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)
|
||||
/*25*/ GEN_MP_IOCTL_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_MP_IOCTL_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(struct eeprom_rw_param), NULL, 0)
|
||||
GEN_HANDLER(sizeof(struct eeprom_rw_param), NULL, 0)
|
||||
GEN_HANDLER(sizeof(struct efuse_access_struct), oid_rt_pro_efuse_hdl, OID_RT_PRO_EFUSE)
|
||||
/*25*/ GEN_HANDLER(0, oid_rt_pro_efuse_map_hdl, OID_RT_PRO_EFUSE_MAP)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_get_efuse_max_size_hdl, OID_RT_GET_EFUSE_MAX_SIZE)
|
||||
GEN_HANDLER(sizeof(u32), oid_rt_get_efuse_current_size_hdl, OID_RT_GET_EFUSE_CURRENT_SIZE)
|
||||
|
||||
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
|
||||
|
|
|
@ -256,10 +256,7 @@
|
|||
#define rOFDM0_TxCoeff5 0xcb4
|
||||
#define rOFDM0_TxCoeff6 0xcb8
|
||||
|
||||
|
||||
/* */
|
||||
/* 7. PageD(0xD00) */
|
||||
/* */
|
||||
#define rOFDM1_LSTF 0xd00
|
||||
#define rOFDM1_TRxPathEnable 0xd04
|
||||
|
||||
|
@ -341,7 +338,6 @@
|
|||
|
||||
/* */
|
||||
/* RL6052 Register definition */
|
||||
/* */
|
||||
#define RF_AC 0x00 /* */
|
||||
|
||||
#define RF_IQADJ_G1 0x01 /* */
|
||||
|
@ -395,7 +391,6 @@
|
|||
#define RF_SYN_G8 0x2C /* RF TX Power control */
|
||||
|
||||
#define RF_RCK_OS 0x30 /* RF TX PA control */
|
||||
|
||||
#define RF_TXPA_G1 0x31 /* RF TX PA control */
|
||||
#define RF_TXPA_G2 0x32 /* RF TX PA control */
|
||||
#define RF_TXPA_G3 0x33 /* RF TX PA control */
|
||||
|
@ -530,13 +525,15 @@
|
|||
#define bLSIG_Parity 0x20
|
||||
#define bCCKRxPhase 0x4
|
||||
#if (RTL92SE_FPGA_VERIFY == 1)
|
||||
#define bLSSIReadAddress 0x3f000000 /* LSSI "Read" Address Reg 0x824 rFPGA0_XA_HSSIParameter2 */
|
||||
#define bLSSIReadAddress 0x3f000000 /* LSSI "Read" Address
|
||||
Reg 0x824 rFPGA0_XA_HSSIParameter2 */
|
||||
#else
|
||||
#define bLSSIReadAddress 0x7f800000 /* T65 RF */
|
||||
#endif
|
||||
#define bLSSIReadEdge 0x80000000 /* LSSI "Read" edge signal */
|
||||
#if (RTL92SE_FPGA_VERIFY == 1)
|
||||
#define bLSSIReadBackData 0xfff /* Reg 0x8a0 rFPGA0_XA_LSSIReadBack */
|
||||
#define bLSSIReadBackData 0xfff /* Reg 0x8a0
|
||||
rFPGA0_XA_LSSIReadBack */
|
||||
#else
|
||||
#define bLSSIReadBackData 0xfffff /* T65 RF */
|
||||
#endif
|
||||
|
@ -555,12 +552,14 @@
|
|||
#define bDA6DebugMode 0x20000
|
||||
#define bDA6Swing 0x380000
|
||||
|
||||
#define bADClkPhase 0x4000000 /* Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
|
||||
#define bADClkPhase 0x4000000 /* Reg 0x880
|
||||
rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
|
||||
|
||||
#define b80MClkDelay 0x18000000 /* Useless */
|
||||
#define bAFEWatchDogEnable 0x20000000
|
||||
|
||||
#define bXtalCap01 0xc0000000 /* Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap */
|
||||
#define bXtalCap01 0xc0000000 /* Reg 0x884
|
||||
rFPGA0_AnalogParameter2 Crystal cap */
|
||||
#define bXtalCap23 0x3
|
||||
#define bXtalCap92x 0x0f000000
|
||||
#define bXtalCap 0x0f000000
|
||||
|
@ -603,7 +602,8 @@
|
|||
#define bOFDMTxSC 0x30000000 /* Useless */
|
||||
#define bCCKTxOn 0x1
|
||||
#define bOFDMTxOn 0x2
|
||||
#define bDebugPage 0xfff /* reset debug page and also HWord, LWord */
|
||||
#define bDebugPage 0xfff /* reset debug page and HWord,
|
||||
* LWord */
|
||||
#define bDebugItem 0xff /* reset debug page and LWord */
|
||||
#define bAntL 0x10
|
||||
#define bAntNonHT 0x100
|
||||
|
@ -617,7 +617,7 @@
|
|||
#define bCCKTxPowerSaving 0x80
|
||||
#define bCCKRxPowerSaving 0x40
|
||||
|
||||
#define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0_System 20/40 switch */
|
||||
#define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0 20/40 sw */
|
||||
|
||||
#define bCCKScramble 0x8 /* Useless */
|
||||
#define bCCKAntDiversity 0x8000
|
||||
|
@ -649,12 +649,11 @@
|
|||
#define bCCKRxIG 0x7f00
|
||||
#define bCCKLNAPolarity 0x800000
|
||||
#define bCCKRx1stGain 0x7f0000
|
||||
#define bCCKRFExtend 0x20000000 /* CCK Rx Iinital gain polarity */
|
||||
#define bCCKRFExtend 0x20000000 /* CCK Rx init gain polar */
|
||||
#define bCCKRxAGCSatLevel 0x1f000000
|
||||
#define bCCKRxAGCSatCount 0xe0
|
||||
#define bCCKRxRFSettle 0x1f /* AGCsamp_dly */
|
||||
#define bCCKFixedRxAGC 0x8000
|
||||
/* define bCCKRxAGCFormat 0x4000 remove to HSSI register 0x824 */
|
||||
#define bCCKAntennaPolarity 0x2000
|
||||
#define bCCKTxFilterType 0x0c00
|
||||
#define bCCKRxAGCReportType 0x0300
|
||||
|
@ -795,8 +794,8 @@
|
|||
#define bRxHP_BBP1 0x7000
|
||||
#define bRxHP_BBP2 0x70000
|
||||
#define bRxHP_BBP3 0x700000
|
||||
#define bRSSI_H 0x7f0000 /* the threshold for high power */
|
||||
#define bRSSI_Gen 0x7f000000 /* the threshold for ant diversity */
|
||||
#define bRSSI_H 0x7f0000 /* thresh for hi power */
|
||||
#define bRSSI_Gen 0x7f000000 /* thresh for ant div */
|
||||
#define bRxSettle_TRSW 0x7
|
||||
#define bRxSettle_LNA 0x38
|
||||
#define bRxSettle_RSSI 0x1c0
|
||||
|
@ -1023,16 +1022,12 @@
|
|||
|
||||
/* for PutRFRegsetting & GetRFRegSetting BitMask */
|
||||
#if (RTL92SE_FPGA_VERIFY == 1)
|
||||
/* define bMask12Bits 0xfff RF Reg mask bits */
|
||||
/* define bMask20Bits 0xfff RF Reg mask bits T65 RF */
|
||||
#define bRFRegOffsetMask 0xfff
|
||||
#else
|
||||
/* define bMask12Bits 0xfffff RF Reg mask bits */
|
||||
/* define bMask20Bits 0xfffff RF Reg mask bits T65 RF */
|
||||
#define bRFRegOffsetMask 0xfffff
|
||||
#endif
|
||||
#define bEnable 0x1 /* Useless */
|
||||
#define bDisable 0x0
|
||||
#define bDisabl 0x0
|
||||
|
||||
#define LeftAntenna 0x0 /* Useless */
|
||||
#define RightAntenna 0x1
|
||||
|
@ -1080,7 +1075,8 @@
|
|||
#define RCR_ENMARP BIT(28) /* enable mac auto reset phy */
|
||||
#define RCR_EnCS1 BIT(29) /* enable carrier sense method 1 */
|
||||
#define RCR_EnCS2 BIT(30) /* enable carrier sense method 2 */
|
||||
#define RCR_OnlyErlPkt BIT(31) /* Rx Early mode is performed for packet size greater than 1536 */
|
||||
#define RCR_OnlyErlPkt BIT(31) /* Rx Early mode is performed for
|
||||
* packet size greater than 1536 */
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
|
||||
|
|
|
@ -24,77 +24,94 @@
|
|||
|
||||
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_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, 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_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||
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 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
||||
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len, struct sta_info *psta);
|
||||
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);
|
||||
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||
u8 *pframe, uint len);
|
||||
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo,
|
||||
u8 *pframe, uint len, struct sta_info *psta);
|
||||
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_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
||||
u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
||||
u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pframe, uint len );
|
||||
u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
|
||||
|
||||
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType);
|
||||
|
||||
void process_p2p_ps_ie(struct adapter * padapter, u8 *IEs, u32 IELength);
|
||||
u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo,
|
||||
u8 *pframe, uint len);
|
||||
u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo,
|
||||
u8 *pframe, uint len);
|
||||
u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo,
|
||||
u8 *pframe, uint len);
|
||||
u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||
uint len);
|
||||
void p2p_protocol_wk_hdl(struct adapter *padapter, int intcmdtype);
|
||||
void process_p2p_ps_ie(struct adapter *padapter, u8 *ies, u32 ielength);
|
||||
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state);
|
||||
u8 p2p_ps_wk_cmd(struct adapter *padapter, u8 p2p_ps_state, u8 enqueue);
|
||||
|
||||
void reset_global_wifidirect_info(struct adapter *padapter);
|
||||
int rtw_init_wifi_display_info(struct adapter *padapter);
|
||||
void rtw_init_wifidirect_timers(struct adapter *padapter);
|
||||
void rtw_init_wifidirect_addrs(struct adapter* padapter, u8 *dev_addr, u8 *iface_addr);
|
||||
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);
|
||||
|
||||
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) {
|
||||
/* wdinfo->pre_p2p_state = wdinfo->p2p_state; */
|
||||
if (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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int _rtw_p2p_state(struct wifidirect_info *wdinfo)
|
||||
{
|
||||
return wdinfo->p2p_state;
|
||||
}
|
||||
|
||||
static inline int _rtw_p2p_pre_state(struct wifidirect_info *wdinfo)
|
||||
{
|
||||
return wdinfo->pre_p2p_state;
|
||||
}
|
||||
|
||||
static inline int _rtw_p2p_role(struct wifidirect_info *wdinfo)
|
||||
{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
#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_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_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? */
|
||||
#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? */
|
||||
#define rtw_p2p_findphase_ex_is_needed(wdinfo) \
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#define FW_PWR1 1
|
||||
#define FW_PWR2 2
|
||||
#define FW_PWR3 3
|
||||
|
||||
|
||||
#define HW_PWR0 7
|
||||
#define HW_PWR1 6
|
||||
#define HW_PWR2 2
|
||||
|
@ -37,15 +35,12 @@
|
|||
|
||||
#define FW_PWRMSK 0x7
|
||||
|
||||
|
||||
#define XMIT_ALIVE BIT(0)
|
||||
#define RECV_ALIVE BIT(1)
|
||||
#define CMD_ALIVE BIT(2)
|
||||
#define EVT_ALIVE BIT(3)
|
||||
|
||||
|
||||
enum Power_Mgnt
|
||||
{
|
||||
enum power_mgnt {
|
||||
PS_MODE_ACTIVE = 0,
|
||||
PS_MODE_MIN,
|
||||
PS_MODE_MAX,
|
||||
|
@ -60,10 +55,10 @@ enum Power_Mgnt
|
|||
PS_MODE_NUM
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
|
@ -92,36 +87,32 @@ enum Power_Mgnt
|
|||
#define PS_STATE_S3 (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_ACTIVE(x) ((x) & (PS_ST_ACTIVE))
|
||||
#define CLR_PS_STATE(x) ((x) = ((x) & (0xF0)))
|
||||
|
||||
|
||||
struct reportpwrstate_parm {
|
||||
unsigned char mode;
|
||||
unsigned char state; /* the CPWM value */
|
||||
unsigned short rsvd;
|
||||
};
|
||||
|
||||
__inline static void _init_pwrlock(struct semaphore *plock)
|
||||
static inline void _init_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_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);
|
||||
}
|
||||
|
||||
|
||||
__inline static void _enter_pwrlock(struct semaphore *plock)
|
||||
static inline void _enter_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_rtw_down_sema(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static void _exit_pwrlock(struct semaphore *plock)
|
||||
static inline void _exit_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_rtw_up_sema(plock);
|
||||
}
|
||||
|
@ -145,17 +136,21 @@ enum rt_rf_power_state {
|
|||
#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_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_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_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R if no packet is received or transmittd. */
|
||||
#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT(6) /* Always enable ASPM and Clock
|
||||
* Req in initialization. */
|
||||
#define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R
|
||||
* if no packet is RX or TX. */
|
||||
#define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */
|
||||
|
||||
#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)
|
||||
|
||||
#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_ {
|
||||
PSBBREG_RF0 = 0,
|
||||
|
@ -171,11 +166,11 @@ enum { /* for ips_mode */
|
|||
IPS_LEVEL_2,
|
||||
};
|
||||
|
||||
struct pwrctrl_priv
|
||||
{
|
||||
struct pwrctrl_priv {
|
||||
struct semaphore lock;
|
||||
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 cpwm_tog; /* toggling */
|
||||
|
||||
|
@ -199,10 +194,11 @@ struct pwrctrl_priv
|
|||
uint ips_leave_cnts;
|
||||
|
||||
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;
|
||||
u32 ips_deny_time; /* will deny IPS when system time is smaller than this */
|
||||
u8 ps_processing; /* temporarily used to mark whether in rtw_ps_processor */
|
||||
u32 ips_deny_time; /* will deny IPS when system time less than this */
|
||||
u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */
|
||||
|
||||
u8 bLeisurePs;
|
||||
u8 LpsIdleCount;
|
||||
|
@ -213,7 +209,6 @@ struct pwrctrl_priv
|
|||
s32 pnp_current_pwr_state;
|
||||
u8 pnp_bstop_trx;
|
||||
|
||||
|
||||
u8 bInternalAutoSuspend;
|
||||
u8 bInSuspend;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|
@ -251,7 +246,7 @@ struct pwrctrl_priv
|
|||
(pwrctrlpriv)->ips_mode_req
|
||||
|
||||
#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
|
||||
|
||||
|
@ -260,32 +255,38 @@ struct pwrctrl_priv
|
|||
_set_timer(&(pwrctrlpriv)->pwr_state_check_timer, (ms)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_set_pwr_state_check_timer(pwrctrlpriv) \
|
||||
_rtw_set_pwr_state_check_timer((pwrctrlpriv), (pwrctrlpriv)->pwr_state_check_interval)
|
||||
#define rtw_set_pwr_state_check_timer(pwrctrl) \
|
||||
_rtw_set_pwr_state_check_timer((pwrctrl), \
|
||||
(pwrctrl)->pwr_state_check_interval)
|
||||
|
||||
extern void rtw_init_pwrctrl_priv(struct adapter *adapter);
|
||||
extern void rtw_free_pwrctrl_priv(struct adapter * adapter);
|
||||
void rtw_init_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);
|
||||
extern void rtw_set_rpwm(struct adapter * padapter, u8 val8);
|
||||
extern void LeaveAllPowerSaveMode(struct adapter * Adapter);
|
||||
void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps,
|
||||
u8 bcn_ant_mode);
|
||||
void rtw_set_rpwm(struct adapter *adapter, u8 val8);
|
||||
void LeaveAllPowerSaveMode(struct adapter *adapter);
|
||||
void ips_enter(struct adapter *padapter);
|
||||
int ips_leave(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);
|
||||
void LPS_Enter(struct adapter * padapter);
|
||||
void LPS_Leave(struct adapter * padapter);
|
||||
s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms);
|
||||
void LPS_Enter(struct adapter *adapter);
|
||||
void LPS_Leave(struct adapter *adapter);
|
||||
|
||||
u8 rtw_interface_ps_func(struct adapter *padapter,enum hal_intf_ps_func efunc_id,u8* val);
|
||||
void rtw_set_ips_deny(struct adapter *padapter, u32 ms);
|
||||
int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *caller);
|
||||
#define rtw_pwr_wakeup(adapter) _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 *padapter, u8 mode);
|
||||
int rtw_pm_set_lps(struct adapter *padapter, u8 mode);
|
||||
u8 rtw_interface_ps_func(struct adapter *adapter,
|
||||
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||
void rtw_set_ips_deny(struct adapter *adapter, u32 ms);
|
||||
int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms,
|
||||
const char *caller);
|
||||
#define rtw_pwr_wakeup(adapter) \
|
||||
_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_ */
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
#include <osdep_service.h>
|
||||
|
||||
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_ */
|
||||
|
|
|
@ -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_DDP[2] = {0x80, 0x9b};
|
||||
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_rfc1042[] = {0x00,0x00,0x00};
|
||||
|
||||
#define MAX_SUBFRAME_COUNT 64
|
||||
static u8 rtw_rfc1042_header[] =
|
||||
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
|
||||
static u8 rtw_rfc1042_header[] = {
|
||||
0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
|
||||
};
|
||||
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
|
||||
static u8 rtw_bridge_tunnel_header[] =
|
||||
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
|
||||
static u8 rtw_bridge_tunnel_header[] = {
|
||||
0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
|
||||
};
|
||||
|
||||
/* for Rx reordering buffer control */
|
||||
struct recv_reorder_ctrl
|
||||
{
|
||||
struct recv_reorder_ctrl {
|
||||
struct adapter *padapter;
|
||||
u8 enable;
|
||||
u16 indicate_seq;/* wstart_b, init_value=0xffff */
|
||||
|
@ -86,7 +88,6 @@ struct stainfo_rxcache {
|
|||
*/
|
||||
};
|
||||
|
||||
|
||||
struct smooth_rssi_data {
|
||||
u32 elements[100]; /* array to store values */
|
||||
u32 index; /* index to current array to store */
|
||||
|
@ -107,7 +108,9 @@ struct phy_info {
|
|||
u8 RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; /* EVM */
|
||||
u8 RxMIMOSignalStrength[MAX_PATH_NUM_92CS];/* in 0~100 index */
|
||||
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 SignalStrength; /* in 0-100 index. */
|
||||
u8 RxPwr[MAX_PATH_NUM_92CS];/* per-path's pwdb */
|
||||
|
@ -132,7 +135,8 @@ struct rx_pkt_attrib {
|
|||
u8 order;
|
||||
u8 privacy; /* in frame_ctrl field */
|
||||
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 icv_len;
|
||||
u8 crc_err;
|
||||
|
@ -184,13 +188,13 @@ struct recv_stat {
|
|||
#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) ;
|
||||
|
||||
using enter_critical section to protect
|
||||
*/
|
||||
struct recv_priv
|
||||
{
|
||||
struct recv_priv {
|
||||
spinlock_t lock;
|
||||
struct __queue free_recv_queue;
|
||||
struct __queue recv_pending_queue;
|
||||
|
@ -239,29 +243,24 @@ struct recv_priv
|
|||
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 {
|
||||
|
||||
spinlock_t lock;
|
||||
int option;
|
||||
struct __queue defrag_q; /* keeping the fragment frame until defrag */
|
||||
struct stainfo_rxcache rxcache;
|
||||
};
|
||||
|
||||
struct recv_buf
|
||||
{
|
||||
struct recv_buf {
|
||||
struct list_head list;
|
||||
|
||||
spinlock_t recvbuf_lock;
|
||||
|
||||
u32 ref_cnt;
|
||||
|
||||
struct adapter *adapter;
|
||||
|
||||
u8 *pbuf;
|
||||
u8 *pallocated_buf;
|
||||
|
||||
u32 len;
|
||||
u8 *phead;
|
||||
u8 *pdata;
|
||||
|
@ -270,14 +269,12 @@ struct recv_buf
|
|||
struct urb *purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
struct sk_buff *pskb;
|
||||
u8 reuse;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
head ----->
|
||||
|
||||
|
@ -293,95 +290,74 @@ struct recv_buf
|
|||
len = (unsigned int )(tail - data);
|
||||
|
||||
*/
|
||||
struct recv_frame_hdr
|
||||
{
|
||||
struct recv_frame_hdr {
|
||||
struct list_head list;
|
||||
struct sk_buff *pkt;
|
||||
struct sk_buff *pkt_newalloc;
|
||||
|
||||
struct adapter *adapter;
|
||||
|
||||
u8 fragcnt;
|
||||
|
||||
int frame_tag;
|
||||
|
||||
struct rx_pkt_attrib attrib;
|
||||
|
||||
uint len;
|
||||
u8 *rx_head;
|
||||
u8 *rx_data;
|
||||
u8 *rx_tail;
|
||||
u8 *rx_end;
|
||||
|
||||
void *precvbuf;
|
||||
|
||||
|
||||
/* */
|
||||
struct sta_info *psta;
|
||||
|
||||
/* for A-MPDU Rx reordering buffer control */
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
};
|
||||
|
||||
union recv_frame {
|
||||
|
||||
union {
|
||||
struct list_head list;
|
||||
struct recv_frame_hdr hdr;
|
||||
uint mem[RECVFRAME_HDR_ALIGN>>2];
|
||||
} u;
|
||||
|
||||
/* uint mem[MAX_RXSZ>>2]; */
|
||||
|
||||
};
|
||||
|
||||
|
||||
extern union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
|
||||
extern union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
|
||||
extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv);
|
||||
extern int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_queue);
|
||||
|
||||
union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
||||
union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
||||
void rtw_init_recvframe(union recv_frame *precvframe,
|
||||
struct recv_priv *precvpriv);
|
||||
int rtw_free_recvframe(union recv_frame *precvframe,
|
||||
struct __queue *pfree_recv_queue);
|
||||
#define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
|
||||
extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||
extern int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||
|
||||
extern void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue);
|
||||
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,
|
||||
struct __queue *pfree_recv_queue);
|
||||
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(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
||||
|
||||
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... */
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
__inline static u8 *get_recvframe_data(union recv_frame *precvframe)
|
||||
static inline u8 *get_recvframe_data(union recv_frame *precvframe)
|
||||
{
|
||||
|
||||
/* alwasy return rx_data */
|
||||
/* always return rx_data */
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
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 */
|
||||
|
||||
|
@ -390,53 +366,39 @@ __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
|
||||
* start. rx_data must be still larger than rx_head, after pushing.
|
||||
*/
|
||||
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
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 ;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
precvframe->u.hdr.len +=sz;
|
||||
|
||||
return precvframe->u.hdr.rx_data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, int sz)
|
||||
static inline u8 *recvframe_pull(union recv_frame *precvframe, int sz)
|
||||
{
|
||||
/* 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)
|
||||
return NULL;
|
||||
|
||||
|
||||
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;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
precvframe->u.hdr.len -= sz;
|
||||
|
||||
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. */
|
||||
|
||||
if (precvframe == NULL)
|
||||
|
@ -452,33 +414,26 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
|||
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) */
|
||||
|
||||
/* 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. */
|
||||
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
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;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
precvframe->u.hdr.len -= sz;
|
||||
|
||||
return precvframe->u.hdr.rx_tail;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
__inline static unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
||||
static inline unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
||||
{
|
||||
unsigned char *buf_desc;
|
||||
|
||||
|
@ -487,20 +442,17 @@ __inline static unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
|||
return buf_desc;
|
||||
}
|
||||
|
||||
|
||||
__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||
static inline 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 */
|
||||
/* from any given member of recv_frame. */
|
||||
/* rxmem indicates the any member/address in recv_frame */
|
||||
|
||||
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;
|
||||
union recv_frame *precv_frame;
|
||||
precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
|
||||
|
@ -508,49 +460,45 @@ __inline static union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
|
|||
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 */
|
||||
|
||||
union recv_frame *precv_frame = pkt_to_recvframe(pkt);
|
||||
|
||||
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 */
|
||||
|
||||
union recv_frame *precv_frame =pkt_to_recvframe(pkt);
|
||||
|
||||
return precv_frame->u.hdr.rx_data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
__inline static int get_recvframe_len(union recv_frame *precvframe)
|
||||
static inline int get_recvframe_len(union recv_frame *precvframe)
|
||||
{
|
||||
return precvframe->u.hdr.len;
|
||||
}
|
||||
|
||||
|
||||
__inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
|
||||
static inline s32 translate_percentage_to_dbm(u32 sig_stren_index)
|
||||
{
|
||||
s32 SignalPower; /* in dBm. */
|
||||
s32 power; /* in dBm. */
|
||||
|
||||
/* Translate to dBm (x=0.5y-95). */
|
||||
SignalPower = (s32)((SignalStrengthIndex + 1) >> 1);
|
||||
SignalPower -= 95;
|
||||
power = (s32)((sig_stren_index + 1) >> 1);
|
||||
power -= 95;
|
||||
|
||||
return SignalPower;
|
||||
return power;
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -35,12 +35,13 @@
|
|||
#define RTL8711_RF_MAX_SENS 6
|
||||
#define RTL8711_RF_DEF_SENS 4
|
||||
|
||||
/* */
|
||||
/* We now define the following channels as the max channels in each channel plan. */
|
||||
/* We now define the following channels as the max channels in each
|
||||
* channel plan. */
|
||||
/* 2G, total 14 chnls */
|
||||
/* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */
|
||||
/* 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,
|
||||
* 128,132,136,140,149,153,157,161,165} */
|
||||
#define MAX_CHANNEL_NUM_2G 14
|
||||
#define MAX_CHANNEL_NUM_5G 24
|
||||
#define MAX_CHANNEL_NUM 38/* 14+24 */
|
||||
|
@ -73,7 +74,8 @@ enum capability {
|
|||
cPBCC = 0x0040,
|
||||
cChannelAgility = 0x0080,
|
||||
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,
|
||||
cAPSD = 0x0800,
|
||||
cRM = 0x1000, /* RRM (Radio Request Measurement) */
|
||||
|
@ -88,7 +90,6 @@ enum _REG_PREAMBLE_MODE{
|
|||
PREAMBLE_SHORT = 3,
|
||||
};
|
||||
|
||||
|
||||
enum _RTL8712_RF_MIMO_CONFIG_{
|
||||
RTL8712_RFCONFIG_1T = 0x10,
|
||||
RTL8712_RFCONFIG_2T = 0x20,
|
||||
|
@ -100,7 +101,6 @@ enum _RTL8712_RF_MIMO_CONFIG_{
|
|||
RTL8712_RFCONFIG_2T2R = 0x22
|
||||
};
|
||||
|
||||
|
||||
enum rf90_radio_path {
|
||||
RF90_PATH_A = 0, /* Radio Path A */
|
||||
RF90_PATH_B = 1, /* Radio Path B */
|
||||
|
|
|
@ -60,11 +60,9 @@ enum {
|
|||
#endif
|
||||
|
||||
union pn48 {
|
||||
|
||||
u64 val;
|
||||
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
struct {
|
||||
u8 TSC0;
|
||||
u8 TSC1;
|
||||
|
@ -88,9 +86,7 @@ struct {
|
|||
u8 TSC1;
|
||||
u8 TSC0;
|
||||
} _byte_;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
union Keytype {
|
||||
|
@ -98,7 +94,6 @@ union Keytype {
|
|||
u32 lkey[4];
|
||||
};
|
||||
|
||||
|
||||
struct rt_pmkid_list {
|
||||
u8 bUsed;
|
||||
u8 Bssid[6];
|
||||
|
@ -108,17 +103,22 @@ struct rt_pmkid_list {
|
|||
u16 ssid_length;
|
||||
};
|
||||
|
||||
struct security_priv
|
||||
{
|
||||
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, 8021x and authswitch */
|
||||
u32 dot11PrivacyAlgrthm; /* This specify the privacy for shared auth. algorithm. */
|
||||
struct security_priv {
|
||||
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open,
|
||||
* shared, 8021x and authswitch */
|
||||
u32 dot11PrivacyAlgrthm; /* This specify the privacy for
|
||||
* shared auth. algorithm. */
|
||||
/* 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
|
||||
* wep, 0~3 for key id.(tx key index) */
|
||||
union Keytype dot11DefKey[4]; /* this is only valid for def. key */
|
||||
u32 dot11DefKeylen[4];
|
||||
u32 dot118021XGrpPrivacy; /* This specify the privacy algthm. used for Grp key */
|
||||
u32 dot118021XGrpKeyid; /* key id used for Grp Key ( tx key index) */
|
||||
union Keytype dot118021XGrpKey[4]; /* 802.1x Group Key, for inx0 and inx1 */
|
||||
u32 dot118021XGrpPrivacy; /* This specify the privacy algthm.
|
||||
* used for Grp key */
|
||||
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 dot118021XGrprxmickey[4];
|
||||
union pn48 dot11Grptxpn; /* PN48 used for Grp Key xmit.*/
|
||||
|
@ -140,9 +140,11 @@ struct security_priv
|
|||
u8 bgrpkey_handshake;
|
||||
s32 sw_encrypt;/* 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 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||
struct wlan_bssid_ex sec_bss; /* for joinbss (h2c buffer) usage */
|
||||
|
@ -162,7 +164,7 @@ struct security_priv
|
|||
/* */
|
||||
/* 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 bWepDefaultKeyIdxSet;
|
||||
};
|
||||
|
@ -175,8 +177,7 @@ struct sha256_state {
|
|||
|
||||
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
|
||||
do {\
|
||||
switch (psecuritypriv->dot11AuthAlgrthm)\
|
||||
{\
|
||||
switch (psecuritypriv->dot11AuthAlgrthm) {\
|
||||
case dot11AuthAlgrthm_Open:\
|
||||
case dot11AuthAlgrthm_Shared:\
|
||||
case dot11AuthAlgrthm_Auto:\
|
||||
|
@ -194,11 +195,9 @@ do{\
|
|||
}\
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt)\
|
||||
do {\
|
||||
switch (encrypt)\
|
||||
{\
|
||||
switch (encrypt) {\
|
||||
case _WEP40_:\
|
||||
case _WEP104_:\
|
||||
iv_len = 4;\
|
||||
|
@ -238,8 +237,7 @@ do{\
|
|||
#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
|
||||
#define ROR32(A, n) ROL32((A), 32-(n))
|
||||
|
||||
struct mic_data
|
||||
{
|
||||
struct mic_data {
|
||||
u32 K0, K1; /* Key */
|
||||
u32 L, R; /* Current state */
|
||||
u32 M; /* Message accumulator (single word) */
|
||||
|
@ -352,7 +350,6 @@ static const unsigned long K[64] = {
|
|||
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||
};
|
||||
|
||||
|
||||
/* Various logical functions */
|
||||
#define RORc(x, y) \
|
||||
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
||||
|
@ -373,19 +370,11 @@ void rtw_secmicsetkey(struct mic_data *pmicdata, u8 * key );
|
|||
void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b);
|
||||
void rtw_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nBytes);
|
||||
void rtw_secgetmic(struct mic_data *pmicdata, u8 *dst);
|
||||
|
||||
void rtw_seccalctkipmic(
|
||||
u8 * key,
|
||||
u8 *header,
|
||||
u8 *data,
|
||||
u32 data_len,
|
||||
u8 *Miccode,
|
||||
u8 priority);
|
||||
|
||||
void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len,
|
||||
u8 *Miccode, u8 priority);
|
||||
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
||||
u32 rtw_tkip_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_tkip_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||
|
|
|
@ -56,7 +56,7 @@ do{\
|
|||
pattrib_iv[1] = dot11txpn._byte_.TSC1;\
|
||||
pattrib_iv[2] = dot11txpn._byte_.TSC2;\
|
||||
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)
|
||||
|
||||
|
||||
|
@ -105,7 +105,6 @@ struct tx_desc{
|
|||
__le32 txdw7;
|
||||
};
|
||||
|
||||
|
||||
union txdesc {
|
||||
struct tx_desc txdesc;
|
||||
unsigned int value[TXDESC_SIZE>>2];
|
||||
|
@ -117,8 +116,7 @@ struct hw_xmit {
|
|||
};
|
||||
|
||||
/* reduce size */
|
||||
struct pkt_attrib
|
||||
{
|
||||
struct pkt_attrib {
|
||||
u8 type;
|
||||
u8 subtype;
|
||||
u8 bswenc;
|
||||
|
@ -127,10 +125,12 @@ struct pkt_attrib
|
|||
u16 seqnum;
|
||||
u16 pkt_hdrlen; /* the original 802.3 pkt 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;
|
||||
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 icv_len;
|
||||
u8 iv[18];
|
||||
|
@ -199,20 +199,17 @@ enum {
|
|||
RTW_SCTX_DONE_DEV_REMOVE,
|
||||
};
|
||||
|
||||
|
||||
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
|
||||
int rtw_sctx_wait(struct submit_ctx *sctx);
|
||||
void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
|
||||
void rtw_sctx_done(struct submit_ctx **sctx);
|
||||
|
||||
struct xmit_buf
|
||||
{
|
||||
struct xmit_buf {
|
||||
struct list_head list;
|
||||
struct adapter *padapter;
|
||||
u8 *pallocated_buf;
|
||||
u8 *pbuf;
|
||||
void *priv_data;
|
||||
|
||||
u16 ext_tag; /* 0: Normal xmitbuf, 1: extension xmitbuf. */
|
||||
u16 flags;
|
||||
u32 alloc_sz;
|
||||
|
@ -225,8 +222,7 @@ struct xmit_buf
|
|||
int last[8];
|
||||
};
|
||||
|
||||
struct xmit_frame
|
||||
{
|
||||
struct xmit_frame {
|
||||
struct list_head list;
|
||||
struct pkt_attrib attrib;
|
||||
struct sk_buff *pkt;
|
||||
|
@ -246,26 +242,20 @@ struct tx_servq {
|
|||
int qcnt;
|
||||
};
|
||||
|
||||
|
||||
struct sta_xmit_priv
|
||||
{
|
||||
struct sta_xmit_priv {
|
||||
spinlock_t lock;
|
||||
int option;
|
||||
int apsd_setting; /* When bit mask is on, the associated edca queue supports APSD. */
|
||||
|
||||
|
||||
/* struct tx_servq blk_q[MAX_NUMBLKS]; */
|
||||
int apsd_setting; /* When bit mask is on, the associated edca
|
||||
* queue supports APSD. */
|
||||
struct tx_servq be_q; /* priority == 0,3 */
|
||||
struct tx_servq bk_q; /* priority == 1,2 */
|
||||
struct tx_servq vi_q; /* priority == 4,5 */
|
||||
struct tx_servq vo_q; /* priority == 6,7 */
|
||||
struct list_head legacy_dz;
|
||||
struct list_head apsd;
|
||||
|
||||
u16 txseq_tid[16];
|
||||
};
|
||||
|
||||
|
||||
struct hw_txqueue {
|
||||
volatile int head;
|
||||
volatile int tail;
|
||||
|
@ -283,42 +273,33 @@ struct agg_pkt_info{
|
|||
};
|
||||
|
||||
struct xmit_priv {
|
||||
|
||||
spinlock_t lock;
|
||||
|
||||
struct semaphore xmit_sema;
|
||||
struct semaphore terminate_xmitthread_sema;
|
||||
|
||||
struct __queue be_pending;
|
||||
struct __queue bk_pending;
|
||||
struct __queue vi_pending;
|
||||
struct __queue vo_pending;
|
||||
struct __queue bm_pending;
|
||||
|
||||
u8 *pallocated_frame_buf;
|
||||
u8 *pxmit_frame_buf;
|
||||
uint free_xmitframe_cnt;
|
||||
|
||||
struct __queue free_xmit_queue;
|
||||
|
||||
uint frag_len;
|
||||
|
||||
struct adapter *adapter;
|
||||
|
||||
u8 vcs_setting;
|
||||
u8 vcs;
|
||||
u8 vcs_type;
|
||||
|
||||
u64 tx_bytes;
|
||||
u64 tx_pkts;
|
||||
u64 tx_drop;
|
||||
u64 last_tx_bytes;
|
||||
u64 last_tx_pkts;
|
||||
|
||||
struct hw_xmit *hwxmits;
|
||||
u8 hwxmit_entry;
|
||||
|
||||
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. */
|
||||
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. */
|
||||
struct semaphore tx_retevt;/* all tx return event; */
|
||||
u8 txirp_cnt;/* */
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
|
@ -332,57 +313,57 @@ struct xmit_priv {
|
|||
u8 *pallocated_xmitbuf;
|
||||
u8 *pxmitbuf;
|
||||
uint free_xmitbuf_cnt;
|
||||
|
||||
struct __queue free_xmit_extbuf_queue;
|
||||
u8 *pallocated_xmit_extbuf;
|
||||
u8 *pxmit_extbuf;
|
||||
uint free_xmit_extbuf_cnt;
|
||||
|
||||
u16 nqos_ssn;
|
||||
int ack_tx;
|
||||
struct mutex ack_tx_mutex;
|
||||
struct submit_ctx ack_tx_ops;
|
||||
};
|
||||
|
||||
extern 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);
|
||||
struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
||||
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);
|
||||
extern s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
||||
struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
||||
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);
|
||||
extern void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len);
|
||||
extern s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, 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);
|
||||
s32 rtw_xmit_classifier(struct adapter *padapter,
|
||||
struct xmit_frame *pxmitframe);
|
||||
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)
|
||||
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,
|
||||
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);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
|
||||
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
|
||||
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv);
|
||||
|
||||
|
||||
void rtw_alloc_hwxmits(struct adapter *padapter);
|
||||
void rtw_free_hwxmits(struct adapter *padapter);
|
||||
|
||||
|
||||
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
|
||||
|
||||
#if defined(CONFIG_AP_MODE)
|
||||
|
@ -393,13 +374,10 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
#endif
|
||||
|
||||
u8 qos_acm(u8 acm_mask, u8 priority);
|
||||
|
||||
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
||||
|
||||
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
||||
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
||||
|
||||
|
||||
/* include after declaring struct xmit_buf, in order to avoid warning */
|
||||
#include <xmit_osdep.h>
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define NUM_STA 32
|
||||
#define NUM_ACL 16
|
||||
|
||||
|
||||
/* 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. */
|
||||
struct rtw_wlan_acl_node {
|
||||
|
@ -56,7 +55,6 @@ struct rssi_sta {
|
|||
};
|
||||
|
||||
struct stainfo_stats {
|
||||
|
||||
u64 rx_mgnt_pkts;
|
||||
u64 rx_beacon_pkts;
|
||||
u64 rx_probereq_pkts;
|
||||
|
@ -74,18 +72,14 @@ struct stainfo_stats {
|
|||
u64 last_rx_probersp_uo_pkts;
|
||||
u64 last_rx_ctrl_pkts;
|
||||
u64 last_rx_data_pkts;
|
||||
|
||||
u64 rx_bytes;
|
||||
u64 rx_drops;
|
||||
|
||||
u64 tx_pkts;
|
||||
u64 tx_bytes;
|
||||
u64 tx_drops;
|
||||
|
||||
};
|
||||
|
||||
struct sta_info {
|
||||
|
||||
spinlock_t lock;
|
||||
struct list_head list; /* free_sta_queue */
|
||||
struct list_head hash_list; /* sta_hash */
|
||||
|
@ -109,8 +103,6 @@ struct sta_info {
|
|||
union Keytype dot118021x_UncstKey;
|
||||
union pn48 dot11txpn; /* PN48 used for Unicast xmit. */
|
||||
union pn48 dot11rxpn; /* PN48 used for Unicast recv. */
|
||||
|
||||
|
||||
u8 bssrateset[16];
|
||||
u32 bssratelen;
|
||||
s32 rssi;
|
||||
|
@ -135,12 +127,12 @@ struct sta_info {
|
|||
/* unsigned char ampdu_txen_bitmap; */
|
||||
u16 BA_starting_seqctrl[16];
|
||||
|
||||
|
||||
struct ht_priv htpriv;
|
||||
|
||||
/* Notes: */
|
||||
/* 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 */
|
||||
|
||||
/* AP_Mode: */
|
||||
|
@ -207,22 +199,17 @@ struct sta_info {
|
|||
u16 dev_name_len;
|
||||
u8 dev_name[32];
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
u8 under_exist_checking;
|
||||
u8 keep_alive_trycnt;
|
||||
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
/* for DM */
|
||||
struct rssi_sta rssi_stat;
|
||||
|
||||
/* */
|
||||
/* ================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. */
|
||||
/* */
|
||||
/* Driver Write */
|
||||
u8 bValid; /* record the sta status link or not? */
|
||||
u8 IOTPeer; /* Enum value. HT_IOT_PEER_E */
|
||||
|
@ -323,7 +310,6 @@ struct sta_info {
|
|||
#define STA_PKTS_FMT "(m:%llu, c:%llu, d:%llu)"
|
||||
|
||||
struct sta_priv {
|
||||
|
||||
u8 *pallocated_stainfo_buf;
|
||||
u8 *pstainfo_buf;
|
||||
struct __queue free_sta_queue;
|
||||
|
@ -355,8 +341,10 @@ struct sta_priv {
|
|||
*/
|
||||
struct sta_info *sta_aid[NUM_STA];
|
||||
|
||||
u16 sta_dz_bitmap;/* only support 15 stations, staion aid bitmap for sleeping sta. */
|
||||
u16 tim_bitmap;/* only support 15 stations, aid=0~15 mapping bit0~bit15 */
|
||||
u16 sta_dz_bitmap;/* only support 15 stations, staion aid bitmap
|
||||
* for sleeping sta. */
|
||||
u16 tim_bitmap; /* only support 15 stations, aid=0~15 mapping
|
||||
* bit0~bit15 */
|
||||
|
||||
u16 max_num_sta;
|
||||
|
||||
|
@ -365,8 +353,7 @@ struct sta_priv {
|
|||
|
||||
};
|
||||
|
||||
|
||||
__inline static u32 wifi_mac_hash(u8 *mac)
|
||||
static inline u32 wifi_mac_hash(u8 *mac)
|
||||
{
|
||||
u32 x;
|
||||
|
||||
|
@ -379,7 +366,6 @@ __inline static u32 wifi_mac_hash(u8 *mac)
|
|||
|
||||
x ^= x >> 8;
|
||||
x = x & (NUM_STA - 1);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
@ -388,13 +374,13 @@ extern u32 _rtw_free_sta_priv(struct sta_priv *pstapriv);
|
|||
|
||||
#define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
|
||||
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 u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta);
|
||||
extern void rtw_free_all_stainfo(struct adapter *padapter);
|
||||
extern struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr);
|
||||
extern u32 rtw_init_bcmc_stainfo(struct adapter* padapter);
|
||||
extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||
extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
|
||||
extern void rtw_free_all_stainfo(struct adapter *adapt);
|
||||
extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||
extern u32 rtw_init_bcmc_stainfo(struct adapter* adapt);
|
||||
extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
|
||||
extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
|
||||
|
||||
|
|
|
@ -38,17 +38,26 @@ enum{
|
|||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||
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) \
|
||||
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
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size,timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (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) \
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||
value, index, data, size,timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), \
|
||||
(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), \
|
||||
((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
|
||||
#include <usb_ops_linux.h>
|
||||
|
||||
|
@ -58,7 +67,8 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops);
|
|||
#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
|
||||
* is larger than MAX_CONTINUAL_URB_ERR
|
||||
* @return true:
|
||||
* @return false:
|
||||
*/
|
||||
|
@ -66,11 +76,11 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
|||
{
|
||||
int ret = false;
|
||||
int value;
|
||||
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
|
||||
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
|
||||
value = ATOMIC_INC_RETURN(&dvobj->continual_urb_error);
|
||||
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;
|
||||
} else {
|
||||
/* DBG_88E("[dvobj:%p] continual_urb_error:%d\n", dvobj, value); */
|
||||
}
|
||||
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_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;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
|
||||
if (pdvobjpriv->ishighspeed == true)
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE)?true:false;
|
||||
if (pdvobjpriv->ishighspeed)
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
|
||||
true : false;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
#endif /* __USB_OPS_H_ */
|
||||
|
|
|
@ -29,13 +29,20 @@
|
|||
|
||||
#define RTW_USB_BULKOUT_TIME 5000/* ms */
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18))
|
||||
#define _usbctrl_vendorreq_async_callback(urb, regs) _usbctrl_vendorreq_async_callback(urb)
|
||||
#define usb_bulkout_zero_complete(purb, regs) usb_bulkout_zero_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)
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)) || \
|
||||
(LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18))
|
||||
#define _usbctrl_vendorreq_async_callback(urb, regs) \
|
||||
_usbctrl_vendorreq_async_callback(urb)
|
||||
#define usb_bulkout_zero_complete(purb, regs) \
|
||||
usb_bulkout_zero_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
|
||||
|
||||
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
|
||||
|
|
|
@ -29,11 +29,14 @@ extern int rtw_mc2u_disable;
|
|||
|
||||
#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,
|
||||
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 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);
|
||||
int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method);
|
||||
|
||||
|
|
177
include/wifi.h
177
include/wifi.h
|
@ -52,7 +52,8 @@
|
|||
#define P80211CAPTURE_VERSION 0x80211001
|
||||
|
||||
/* This value is tested by WiFi 11n Test Plan 5.2.3. */
|
||||
/* This test verifies the WLAN NIC can update the NAV through sending the CTS with large duration. */
|
||||
/* This test verifies the WLAN NIC can update the NAV through sending
|
||||
* the CTS with large duration. */
|
||||
#define WiFiNavUpperUs 30000 /* 30 ms */
|
||||
|
||||
enum WIFI_FRAME_TYPE {
|
||||
|
@ -63,7 +64,6 @@ enum WIFI_FRAME_TYPE {
|
|||
};
|
||||
|
||||
enum WIFI_FRAME_SUBTYPE {
|
||||
|
||||
/* below is for mgt frame */
|
||||
WIFI_ASSOCREQ = (0 | WIFI_MGT_TYPE),
|
||||
WIFI_ASSOCRSP = (BIT(4) | WIFI_MGT_TYPE),
|
||||
|
@ -84,7 +84,8 @@ enum WIFI_FRAME_SUBTYPE {
|
|||
WIFI_CTS = (BIT(7) | BIT(6) | WIFI_CTRL_TYPE),
|
||||
WIFI_ACK = (BIT(7) | BIT(6) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND = (BIT(7) | BIT(6) | BIT(5) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND_CFACK = (BIT(7) | BIT(6) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND_CFACK = (BIT(7) | BIT(6) | BIT(5) | BIT(4) |
|
||||
WIFI_CTRL_TYPE),
|
||||
|
||||
/* below is for data frame */
|
||||
WIFI_DATA = (0 | WIFI_DATA_TYPE),
|
||||
|
@ -220,7 +221,6 @@ enum WIFI_STATUS_CODE {
|
|||
#define WLAN_STATUS_INVALID_MDIE 54
|
||||
#define WLAN_STATUS_INVALID_FTIE 55
|
||||
|
||||
|
||||
enum WIFI_REG_DOMAIN {
|
||||
DOMAIN_FCC = 1,
|
||||
DOMAIN_IC = 2,
|
||||
|
@ -324,7 +324,8 @@ enum WIFI_REG_DOMAIN {
|
|||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
} while (0)
|
||||
|
||||
#define GetPrivacy(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
#define GetPrivacy(pbuf) \
|
||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
|
||||
#define ClearPrivacy(pbuf) \
|
||||
do { \
|
||||
|
@ -332,9 +333,11 @@ enum WIFI_REG_DOMAIN {
|
|||
} while (0)
|
||||
|
||||
|
||||
#define GetOrder(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
|
||||
#define GetOrder(pbuf) \
|
||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
#define GetFrameType(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameType(pbuf,type) \
|
||||
do { \
|
||||
|
@ -342,24 +345,30 @@ enum WIFI_REG_DOMAIN {
|
|||
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||
} while (0)
|
||||
|
||||
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) | \
|
||||
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameSubType(pbuf,type) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
|
||||
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
|
||||
} while (0)
|
||||
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
|
||||
#define GetSequence(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
|
||||
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
|
||||
#define GetFragNum(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
|
||||
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
|
||||
#define GetTupleCache(pbuf) \
|
||||
(cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
|
||||
|
||||
#define SetFragNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((size_t)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((size_t)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
((*(unsigned short *)((size_t)(pbuf) + 22)) & \
|
||||
le16_to_cpu(~(0x000f))) | \
|
||||
cpu_to_le16(0x0f & (num)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -423,7 +432,7 @@ enum WIFI_REG_DOMAIN {
|
|||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
|
||||
)
|
||||
|
||||
__inline static int IS_MCAST(unsigned char *da)
|
||||
static inline int IS_MCAST(unsigned char *da)
|
||||
{
|
||||
if ((*da) & 0x01)
|
||||
return true;
|
||||
|
@ -431,8 +440,7 @@ __inline static int IS_MCAST(unsigned char *da)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
__inline static unsigned char * get_da(unsigned char *pframe)
|
||||
static inline unsigned char *get_da(unsigned char *pframe)
|
||||
{
|
||||
unsigned char *da;
|
||||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
@ -451,12 +459,10 @@ __inline static unsigned char * get_da(unsigned char *pframe)
|
|||
da = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
||||
return da;
|
||||
}
|
||||
|
||||
|
||||
__inline static unsigned char * get_sa(unsigned char *pframe)
|
||||
static inline unsigned char *get_sa(unsigned char *pframe)
|
||||
{
|
||||
unsigned char *sa;
|
||||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
@ -475,11 +481,10 @@ __inline static unsigned char * get_sa(unsigned char *pframe)
|
|||
sa = GetAddr4Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
||||
return sa;
|
||||
}
|
||||
|
||||
__inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
|
||||
static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||
{
|
||||
unsigned char *sa;
|
||||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
@ -506,7 +511,7 @@ __inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
|
|||
}
|
||||
|
||||
|
||||
__inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
static inline int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
{
|
||||
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
||||
return true;
|
||||
|
@ -524,7 +529,8 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define _PRE_ALLOCICVHDR_ 5
|
||||
#define _PRE_ALLOCMICHDR_ 6
|
||||
|
||||
#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A)?16:10)
|
||||
#define _SIFSTIME_ \
|
||||
((priv->pmib->dot11BssType.net_work_type & WIRELESS_11A) ? 16 : 10)
|
||||
#define _ACKCTSLNG_ 14 /* 14 bytes long, including crclng */
|
||||
#define _CRCLNG_ 4
|
||||
|
||||
|
@ -606,7 +612,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define cap_PBCC BIT(6)
|
||||
#define cap_ChAgility BIT(7)
|
||||
#define cap_SpecMgmt BIT(8)
|
||||
#define cap_QoS BIT(9)
|
||||
#define cap_QoSi BIT(9)
|
||||
#define cap_ShortSlot BIT(10)
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -641,7 +647,8 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
|
||||
} while (0)
|
||||
|
||||
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
#define GetOrderBit(pbuf) \
|
||||
(((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
|
||||
|
||||
/**
|
||||
|
@ -657,7 +664,7 @@ struct rtw_ieee80211_bar {
|
|||
unsigned char ta[6];
|
||||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
|
@ -677,7 +684,7 @@ struct rtw_ieee80211_ht_cap {
|
|||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT additional information
|
||||
|
@ -691,8 +698,7 @@ struct ieee80211_ht_addt_info {
|
|||
unsigned short operation_mode;
|
||||
unsigned short stbc_param;
|
||||
unsigned char basic_set[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
} __packed;
|
||||
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
|
@ -706,32 +712,32 @@ struct HT_caps_element {
|
|||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
} u;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct HT_info_element {
|
||||
unsigned char primary_channel;
|
||||
unsigned char infos[5];
|
||||
unsigned char MCS_rate[16];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct AC_param {
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
__le16 TXOP_limit;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct WMM_para_element {
|
||||
unsigned char QoS_info;
|
||||
unsigned char reserved;
|
||||
struct AC_param ac_param[4];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct ADDBA_request {
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
enum ht_cap_ampdu_factor {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
|
@ -817,7 +823,7 @@ enum ht_cap_ampdu_factor {
|
|||
|
||||
#define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16) BIT(6))
|
||||
#define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16) BIT(7))
|
||||
#define HT_INFO_STBC_PARAM_SECONDARY_BCN ((u16) BIT(8))
|
||||
#define HT_INFO_STBC_PARAM_SECONDARY_BC ((u16) BIT(8))
|
||||
#define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED ((u16) BIT(9))
|
||||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
|
||||
|
@ -1004,20 +1010,32 @@ enum ht_cap_ampdu_factor {
|
|||
|
||||
#define P2P_WILDCARD_SSID_LEN 7
|
||||
|
||||
#define P2P_FINDPHASE_EX_NONE 0 /* default value, used when: (1)p2p disabed or (2)p2p enabled but only do 1 scan phase */
|
||||
#define P2P_FINDPHASE_EX_FULL 1 /* used when p2p enabled and want to do 1 scan phase and P2P_FINDPHASE_EX_MAX-1 find phase */
|
||||
/* default value, used when: (1)p2p disabed or (2)p2p enabled
|
||||
* but only do 1 scan phase */
|
||||
#define P2P_FINDPHASE_EX_NONE 0
|
||||
/* used when p2p enabled and want to do 1 scan phase and
|
||||
* P2P_FINDPHASE_EX_MAX-1 find phase */
|
||||
#define P2P_FINDPHASE_EX_FULL 1
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_FIRST (P2P_FINDPHASE_EX_FULL+1)
|
||||
#define P2P_FINDPHASE_EX_MAX 4
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_LAST P2P_FINDPHASE_EX_MAX
|
||||
|
||||
#define P2P_PROVISION_TIMEOUT 5000 /* 5 seconds timeout for sending the provision discovery request */
|
||||
#define P2P_CONCURRENT_PROVISION_TIME 3000 /* 3 seconds timeout for sending the provision discovery request under concurrent mode */
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000 /* 5 seconds timeout for receiving the group negotation response */
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIME 3000 /* 3 seconds timeout for sending the negotiation request under concurrent mode */
|
||||
#define P2P_TX_PRESCAN_TIMEOUT 100 /* 100ms */
|
||||
#define P2P_INVITE_TIMEOUT 5000 /* 5 seconds timeout for sending the invitation request */
|
||||
#define P2P_CONCURRENT_INVITE_TIME 3000 /* 3 seconds timeout for sending the invitation request under concurrent mode */
|
||||
#define P2P_RESET_SCAN_CH 25000 /* 25 seconds timeout to reset the scan channel ( based on channel plan ) */
|
||||
/* 5 seconds timeout for sending the provision discovery request */
|
||||
#define P2P_PROVISION_TIMEOUT 5000
|
||||
/* 3 seconds timeout for sending the prov disc request concurrent mode */
|
||||
#define P2P_CONCURRENT_PROVISION_TIME 3000
|
||||
/* 5 seconds timeout for receiving the group negotation response */
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000
|
||||
/* 3 seconds timeout for sending the negotiation request under concurrent mode */
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIME 3000
|
||||
/* 100ms */
|
||||
#define P2P_TX_PRESCAN_TIMEOUT 100
|
||||
/* 5 seconds timeout for sending the invitation request */
|
||||
#define P2P_INVITE_TIMEOUT 5000
|
||||
/* 3 seconds timeout for sending the invitation request under concurrent mode */
|
||||
#define P2P_CONCURRENT_INVITE_TIME 3000
|
||||
/* 25 seconds timeout to reset the scan channel ( based on channel plan ) */
|
||||
#define P2P_RESET_SCAN_CH 25000
|
||||
#define P2P_MAX_INTENT 15
|
||||
|
||||
#define P2P_MAX_NOA_NUM 2
|
||||
|
@ -1045,28 +1063,46 @@ enum P2P_ROLE {
|
|||
|
||||
enum P2P_STATE {
|
||||
P2P_STATE_NONE = 0, /* P2P disable */
|
||||
P2P_STATE_IDLE = 1, /* P2P had enabled and do nothing */
|
||||
/* P2P had enabled and do nothing */
|
||||
P2P_STATE_IDLE = 1,
|
||||
P2P_STATE_LISTEN = 2, /* In pure listen state */
|
||||
P2P_STATE_SCAN = 3, /* In scan phase */
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4, /* In the listen state of find phase */
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5, /* In the search state of find phase */
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6, /* In P2P provisioning discovery */
|
||||
/* In the listen state of find phase */
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4,
|
||||
/* In the search state of find phase */
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5,
|
||||
/* In P2P provisioning discovery */
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6,
|
||||
P2P_STATE_RX_PROVISION_DIS_RSP = 7,
|
||||
P2P_STATE_RX_PROVISION_DIS_REQ = 8,
|
||||
P2P_STATE_GONEGO_ING = 9, /* Doing the group owner negoitation handshake */
|
||||
P2P_STATE_GONEGO_OK = 10, /* finish the group negoitation handshake with success */
|
||||
P2P_STATE_GONEGO_FAIL = 11, /* finish the group negoitation handshake with failure */
|
||||
P2P_STATE_RECV_INVITE_REQ_MATCH = 12, /* receiving the P2P Inviation request and match with the profile. */
|
||||
P2P_STATE_PROVISIONING_ING = 13, /* Doing the P2P WPS */
|
||||
P2P_STATE_PROVISIONING_DONE = 14, /* Finish the P2P WPS */
|
||||
P2P_STATE_TX_INVITE_REQ = 15, /* Transmit the P2P Invitation request */
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16, /* Receiving the P2P Invitation response */
|
||||
P2P_STATE_RECV_INVITE_REQ_DISMATCH = 17, /* receiving the P2P Inviation request and dismatch with the profile. */
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18, /* receiving the P2P Inviation request and this wifi is GO. */
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19, /* receiving the P2P Inviation request to join an existing P2P Group. */
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20, /* recveing the P2P Inviation response with failure */
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21, /* receiving p2p negoitation response with information is not available */
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22, /* sending p2p negoitation response with information is not available */
|
||||
/* Doing the group owner negoitation handshake */
|
||||
P2P_STATE_GONEGO_ING = 9,
|
||||
/* finish the group negoitation handshake with success */
|
||||
P2P_STATE_GONEGO_OK = 10,
|
||||
/* finish the group negoitation handshake with failure */
|
||||
P2P_STATE_GONEGO_FAIL = 11,
|
||||
/* receiving the P2P Inviation request and match with the profile. */
|
||||
P2P_STATE_RECV_INVITE_REQ_MATCH = 12,
|
||||
/* Doing the P2P WPS */
|
||||
P2P_STATE_PROVISIONING_ING = 13,
|
||||
/* Finish the P2P WPS */
|
||||
P2P_STATE_PROVISIONING_DONE = 14,
|
||||
/* Transmit the P2P Invitation request */
|
||||
P2P_STATE_TX_INVITE_REQ = 15,
|
||||
/* Receiving the P2P Invitation response */
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16,
|
||||
/* receiving the P2P Inviation request and dismatch with the profile. */
|
||||
P2P_STATE_RECV_INVITE_REQ_DISMATCH = 17,
|
||||
/* receiving the P2P Inviation request and this wifi is GO. */
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18,
|
||||
/* receiving the P2P Inviation request to join an existing P2P Group. */
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19,
|
||||
/* recveing the P2P Inviation response with failure */
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20,
|
||||
/* receiving p2p negoitation response with information is not available */
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21,
|
||||
/* sending p2p negoitation response with information is not available */
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22,
|
||||
};
|
||||
|
||||
enum P2P_WPSINFO {
|
||||
|
@ -1078,8 +1114,7 @@ enum P2P_WPSINFO {
|
|||
|
||||
#define P2P_PRIVATE_IOCTL_SET_LEN 64
|
||||
|
||||
enum P2P_PROTO_WK_ID
|
||||
{
|
||||
enum P2P_PROTO_WK_ID {
|
||||
P2P_FIND_PHASE_WK = 0,
|
||||
P2P_RESTORE_STATE_WK = 1,
|
||||
P2P_PRE_TX_PROVDISC_PROCESS_WK = 2,
|
||||
|
@ -1089,8 +1124,7 @@ enum P2P_PROTO_WK_ID
|
|||
P2P_RO_CH_WK = 6,
|
||||
};
|
||||
|
||||
enum P2P_PS_STATE
|
||||
{
|
||||
enum P2P_PS_STATE {
|
||||
P2P_PS_DISABLE = 0,
|
||||
P2P_PS_ENABLE = 1,
|
||||
P2P_PS_SCAN = 2,
|
||||
|
@ -1098,8 +1132,7 @@ enum P2P_PS_STATE
|
|||
P2P_PS_ALLSTASLEEP = 4, /* for P2P GO */
|
||||
};
|
||||
|
||||
enum P2P_PS_MODE
|
||||
{
|
||||
enum P2P_PS_MODE {
|
||||
P2P_PS_NONE = 0,
|
||||
P2P_PS_CTWINDOW = 1,
|
||||
P2P_PS_NOA = 2,
|
||||
|
@ -1126,7 +1159,9 @@ enum P2P_PS_MODE
|
|||
#define WFD_DEVINFO_PC_TDLS 0x0080
|
||||
#define WFD_DEVINFO_HDCP_SUPPORT 0x0100
|
||||
|
||||
#define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e))
|
||||
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
|
||||
#define IP_MCAST_MAC(mac) \
|
||||
((mac[0] == 0x01) && (mac[1] == 0x00) && (mac[2] == 0x5e))
|
||||
#define ICMPV6_MCAST_MAC(mac) \
|
||||
((mac[0] == 0x33) && (mac[1] == 0x33) && (mac[2] != 0xff))
|
||||
|
||||
#endif /* _WIFI_H_ */
|
||||
|
|
|
@ -39,7 +39,7 @@ enum NDIS_802_11_NETWORK_TYPE {
|
|||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
|
||||
Ndis802_11NetworkTypeMax /* dummy upper bound */
|
||||
};
|
||||
|
||||
struct ndis_802_11_config_fh {
|
||||
|
@ -49,10 +49,9 @@ struct ndis_802_11_config_fh {
|
|||
ULONG DwellTime; /* units are Kusec */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
* FW will only save the channel number in DSConfig.
|
||||
* ODI Handler will convert the channel number to freq. number.
|
||||
*/
|
||||
struct ndis_802_11_config {
|
||||
ULONG Length; /* Length of structure */
|
||||
|
@ -66,7 +65,7 @@ enum ndis_802_11_network_infra {
|
|||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */
|
||||
Ndis802_11InfrastructureMax, /* dummy upper bound */
|
||||
Ndis802_11APMode
|
||||
};
|
||||
|
||||
|
@ -85,14 +84,14 @@ struct ndis_802_11_var_ie {
|
|||
};
|
||||
|
||||
/*
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
[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)
|
||||
+ 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.
|
||||
*/
|
||||
* Length is the 4 bytes multiples of the sume of
|
||||
* [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)
|
||||
* + 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. */
|
||||
|
||||
enum ndis_802_11_auth_mode {
|
||||
Ndis802_11AuthModeOpen,
|
||||
|
@ -102,7 +101,7 @@ enum ndis_802_11_auth_mode {
|
|||
Ndis802_11AuthModeWPAPSK,
|
||||
Ndis802_11AuthModeWPANone,
|
||||
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 {
|
||||
|
@ -121,7 +120,6 @@ enum ndis_802_11_wep_status {
|
|||
Ndis802_11_EncryptionWAPI
|
||||
};
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
|
@ -158,7 +156,6 @@ enum ndis_802_11_reload_def {
|
|||
Ndis802_11ReloadWEPKeys
|
||||
};
|
||||
|
||||
|
||||
/* Key mapping keys require a BSSID */
|
||||
struct ndis_802_11_key {
|
||||
ULONG Length; /* Length of this structure */
|
||||
|
@ -166,20 +163,21 @@ struct ndis_802_11_key {
|
|||
ULONG KeyLength; /* length of key in bytes */
|
||||
unsigned char BSSID[ETH_ALEN];
|
||||
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 {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG Length; /* Length */
|
||||
ULONG KeyIndex;
|
||||
unsigned char BSSID[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct ndis_802_11_wep {
|
||||
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 */
|
||||
UCHAR KeyMaterial[16];/* variable length depending on above field */
|
||||
UCHAR KeyMaterial[16];/* variable len depending on above field */
|
||||
};
|
||||
|
||||
struct ndis_802_11_auth_req {
|
||||
|
@ -192,7 +190,8 @@ enum ndis_802_11_status_type {
|
|||
Ndis802_11StatusType_Authentication,
|
||||
Ndis802_11StatusType_MediaStreamMode,
|
||||
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 {
|
||||
|
@ -217,8 +216,7 @@ struct ndis_802_11_auth_evt {
|
|||
struct ndis_802_11_test {
|
||||
ULONG Length;
|
||||
ULONG Type;
|
||||
union
|
||||
{
|
||||
union {
|
||||
struct ndis_802_11_auth_evt AuthenticationEvent;
|
||||
NDIS_802_11_RSSI RssiTrigger;
|
||||
} tt;
|
||||
|
@ -265,7 +263,8 @@ struct wlan_bssid_ex {
|
|||
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
|
||||
struct wlan_phy_info PhyInfo;
|
||||
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;
|
||||
|
||||
static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||
|
@ -276,7 +275,8 @@ static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
|||
struct wlan_network {
|
||||
struct list_head list;
|
||||
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 */
|
||||
int aid; /* will only be valid when a BSS is joinned. */
|
||||
int join_res;
|
||||
|
@ -284,15 +284,13 @@ struct wlan_network {
|
|||
struct wlan_bcn_info BcnInfo;
|
||||
};
|
||||
|
||||
enum VRTL_CARRIER_SENSE
|
||||
{
|
||||
enum VRTL_CARRIER_SENSE {
|
||||
DISABLE_VCS,
|
||||
ENABLE_VCS,
|
||||
AUTO_VCS
|
||||
};
|
||||
|
||||
enum VCS_TYPE
|
||||
{
|
||||
enum VCS_TYPE {
|
||||
NONE_VCS,
|
||||
RTS_CTS,
|
||||
CTS_TO_SELF
|
||||
|
@ -304,8 +302,7 @@ enum VCS_TYPE
|
|||
#define PWR_UAPSD 3
|
||||
#define PWR_VOIP 4
|
||||
|
||||
enum UAPSD_MAX_SP
|
||||
{
|
||||
enum UAPSD_MAX_SP {
|
||||
NO_LIMIT,
|
||||
TWO_MSDU,
|
||||
FOUR_MSDU,
|
||||
|
|
|
@ -44,21 +44,24 @@ struct sta_xmit_priv;
|
|||
struct xmit_frame;
|
||||
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);
|
||||
|
||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
||||
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter,
|
||||
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);
|
||||
extern 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);
|
||||
extern int rtw_endofpktfile (struct pkt_file *pfile);
|
||||
uint rtw_remainder_len(struct pkt_file *pfile);
|
||||
void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||
uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||
int rtw_endofpktfile(struct pkt_file *pfile);
|
||||
|
||||
extern 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_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
|
||||
void rtw_os_xmit_complete(struct adapter *padapter,
|
||||
struct xmit_frame *pxframe);
|
||||
|
||||
#endif /* __XMIT_OSDEP_H_ */
|
||||
|
|
Loading…
Reference in a new issue