mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
net: wireless: rockchip_wlan: update rtl8723cs
update rtl8723cs wifi driver to version v5.2.1.7_25082.20171108_COEX20170626-1a00 Change-Id: Ibe11dcb9b3592dfd7f554c20814b3233da87ff24 Signed-off-by: Alex Zhao <zzc@rock-chips.com>
This commit is contained in:
parent
c56fa46c21
commit
07e3824bd6
|
|
@ -73,10 +73,10 @@ CONFIG_APPEND_VENDOR_IE_ENABLE = n
|
|||
CONFIG_RTW_NAPI = y
|
||||
CONFIG_RTW_GRO = y
|
||||
########################## Debug ###########################
|
||||
CONFIG_RTW_DEBUG = n
|
||||
CONFIG_RTW_DEBUG = y
|
||||
# default log level is _DRV_INFO_ = 4,
|
||||
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
|
||||
CONFIG_RTW_LOG_LEVEL = 4
|
||||
CONFIG_RTW_LOG_LEVEL = 2
|
||||
######################## Wake On Lan ##########################
|
||||
CONFIG_WOWLAN = n
|
||||
CONFIG_GPIO_WAKEUP = n
|
||||
|
|
|
|||
|
|
@ -245,6 +245,16 @@ void rtw_btcoex_switchband_notify(u8 under_scan, u8 band_type)
|
|||
hal_btcoex_switchband_notify(under_scan, band_type);
|
||||
}
|
||||
|
||||
void rtw_btcoex_WlFwDbgInfoNotify(PADAPTER padapter, u8* tmpBuf, u8 length)
|
||||
{
|
||||
hal_btcoex_WlFwDbgInfoNotify(padapter, tmpBuf, length);
|
||||
}
|
||||
|
||||
void rtw_btcoex_rx_rate_change_notify(PADAPTER padapter, u8 is_data_frame, u8 rate_id)
|
||||
{
|
||||
hal_btcoex_rx_rate_change_notify(padapter, is_data_frame, rate_id);
|
||||
}
|
||||
|
||||
void rtw_btcoex_SwitchBtTRxMask(PADAPTER padapter)
|
||||
{
|
||||
hal_btcoex_SwitchBtTRxMask(padapter);
|
||||
|
|
|
|||
|
|
@ -1230,7 +1230,8 @@ int rtw_set_country(_adapter *adapter, const char *country_code)
|
|||
#ifdef CONFIG_RTW_IOCTL_SET_COUNTRY
|
||||
return rtw_set_country_cmd(adapter, RTW_CMDF_WAIT_ACK, country_code, 1);
|
||||
#else
|
||||
return _FAIL;
|
||||
RTW_INFO("%s(): not applied\n", __func__);
|
||||
return _SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <drv_types.h>
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#include <rtw_wifi_regd.h>
|
||||
#include <rtw_wifi_regd.h>
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
#include <hal_data.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -805,6 +805,86 @@ sint recv_decache(union recv_frame *precv_frame, u8 bretry, struct stainfo_rxcac
|
|||
|
||||
}
|
||||
|
||||
#define PN_LESS_CHK(a, b) (((a-b) & 0x800000000000) != 0)
|
||||
#define PN_EQUAL_CHK(a, b) (a == b)
|
||||
sint recv_ucast_pn_decache(union recv_frame *precv_frame, struct stainfo_rxcache *prxcache);
|
||||
sint recv_ucast_pn_decache(union recv_frame *precv_frame, struct stainfo_rxcache *prxcache)
|
||||
{
|
||||
_adapter *padapter = precv_frame->u.hdr.adapter;
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||
u8 *pdata = precv_frame->u.hdr.rx_data;
|
||||
u32 data_len = precv_frame->u.hdr.len;
|
||||
sint tid = precv_frame->u.hdr.attrib.priority;
|
||||
u64 tmp_iv_hdr = 0;
|
||||
u64 curr_pn = 0, pkt_pn = 0;
|
||||
|
||||
if (tid > 15)
|
||||
return _FAIL;
|
||||
|
||||
if (pattrib->encrypt == _AES_) {
|
||||
_rtw_memcpy(&tmp_iv_hdr, (pdata + pattrib->hdrlen), 8);
|
||||
tmp_iv_hdr = le64_to_cpu(tmp_iv_hdr);
|
||||
pkt_pn = (tmp_iv_hdr & 0x000000000000ffff) |
|
||||
((tmp_iv_hdr & 0xffffffff00000000) >> 16);
|
||||
|
||||
_rtw_memcpy(&tmp_iv_hdr, prxcache->iv[tid], 8);
|
||||
tmp_iv_hdr = le64_to_cpu(tmp_iv_hdr);
|
||||
curr_pn = (tmp_iv_hdr & 0x000000000000ffff) |
|
||||
((tmp_iv_hdr & 0xffffffff00000000) >> 16);
|
||||
|
||||
if (curr_pn == 0) {
|
||||
_rtw_memcpy(prxcache->iv[tid], (pdata + pattrib->hdrlen), sizeof(prxcache->iv[tid]));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (PN_LESS_CHK(pkt_pn, curr_pn) || PN_EQUAL_CHK(pkt_pn, curr_pn)) {
|
||||
/* return _FAIL; */
|
||||
} else
|
||||
_rtw_memcpy(prxcache->iv[tid], (pdata + pattrib->hdrlen), sizeof(prxcache->iv[tid]));
|
||||
}
|
||||
|
||||
exit:
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
sint recv_bcast_pn_decache(union recv_frame *precv_frame);
|
||||
sint recv_bcast_pn_decache(union recv_frame *precv_frame)
|
||||
{
|
||||
_adapter *padapter = precv_frame->u.hdr.adapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||
u8 *pdata = precv_frame->u.hdr.rx_data;
|
||||
u32 data_len = precv_frame->u.hdr.len;
|
||||
u64 tmp_iv_hdr = 0;
|
||||
u64 curr_pn = 0, pkt_pn = 0;
|
||||
u8 key_id;
|
||||
|
||||
if ((pattrib->encrypt == _AES_) &&
|
||||
(check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) {
|
||||
_rtw_memcpy(&tmp_iv_hdr, (pdata + pattrib->hdrlen), 8);
|
||||
tmp_iv_hdr = le64_to_cpu(tmp_iv_hdr);
|
||||
key_id = ((tmp_iv_hdr & 0x00000000c0000000) >> 30);
|
||||
pkt_pn = (tmp_iv_hdr & 0x000000000000ffff) |
|
||||
((tmp_iv_hdr & 0xffffffff00000000) >> 16);
|
||||
|
||||
if (key_id >= 4 )
|
||||
return _FAIL;
|
||||
|
||||
_rtw_memcpy(&tmp_iv_hdr, psecuritypriv->iv_seq[key_id], 8);
|
||||
tmp_iv_hdr = le64_to_cpu(tmp_iv_hdr);
|
||||
curr_pn = (tmp_iv_hdr & 0x000000000000ffff) |
|
||||
((tmp_iv_hdr & 0xffffffff00000000) >> 16);
|
||||
|
||||
if (PN_LESS_CHK(pkt_pn, curr_pn) || PN_EQUAL_CHK(pkt_pn, curr_pn)) {
|
||||
return _FAIL;
|
||||
} else
|
||||
_rtw_memcpy(psecuritypriv->iv_seq[key_id], (pdata + pattrib->hdrlen), sizeof(psecuritypriv->iv_seq[key_id]));
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
|
|
@ -1862,6 +1942,25 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!IS_MCAST(pattrib->ra)) {
|
||||
if (recv_ucast_pn_decache(precv_frame, &psta->sta_recvpriv.rxcache) == _FAIL) {
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
RTW_INFO("DBG_RX_DROP_FRAME %s recv_ucast_pn_decache return _FAIL\n", __func__);
|
||||
#endif
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
} else {
|
||||
if (recv_bcast_pn_decache(precv_frame) == _FAIL) {
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
RTW_INFO("DBG_RX_DROP_FRAME "FUNC_ADPT_FMT" recv_bcast_pn_decache _FAIL for invalid PN!\n"
|
||||
, FUNC_ADPT_ARG(adapter));
|
||||
#endif
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (pattrib->privacy) {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -505,8 +505,10 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable.
|
||||
* So, we initialize the tid_rxseq variable as the 0xffff. */
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
for (i = 0; i < 16; i++) {
|
||||
_rtw_memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
|
||||
_rtw_memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
|
||||
}
|
||||
|
||||
|
||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -242,11 +242,11 @@ struct coex_sta_8703b_1ant {
|
|||
u32 crc_err_11n_vht;
|
||||
|
||||
boolean cck_lock;
|
||||
boolean pre_ccklock;
|
||||
boolean cck_ever_lock;
|
||||
u8 coex_table_type;
|
||||
boolean cck_lock_ever;
|
||||
boolean cck_lock_warn;
|
||||
|
||||
boolean force_lps_on;
|
||||
u8 coex_table_type;
|
||||
boolean force_lps_ctrl;
|
||||
|
||||
boolean concurrent_rx_mode_on;
|
||||
|
||||
|
|
@ -280,6 +280,7 @@ struct coex_sta_8703b_1ant {
|
|||
u32 cnt_ReInit;
|
||||
u32 cnt_IgnWlanAct;
|
||||
u32 cnt_Page;
|
||||
u32 cnt_RoleSwitch;
|
||||
|
||||
u16 bt_reg_vendor_ac;
|
||||
u16 bt_reg_vendor_ae;
|
||||
|
|
@ -288,7 +289,20 @@ struct coex_sta_8703b_1ant {
|
|||
u8 wl_noisy_level;
|
||||
u32 gnt_error_cnt;
|
||||
|
||||
u8 bt_afh_map[10];
|
||||
u8 bt_relink_downcount;
|
||||
boolean is_tdma_btautoslot;
|
||||
boolean is_tdma_btautoslot_hang;
|
||||
|
||||
boolean is_rf_state_off;
|
||||
|
||||
boolean is_hid_low_pri_tx_overhead;
|
||||
boolean is_bt_multi_link;
|
||||
boolean is_bt_a2dp_sink;
|
||||
|
||||
u8 wl_fw_dbg_info[10];
|
||||
u8 wl_rx_rate;
|
||||
u8 wl_rts_rx_rate;
|
||||
};
|
||||
|
||||
#define BT_8703B_1ANT_ANTDET_PSD_POINTS 256 /* MAX:1024 */
|
||||
|
|
@ -354,6 +368,10 @@ void ex_halbtc8703b1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
|||
IN u8 type);
|
||||
void ex_halbtc8703b1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 *tmp_buf, IN u8 length);
|
||||
void ex_halbtc8703b1ant_wl_fwdbginfo_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 *tmp_buf, IN u8 length);
|
||||
void ex_halbtc8703b1ant_rx_rate_change_notify(IN struct btc_coexist *btcoexist,
|
||||
IN BOOLEAN is_data_frame, IN u8 btc_rate_id);
|
||||
void ex_halbtc8703b1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8703b1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||
|
|
@ -383,6 +401,8 @@ void ex_halbtc8703b1ant_display_ant_detection(IN struct btc_coexist *btcoexist);
|
|||
#define ex_halbtc8703b1ant_media_status_notify(btcoexist, type)
|
||||
#define ex_halbtc8703b1ant_specific_packet_notify(btcoexist, type)
|
||||
#define ex_halbtc8703b1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||
#define ex_halbtc8703b1ant_wl_fwdbginfo_notify(btcoexist, tmp_buf, length)
|
||||
#define ex_halbtc8703b1ant_rx_rate_change_notify(btcoexist, is_data_frame, btc_rate_id)
|
||||
#define ex_halbtc8703b1ant_rf_status_notify(btcoexist, type)
|
||||
#define ex_halbtc8703b1ant_halt_notify(btcoexist)
|
||||
#define ex_halbtc8703b1ant_pnp_notify(btcoexist, pnp_state)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,106 @@
|
|||
#ifndef __HALBTC_OUT_SRC_H__
|
||||
#define __HALBTC_OUT_SRC_H__
|
||||
|
||||
enum {
|
||||
BTC_CCK_1,
|
||||
BTC_CCK_2,
|
||||
BTC_CCK_5_5,
|
||||
BTC_CCK_11,
|
||||
BTC_OFDM_6,
|
||||
BTC_OFDM_9,
|
||||
BTC_OFDM_12,
|
||||
BTC_OFDM_18,
|
||||
BTC_OFDM_24,
|
||||
BTC_OFDM_36,
|
||||
BTC_OFDM_48,
|
||||
BTC_OFDM_54,
|
||||
BTC_MCS_0,
|
||||
BTC_MCS_1,
|
||||
BTC_MCS_2,
|
||||
BTC_MCS_3,
|
||||
BTC_MCS_4,
|
||||
BTC_MCS_5,
|
||||
BTC_MCS_6,
|
||||
BTC_MCS_7,
|
||||
BTC_MCS_8,
|
||||
BTC_MCS_9,
|
||||
BTC_MCS_10,
|
||||
BTC_MCS_11,
|
||||
BTC_MCS_12,
|
||||
BTC_MCS_13,
|
||||
BTC_MCS_14,
|
||||
BTC_MCS_15,
|
||||
BTC_MCS_16,
|
||||
BTC_MCS_17,
|
||||
BTC_MCS_18,
|
||||
BTC_MCS_19,
|
||||
BTC_MCS_20,
|
||||
BTC_MCS_21,
|
||||
BTC_MCS_22,
|
||||
BTC_MCS_23,
|
||||
BTC_MCS_24,
|
||||
BTC_MCS_25,
|
||||
BTC_MCS_26,
|
||||
BTC_MCS_27,
|
||||
BTC_MCS_28,
|
||||
BTC_MCS_29,
|
||||
BTC_MCS_30,
|
||||
BTC_MCS_31,
|
||||
BTC_VHT_1SS_MCS_0,
|
||||
BTC_VHT_1SS_MCS_1,
|
||||
BTC_VHT_1SS_MCS_2,
|
||||
BTC_VHT_1SS_MCS_3,
|
||||
BTC_VHT_1SS_MCS_4,
|
||||
BTC_VHT_1SS_MCS_5,
|
||||
BTC_VHT_1SS_MCS_6,
|
||||
BTC_VHT_1SS_MCS_7,
|
||||
BTC_VHT_1SS_MCS_8,
|
||||
BTC_VHT_1SS_MCS_9,
|
||||
BTC_VHT_2SS_MCS_0,
|
||||
BTC_VHT_2SS_MCS_1,
|
||||
BTC_VHT_2SS_MCS_2,
|
||||
BTC_VHT_2SS_MCS_3,
|
||||
BTC_VHT_2SS_MCS_4,
|
||||
BTC_VHT_2SS_MCS_5,
|
||||
BTC_VHT_2SS_MCS_6,
|
||||
BTC_VHT_2SS_MCS_7,
|
||||
BTC_VHT_2SS_MCS_8,
|
||||
BTC_VHT_2SS_MCS_9,
|
||||
BTC_VHT_3SS_MCS_0,
|
||||
BTC_VHT_3SS_MCS_1,
|
||||
BTC_VHT_3SS_MCS_2,
|
||||
BTC_VHT_3SS_MCS_3,
|
||||
BTC_VHT_3SS_MCS_4,
|
||||
BTC_VHT_3SS_MCS_5,
|
||||
BTC_VHT_3SS_MCS_6,
|
||||
BTC_VHT_3SS_MCS_7,
|
||||
BTC_VHT_3SS_MCS_8,
|
||||
BTC_VHT_3SS_MCS_9,
|
||||
BTC_VHT_4SS_MCS_0,
|
||||
BTC_VHT_4SS_MCS_1,
|
||||
BTC_VHT_4SS_MCS_2,
|
||||
BTC_VHT_4SS_MCS_3,
|
||||
BTC_VHT_4SS_MCS_4,
|
||||
BTC_VHT_4SS_MCS_5,
|
||||
BTC_VHT_4SS_MCS_6,
|
||||
BTC_VHT_4SS_MCS_7,
|
||||
BTC_VHT_4SS_MCS_8,
|
||||
BTC_VHT_4SS_MCS_9,
|
||||
BTC_MCS_32,
|
||||
BTC_UNKNOWN,
|
||||
BTC_PKT_MGNT,
|
||||
BTC_PKT_CTRL,
|
||||
BTC_PKT_UNKNOWN,
|
||||
BTC_PKT_NOT_FOR_ME,
|
||||
BTC_RATE_MAX
|
||||
};
|
||||
|
||||
enum {
|
||||
BTC_MULTIPORT_SCC,
|
||||
BTC_MULTIPORT_MCC_DUAL_CHANNEL,
|
||||
BTC_MULTIPORT_MCC_DUAL_BAND,
|
||||
BTC_MULTIPORT_MAX
|
||||
};
|
||||
|
||||
#define BTC_COEX_OFFLOAD 0
|
||||
#define BTC_TMP_BUF_SHORT 20
|
||||
|
|
@ -119,6 +219,7 @@ struct btc_board_info {
|
|||
u8 ant_det_result;
|
||||
boolean ant_det_result_five_complete;
|
||||
u32 antdetval;
|
||||
u8 customerID;
|
||||
};
|
||||
|
||||
typedef enum _BTC_DBG_OPCODE {
|
||||
|
|
@ -237,6 +338,7 @@ typedef enum _BTC_GET_TYPE {
|
|||
BTC_GET_BL_HS_CONNECTING,
|
||||
BTC_GET_BL_WIFI_FW_READY,
|
||||
BTC_GET_BL_WIFI_CONNECTED,
|
||||
BTC_GET_BL_WIFI_DUAL_BAND_CONNECTED,
|
||||
BTC_GET_BL_WIFI_BUSY,
|
||||
BTC_GET_BL_WIFI_SCAN,
|
||||
BTC_GET_BL_WIFI_LINK,
|
||||
|
|
@ -263,6 +365,8 @@ typedef enum _BTC_GET_TYPE {
|
|||
BTC_GET_U4_VENDOR,
|
||||
BTC_GET_U4_SUPPORTED_VERSION,
|
||||
BTC_GET_U4_SUPPORTED_FEATURE,
|
||||
BTC_GET_U4_BT_DEVICE_INFO,
|
||||
BTC_GET_U4_BT_FORBIDDEN_SLOT_VAL,
|
||||
BTC_GET_U4_WIFI_IQK_TOTAL,
|
||||
BTC_GET_U4_WIFI_IQK_OK,
|
||||
BTC_GET_U4_WIFI_IQK_FAIL,
|
||||
|
|
@ -277,6 +381,9 @@ typedef enum _BTC_GET_TYPE {
|
|||
BTC_GET_U1_ANT_TYPE,
|
||||
BTC_GET_U1_IOT_PEER,
|
||||
|
||||
/* type u2Byte */
|
||||
BTC_GET_U2_BEACON_PERIOD,
|
||||
|
||||
/*===== for 1Ant ======*/
|
||||
BTC_GET_U1_LPS_MODE,
|
||||
|
||||
|
|
@ -316,6 +423,8 @@ typedef enum _BTC_SET_TYPE {
|
|||
BTC_SET_ACT_LEAVE_LPS,
|
||||
BTC_SET_ACT_ENTER_LPS,
|
||||
BTC_SET_ACT_NORMAL_LPS,
|
||||
BTC_SET_ACT_PRE_NORMAL_LPS,
|
||||
BTC_SET_ACT_POST_NORMAL_LPS,
|
||||
BTC_SET_ACT_DISABLE_LOW_POWER,
|
||||
BTC_SET_ACT_UPDATE_RAMASK,
|
||||
BTC_SET_ACT_SEND_MIMO_PS,
|
||||
|
|
@ -668,6 +777,12 @@ typedef u4Byte
|
|||
IN u1Byte info_type
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
(*BTC_PHYDM_MODIFY_ANTDIV_HWSW)(
|
||||
IN PVOID pDM_Odm,
|
||||
IN u1Byte type
|
||||
);
|
||||
|
||||
typedef u1Byte
|
||||
(*BFP_BTC_GET_ANT_DET_VAL_FROM_BT)(
|
||||
|
||||
|
|
@ -772,6 +887,7 @@ struct btc_statistics {
|
|||
u32 cnt_coex_dm_switch;
|
||||
u32 cnt_stack_operation_notify;
|
||||
u32 cnt_dbg_ctrl;
|
||||
u32 cnt_rate_id_notify;
|
||||
};
|
||||
|
||||
struct btc_coexist {
|
||||
|
|
@ -830,6 +946,7 @@ struct btc_coexist {
|
|||
BFP_BTC_GET_PHYDM_VERSION btc_get_bt_phydm_version;
|
||||
BTC_PHYDM_MODIFY_RA_PCR_THRESHLOD btc_phydm_modify_RA_PCR_threshold;
|
||||
BTC_PHYDM_CMNINFOQUERY btc_phydm_query_PHY_counter;
|
||||
BTC_PHYDM_MODIFY_ANTDIV_HWSW btc_phydm_modify_ANTDIV_HwSw;
|
||||
BFP_BTC_GET_ANT_DET_VAL_FROM_BT btc_get_ant_det_val_from_bt;
|
||||
BFP_BTC_GET_BLE_SCAN_TYPE_FROM_BT btc_get_ble_scan_type_from_bt;
|
||||
BFP_BTC_GET_BLE_SCAN_PARA_FROM_BT btc_get_ble_scan_para_from_bt;
|
||||
|
|
@ -907,6 +1024,18 @@ EXhalbtcoutsrc_RfStatusNotify(
|
|||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_WlFwDbgInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_rx_rate_change_notify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN is_data_frame,
|
||||
IN u1Byte btc_rate_id
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_StackOperationNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ typedef enum _bt_op_code {
|
|||
BT_OP_GET_BT_ANT_DET_VAL = 0x2c,
|
||||
BT_OP_GET_BT_BLE_SCAN_PARA = 0x2d,
|
||||
BT_OP_GET_BT_BLE_SCAN_TYPE = 0x2e,
|
||||
BT_OP_GET_BT_DEVICE_INFO = 0x30,
|
||||
BT_OP_GET_BT_FORBIDDEN_SLOT_VAL = 0x31,
|
||||
BT_OP_MAX
|
||||
} BT_OP_CODE;
|
||||
|
||||
|
|
@ -357,6 +359,24 @@ void halbtcoutsrc_NormalLps(PBTC_COEXIST pBtCoexist)
|
|||
}
|
||||
}
|
||||
|
||||
void halbtcoutsrc_Pre_NormalLps(PBTC_COEXIST pBtCoexist)
|
||||
{
|
||||
PADAPTER padapter;
|
||||
|
||||
padapter = pBtCoexist->Adapter;
|
||||
|
||||
if (pBtCoexist->bt_info.bt_ctrl_lps) {
|
||||
pBtCoexist->bt_info.bt_lps_on = _FALSE;
|
||||
rtw_btcoex_LPS_Leave(padapter);
|
||||
}
|
||||
}
|
||||
|
||||
void halbtcoutsrc_Post_NormalLps(PBTC_COEXIST pBtCoexist)
|
||||
{
|
||||
if (pBtCoexist->bt_info.bt_ctrl_lps)
|
||||
pBtCoexist->bt_info.bt_ctrl_lps = _FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Constraint:
|
||||
* 1. this function will request pwrctrl->lock
|
||||
|
|
@ -499,9 +519,30 @@ u8 halbtcoutsrc_is_fw_ready(PBTC_COEXIST pBtCoexist)
|
|||
return padapter->bFWReady;
|
||||
}
|
||||
|
||||
u8 halbtcoutsrc_IsDualBandConnected(PADAPTER padapter)
|
||||
{
|
||||
u8 ret = BTC_MULTIPORT_SCC;
|
||||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
if (MCC_EN(padapter) && (rtw_hal_check_mcc_status(padapter, MCC_STATUS_DOING_MCC))) {
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct mcc_obj_priv *mccobjpriv = &(dvobj->mcc_objpriv);
|
||||
u8 band0 = mccobjpriv->iface[0]->mlmeextpriv.cur_channel > 14 ? BAND_ON_5G : BAND_ON_2_4G;
|
||||
u8 band1 = mccobjpriv->iface[1]->mlmeextpriv.cur_channel > 14 ? BAND_ON_5G : BAND_ON_2_4G;
|
||||
|
||||
if (band0 != band1)
|
||||
ret = BTC_MULTIPORT_MCC_DUAL_BAND;
|
||||
else
|
||||
ret = BTC_MULTIPORT_MCC_DUAL_CHANNEL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 halbtcoutsrc_IsWifiBusy(PADAPTER padapter)
|
||||
{
|
||||
if (rtw_mi_check_status(padapter, MI_AP_MODE))
|
||||
if (rtw_mi_check_status(padapter, MI_AP_ASSOC))
|
||||
return _TRUE;
|
||||
if (rtw_mi_busy_traffic_check(padapter, _FALSE))
|
||||
return _TRUE;
|
||||
|
|
@ -782,6 +823,68 @@ u32 halbtcoutsrc_GetBtCoexSupportedVersion(void *pBtcContext)
|
|||
return data;
|
||||
}
|
||||
|
||||
u32 halbtcoutsrc_GetBtDeviceInfo(void *pBtcContext)
|
||||
{
|
||||
PBTC_COEXIST pBtCoexist;
|
||||
u32 ret = BT_STATUS_BT_OP_SUCCESS;
|
||||
u32 btDeviceInfo = 0;
|
||||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
u8 buf[3] = {0};
|
||||
_irqL irqL;
|
||||
u8 op_code;
|
||||
u8 status;
|
||||
|
||||
_enter_critical_mutex(&GLBtcBtMpOperLock, &irqL);
|
||||
|
||||
op_code = BT_OP_GET_BT_DEVICE_INFO;
|
||||
status = _btmpoper_cmd(pBtCoexist, op_code, 0, buf, 0);
|
||||
if (status == BT_STATUS_BT_OP_SUCCESS)
|
||||
btDeviceInfo = le32_to_cpu(*(u32 *)GLBtcBtMpRptRsp);
|
||||
else
|
||||
ret = SET_BT_MP_OPER_RET(op_code, status);
|
||||
|
||||
_exit_critical_mutex(&GLBtcBtMpOperLock, &irqL);
|
||||
|
||||
} else
|
||||
ret = BT_STATUS_NOT_IMPLEMENT;
|
||||
|
||||
return btDeviceInfo;
|
||||
}
|
||||
|
||||
u32 halbtcoutsrc_GetBtForbiddenSlotVal(void *pBtcContext)
|
||||
{
|
||||
PBTC_COEXIST pBtCoexist;
|
||||
u32 ret = BT_STATUS_BT_OP_SUCCESS;
|
||||
u32 btForbiddenSlotVal = 0;
|
||||
|
||||
pBtCoexist = (PBTC_COEXIST)pBtcContext;
|
||||
|
||||
if (halbtcoutsrc_IsHwMailboxExist(pBtCoexist) == _TRUE) {
|
||||
u8 buf[3] = {0};
|
||||
_irqL irqL;
|
||||
u8 op_code;
|
||||
u8 status;
|
||||
|
||||
_enter_critical_mutex(&GLBtcBtMpOperLock, &irqL);
|
||||
|
||||
op_code = BT_OP_GET_BT_FORBIDDEN_SLOT_VAL;
|
||||
status = _btmpoper_cmd(pBtCoexist, op_code, 0, buf, 0);
|
||||
if (status == BT_STATUS_BT_OP_SUCCESS)
|
||||
btForbiddenSlotVal = le32_to_cpu(*(u32 *)GLBtcBtMpRptRsp);
|
||||
else
|
||||
ret = SET_BT_MP_OPER_RET(op_code, status);
|
||||
|
||||
_exit_critical_mutex(&GLBtcBtMpOperLock, &irqL);
|
||||
|
||||
} else
|
||||
ret = BT_STATUS_NOT_IMPLEMENT;
|
||||
|
||||
return btForbiddenSlotVal;
|
||||
}
|
||||
|
||||
static u8 halbtcoutsrc_GetWifiScanAPNum(PADAPTER padapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv;
|
||||
|
|
@ -813,6 +916,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
s32 *pS4Tmp;
|
||||
u32 *pU4Tmp;
|
||||
u8 *pU1Tmp;
|
||||
u16 *pU2Tmp;
|
||||
u8 ret;
|
||||
|
||||
|
||||
|
|
@ -829,6 +933,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
pS4Tmp = (s32 *)pOutBuf;
|
||||
pU4Tmp = (u32 *)pOutBuf;
|
||||
pU1Tmp = (u8 *)pOutBuf;
|
||||
pU2Tmp = (u16*)pOutBuf;
|
||||
ret = _TRUE;
|
||||
|
||||
switch (getType) {
|
||||
|
|
@ -850,6 +955,10 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
*pu8 = (rtw_mi_check_status(padapter, MI_LINKED)) ? _TRUE : _FALSE;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_DUAL_BAND_CONNECTED:
|
||||
*pu8 = halbtcoutsrc_IsDualBandConnected(padapter);
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_BUSY:
|
||||
*pu8 = halbtcoutsrc_IsWifiBusy(padapter);
|
||||
break;
|
||||
|
|
@ -877,7 +986,7 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_UNDER_5G:
|
||||
*pu8 = (pHalData->current_band_type == 1) ? _TRUE : _FALSE;
|
||||
*pu8 = (pHalData->current_band_type == BAND_ON_5G) ? _TRUE : _FALSE;
|
||||
break;
|
||||
|
||||
case BTC_GET_BL_WIFI_AP_MODE_ENABLE:
|
||||
|
|
@ -980,6 +1089,14 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
*pU4Tmp = halbtcoutsrc_GetBtCoexSupportedFeature(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_GET_U4_BT_DEVICE_INFO:
|
||||
*pU4Tmp = halbtcoutsrc_GetBtDeviceInfo(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_GET_U4_BT_FORBIDDEN_SLOT_VAL:
|
||||
*pU4Tmp = halbtcoutsrc_GetBtForbiddenSlotVal(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_GET_U4_WIFI_IQK_TOTAL:
|
||||
*pU4Tmp = pHalData->odmpriv.n_iqk_cnt;
|
||||
break;
|
||||
|
|
@ -1060,6 +1177,10 @@ u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
|
|||
*pU1Tmp = padapter->dvobj->pwrctl_priv.pwr_mode;
|
||||
break;
|
||||
|
||||
case BTC_GET_U2_BEACON_PERIOD:
|
||||
*pU2Tmp = mlmeext->mlmext_info.bcn_interval;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = _FALSE;
|
||||
break;
|
||||
|
|
@ -1181,6 +1302,14 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||
halbtcoutsrc_NormalLps(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_SET_ACT_PRE_NORMAL_LPS:
|
||||
halbtcoutsrc_Pre_NormalLps(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_SET_ACT_POST_NORMAL_LPS:
|
||||
halbtcoutsrc_Post_NormalLps(pBtCoexist);
|
||||
break;
|
||||
|
||||
case BTC_SET_ACT_DISABLE_LOW_POWER:
|
||||
halbtcoutsrc_DisableLowPower(pBtCoexist, *pu8);
|
||||
break;
|
||||
|
|
@ -1508,18 +1637,20 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
BOOLEAN bBtHsOn = _FALSE, bLowPower = _FALSE;
|
||||
u8 wifiChnl = 0, wifiP2PChnl = 0, nScanAPNum = 0, FwPSState;
|
||||
u32 iqk_cnt_total = 0, iqk_cnt_ok = 0, iqk_cnt_fail = 0;
|
||||
u16 wifiBcnInterval = 0;
|
||||
|
||||
wifiLinkStatus = halbtcoutsrc_GetWifiLinkStatus(pBtCoexist);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "STA/vWifi/HS/p2pGo/p2pGc", \
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d/ %d/ %d (mcc+2band = %d)", "STA/vWifi/HS/p2pGo/p2pGc",
|
||||
((wifiLinkStatus & WIFI_STA_CONNECTED) ? 1 : 0), ((wifiLinkStatus & WIFI_AP_CONNECTED) ? 1 : 0),
|
||||
((wifiLinkStatus & WIFI_HS_CONNECTED) ? 1 : 0), ((wifiLinkStatus & WIFI_P2P_GO_CONNECTED) ? 1 : 0),
|
||||
((wifiLinkStatus & WIFI_P2P_GC_CONNECTED) ? 1 : 0));
|
||||
((wifiLinkStatus & WIFI_P2P_GC_CONNECTED) ? 1 : 0),
|
||||
halbtcoutsrc_IsDualBandConnected(padapter) ? 1 : 0);
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d ", "Link/ Roam/ Scan", \
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d/ %d/ %d ", "Link/ Roam/ Scan",
|
||||
bLink, bRoam, bScan);
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
|
|
@ -1538,10 +1669,11 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_S4_WIFI_RSSI, &wifiRssi);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U1_WIFI_DOT11_CHNL, &wifiChnl);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U2_BEACON_PERIOD, &wifiBcnInterval);
|
||||
if ((wifiLinkStatus & WIFI_P2P_GO_CONNECTED) || (wifiLinkStatus & WIFI_P2P_GC_CONNECTED))
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U1_WIFI_P2P_CHNL, &wifiP2PChnl);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d dBm/ %d/ %d", "RSSI/ STA_Chnl/ P2P_Chnl", \
|
||||
wifiRssi -100, wifiChnl, wifiP2PChnl);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d dBm/ %d/ %d/ %d", "RSSI/ STA_Chnl/ P2P_Chnl/ BI",
|
||||
wifiRssi-100, wifiChnl, wifiP2PChnl, wifiBcnInterval);
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifiFreq);
|
||||
|
|
@ -1550,7 +1682,7 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, &wifiTrafficDir);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &bWifiUnderBMode);
|
||||
pBtCoexist->btc_get(pBtCoexist, BTC_GET_U1_AP_NUM, &nScanAPNum);
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s / %s/ %s/ %d ", "Band/ BW/ Traffic/ APCnt", \
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s / %s/ %s/ %d ", "Band/ BW/ Traffic/ APCnt",
|
||||
GLBtcWifiFreqString[wifiFreq], ((bWifiUnderBMode) ? "11b" : GLBtcWifiBwString[wifiBw]),
|
||||
((!bWifiBusy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX == wifiTrafficDir) ? "uplink" : "downlink")),
|
||||
nScanAPNum);
|
||||
|
|
@ -1563,7 +1695,7 @@ void halbtcoutsrc_DisplayWifiStatus(PBTC_COEXIST pBtCoexist)
|
|||
((halbtcoutsrc_Under32K(pBtCoexist) == _TRUE) ? ", 32k" : ""));
|
||||
CL_PRINTF(cliBuf);
|
||||
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)", "Power mode cmd(lps/rpwm)", \
|
||||
CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)", "Power mode cmd(lps/rpwm)",
|
||||
pBtCoexist->pwrModeVal[0], pBtCoexist->pwrModeVal[1],
|
||||
pBtCoexist->pwrModeVal[2], pBtCoexist->pwrModeVal[3],
|
||||
pBtCoexist->pwrModeVal[4], pBtCoexist->pwrModeVal[5],
|
||||
|
|
@ -2187,6 +2319,11 @@ u32 halbtcoutsrc_GetPhydmVersion(void *pBtcContext)
|
|||
#endif
|
||||
}
|
||||
|
||||
void halbtcoutsrc_phydm_modify_AntDiv_HwSw(void *pBtcContext, u8 is_hw)
|
||||
{
|
||||
/* empty function since we don't need it */
|
||||
}
|
||||
|
||||
void halbtcoutsrc_phydm_modify_RA_PCR_threshold(void *pBtcContext, u8 RA_offset_direction, u8 RA_threshold_offset)
|
||||
{
|
||||
struct btc_coexist *pBtCoexist = (struct btc_coexist *)pBtcContext;
|
||||
|
|
@ -2359,6 +2496,8 @@ u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
|
|||
EXhalbtcoutsrc_SetSingleAntPath(singleAntPath);
|
||||
}
|
||||
|
||||
pBtCoexist->board_info.customerID = RT_CID_DEFAULT;
|
||||
|
||||
/* set default antenna position to main port */
|
||||
pBtCoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
|
||||
|
||||
|
|
@ -2430,6 +2569,7 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
|
|||
pBtCoexist->btc_get_bt_phydm_version = halbtcoutsrc_GetPhydmVersion;
|
||||
pBtCoexist->btc_phydm_modify_RA_PCR_threshold = halbtcoutsrc_phydm_modify_RA_PCR_threshold;
|
||||
pBtCoexist->btc_phydm_query_PHY_counter = halbtcoutsrc_phydm_query_PHY_counter;
|
||||
pBtCoexist->btc_phydm_modify_ANTDIV_HwSw = halbtcoutsrc_phydm_modify_AntDiv_HwSw;
|
||||
|
||||
pBtCoexist->cli_buf = &GLBtcDbgBuf[0];
|
||||
|
||||
|
|
@ -2464,7 +2604,6 @@ void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist)
|
|||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return;
|
||||
|
||||
/* Power on setting function is only added in 8723B currently */
|
||||
if (IS_HARDWARE_TYPE_8723B(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8723b2ant_power_on_setting(pBtCoexist);
|
||||
|
|
@ -2472,6 +2611,11 @@ void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist)
|
|||
ex_halbtc8723b1ant_power_on_setting(pBtCoexist);
|
||||
}
|
||||
|
||||
if (IS_HARDWARE_TYPE_8703B(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8703b1ant_power_on_setting(pBtCoexist);
|
||||
}
|
||||
|
||||
if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8723d2ant_power_on_setting(pBtCoexist);
|
||||
|
|
@ -3137,6 +3281,52 @@ void EXhalbtcoutsrc_bt_info_notify(PBTC_COEXIST pBtCoexist, u8 *tmpBuf, u8 lengt
|
|||
/* halbtcoutsrc_NormalLowPower(pBtCoexist); */
|
||||
}
|
||||
|
||||
void EXhalbtcoutsrc_WlFwDbgInfoNotify(PBTC_COEXIST pBtCoexist, u8* tmpBuf, u8 length)
|
||||
{
|
||||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return;
|
||||
|
||||
#if 0
|
||||
if (IS_HARDWARE_TYPE_8821C(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8821c2ant_wl_fwdbginfo_notify(pBtCoexist, tmpBuf, length);
|
||||
else if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8821c1ant_wl_fwdbginfo_notify(pBtCoexist, tmpBuf, length);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IS_HARDWARE_TYPE_8703B(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8703b1ant_wl_fwdbginfo_notify(pBtCoexist, tmpBuf, length);
|
||||
}
|
||||
}
|
||||
|
||||
void EXhalbtcoutsrc_rx_rate_change_notify(PBTC_COEXIST pBtCoexist, u8 is_data_frame, u8 btc_rate_id)
|
||||
{
|
||||
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
|
||||
return;
|
||||
|
||||
pBtCoexist->statistics.cnt_rate_id_notify++;
|
||||
|
||||
if (IS_HARDWARE_TYPE_8703B(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8703b1ant_rx_rate_change_notify(pBtCoexist, is_data_frame, btc_rate_id);
|
||||
}
|
||||
#if 0
|
||||
else if (IS_HARDWARE_TYPE_8723D(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8723d1ant_rx_rate_change_notify(pBtCoexist, is_data_frame, btc_rate_id);
|
||||
else if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8723d2ant_rx_rate_change_notify(pBtCoexist, is_data_frame, btc_rate_id);
|
||||
} else if (IS_HARDWARE_TYPE_8821C(pBtCoexist->Adapter)) {
|
||||
if (pBtCoexist->board_info.btdm_ant_num == 1)
|
||||
ex_halbtc8821c1ant_rx_rate_change_notify(pBtCoexist, is_data_frame, btc_rate_id);
|
||||
else if (pBtCoexist->board_info.btdm_ant_num == 2)
|
||||
ex_halbtc8821c2ant_rx_rate_change_notify(pBtCoexist, is_data_frame, btc_rate_id);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID
|
||||
EXhalbtcoutsrc_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
|
|
@ -3722,6 +3912,277 @@ void EXhalbtcoutsrc_switchband_notify(struct btc_coexist *pBtCoexist, u8 type)
|
|||
/* halbtcoutsrc_NormalLowPower(pBtCoexist); */
|
||||
}
|
||||
|
||||
u8 EXhalbtcoutsrc_rate_id_to_btc_rate_id(u8 rate_id)
|
||||
{
|
||||
u8 btc_rate_id = BTC_UNKNOWN;
|
||||
|
||||
switch (rate_id) {
|
||||
/* CCK rates */
|
||||
case DESC_RATE1M:
|
||||
btc_rate_id = BTC_CCK_1;
|
||||
break;
|
||||
case DESC_RATE2M:
|
||||
btc_rate_id = BTC_CCK_2;
|
||||
break;
|
||||
case DESC_RATE5_5M:
|
||||
btc_rate_id = BTC_CCK_5_5;
|
||||
break;
|
||||
case DESC_RATE11M:
|
||||
btc_rate_id = BTC_CCK_11;
|
||||
break;
|
||||
|
||||
/* OFDM rates */
|
||||
case DESC_RATE6M:
|
||||
btc_rate_id = BTC_OFDM_6;
|
||||
break;
|
||||
case DESC_RATE9M:
|
||||
btc_rate_id = BTC_OFDM_9;
|
||||
break;
|
||||
case DESC_RATE12M:
|
||||
btc_rate_id = BTC_OFDM_12;
|
||||
break;
|
||||
case DESC_RATE18M:
|
||||
btc_rate_id = BTC_OFDM_18;
|
||||
break;
|
||||
case DESC_RATE24M:
|
||||
btc_rate_id = BTC_OFDM_24;
|
||||
break;
|
||||
case DESC_RATE36M:
|
||||
btc_rate_id = BTC_OFDM_36;
|
||||
break;
|
||||
case DESC_RATE48M:
|
||||
btc_rate_id = BTC_OFDM_48;
|
||||
break;
|
||||
case DESC_RATE54M:
|
||||
btc_rate_id = BTC_OFDM_54;
|
||||
break;
|
||||
|
||||
/* MCS rates */
|
||||
case DESC_RATEMCS0:
|
||||
btc_rate_id = BTC_MCS_0;
|
||||
break;
|
||||
case DESC_RATEMCS1:
|
||||
btc_rate_id = BTC_MCS_1;
|
||||
break;
|
||||
case DESC_RATEMCS2:
|
||||
btc_rate_id = BTC_MCS_2;
|
||||
break;
|
||||
case DESC_RATEMCS3:
|
||||
btc_rate_id = BTC_MCS_3;
|
||||
break;
|
||||
case DESC_RATEMCS4:
|
||||
btc_rate_id = BTC_MCS_4;
|
||||
break;
|
||||
case DESC_RATEMCS5:
|
||||
btc_rate_id = BTC_MCS_5;
|
||||
break;
|
||||
case DESC_RATEMCS6:
|
||||
btc_rate_id = BTC_MCS_6;
|
||||
break;
|
||||
case DESC_RATEMCS7:
|
||||
btc_rate_id = BTC_MCS_7;
|
||||
break;
|
||||
case DESC_RATEMCS8:
|
||||
btc_rate_id = BTC_MCS_8;
|
||||
break;
|
||||
case DESC_RATEMCS9:
|
||||
btc_rate_id = BTC_MCS_9;
|
||||
break;
|
||||
case DESC_RATEMCS10:
|
||||
btc_rate_id = BTC_MCS_10;
|
||||
break;
|
||||
case DESC_RATEMCS11:
|
||||
btc_rate_id = BTC_MCS_11;
|
||||
break;
|
||||
case DESC_RATEMCS12:
|
||||
btc_rate_id = BTC_MCS_12;
|
||||
break;
|
||||
case DESC_RATEMCS13:
|
||||
btc_rate_id = BTC_MCS_13;
|
||||
break;
|
||||
case DESC_RATEMCS14:
|
||||
btc_rate_id = BTC_MCS_14;
|
||||
break;
|
||||
case DESC_RATEMCS15:
|
||||
btc_rate_id = BTC_MCS_15;
|
||||
break;
|
||||
case DESC_RATEMCS16:
|
||||
btc_rate_id = BTC_MCS_16;
|
||||
break;
|
||||
case DESC_RATEMCS17:
|
||||
btc_rate_id = BTC_MCS_17;
|
||||
break;
|
||||
case DESC_RATEMCS18:
|
||||
btc_rate_id = BTC_MCS_18;
|
||||
break;
|
||||
case DESC_RATEMCS19:
|
||||
btc_rate_id = BTC_MCS_19;
|
||||
break;
|
||||
case DESC_RATEMCS20:
|
||||
btc_rate_id = BTC_MCS_20;
|
||||
break;
|
||||
case DESC_RATEMCS21:
|
||||
btc_rate_id = BTC_MCS_21;
|
||||
break;
|
||||
case DESC_RATEMCS22:
|
||||
btc_rate_id = BTC_MCS_22;
|
||||
break;
|
||||
case DESC_RATEMCS23:
|
||||
btc_rate_id = BTC_MCS_23;
|
||||
break;
|
||||
case DESC_RATEMCS24:
|
||||
btc_rate_id = BTC_MCS_24;
|
||||
break;
|
||||
case DESC_RATEMCS25:
|
||||
btc_rate_id = BTC_MCS_25;
|
||||
break;
|
||||
case DESC_RATEMCS26:
|
||||
btc_rate_id = BTC_MCS_26;
|
||||
break;
|
||||
case DESC_RATEMCS27:
|
||||
btc_rate_id = BTC_MCS_27;
|
||||
break;
|
||||
case DESC_RATEMCS28:
|
||||
btc_rate_id = BTC_MCS_28;
|
||||
break;
|
||||
case DESC_RATEMCS29:
|
||||
btc_rate_id = BTC_MCS_29;
|
||||
break;
|
||||
case DESC_RATEMCS30:
|
||||
btc_rate_id = BTC_MCS_30;
|
||||
break;
|
||||
case DESC_RATEMCS31:
|
||||
btc_rate_id = BTC_MCS_31;
|
||||
break;
|
||||
|
||||
case DESC_RATEVHTSS1MCS0:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_0;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS1:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_1;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS2:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_2;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS3:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_3;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS4:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_4;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS5:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_5;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS6:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_6;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS7:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_7;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS8:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_8;
|
||||
break;
|
||||
case DESC_RATEVHTSS1MCS9:
|
||||
btc_rate_id = BTC_VHT_1SS_MCS_9;
|
||||
break;
|
||||
|
||||
case DESC_RATEVHTSS2MCS0:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_0;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS1:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_1;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS2:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_2;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS3:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_3;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS4:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_4;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS5:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_5;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS6:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_6;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS7:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_7;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS8:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_8;
|
||||
break;
|
||||
case DESC_RATEVHTSS2MCS9:
|
||||
btc_rate_id = BTC_VHT_2SS_MCS_9;
|
||||
break;
|
||||
|
||||
case DESC_RATEVHTSS3MCS0:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_0;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS1:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_1;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS2:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_2;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS3:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_3;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS4:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_4;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS5:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_5;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS6:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_6;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS7:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_7;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS8:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_8;
|
||||
break;
|
||||
case DESC_RATEVHTSS3MCS9:
|
||||
btc_rate_id = BTC_VHT_3SS_MCS_9;
|
||||
break;
|
||||
|
||||
case DESC_RATEVHTSS4MCS0:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_0;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS1:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_1;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS2:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_2;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS3:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_3;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS4:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_4;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS5:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_5;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS6:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_6;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS7:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_7;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS8:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_8;
|
||||
break;
|
||||
case DESC_RATEVHTSS4MCS9:
|
||||
btc_rate_id = BTC_VHT_4SS_MCS_9;
|
||||
break;
|
||||
}
|
||||
|
||||
return btc_rate_id;
|
||||
}
|
||||
|
||||
static void halbt_init_hw_config92C(PADAPTER padapter)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData;
|
||||
|
|
@ -4500,4 +4961,14 @@ void hal_btcoex_switchband_notify(u8 under_scan, u8 band_type)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void hal_btcoex_WlFwDbgInfoNotify(PADAPTER padapter, u8* tmpBuf, u8 length)
|
||||
{
|
||||
EXhalbtcoutsrc_WlFwDbgInfoNotify(&GLBtCoexist, tmpBuf, length);
|
||||
}
|
||||
|
||||
void hal_btcoex_rx_rate_change_notify(PADAPTER padapter, u8 is_data_frame, u8 rate_id)
|
||||
{
|
||||
EXhalbtcoutsrc_rx_rate_change_notify(&GLBtCoexist, is_data_frame, EXhalbtcoutsrc_rate_id_to_btc_rate_id(rate_id));
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
|
|
|||
|
|
@ -3586,72 +3586,6 @@ static void rtw_hal_fw_sync_cam_id(_adapter *adapter)
|
|||
rtw_write8(adapter, REG_SECCFG, 0xcc);
|
||||
}
|
||||
|
||||
static void rtw_dump_aoac_rpt(_adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
struct aoac_report *paoac_rpt = &pwrctl->wowlan_aoac_rpt;
|
||||
|
||||
RTW_INFO_DUMP("[AOAC-RPT] IV -", paoac_rpt->iv, 8);
|
||||
RTW_INFO_DUMP("[AOAC-RPT] Replay counter of EAPOL key - ",
|
||||
paoac_rpt->replay_counter_eapol_key, 8);
|
||||
RTW_INFO_DUMP("[AOAC-RPT] Group key - ", paoac_rpt->group_key, 32);
|
||||
RTW_INFO("[AOAC-RPT] Key Index - %d\n", paoac_rpt->key_index);
|
||||
RTW_INFO("[AOAC-RPT] Security Type - %d\n", paoac_rpt->security_type);
|
||||
}
|
||||
|
||||
static void rtw_hal_get_aoac_rpt(_adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
struct aoac_report *paoac_rpt = &pwrctl->wowlan_aoac_rpt;
|
||||
u32 page_offset = 0, page_number = 0;
|
||||
u32 page_size = 0, buf_size = 0;
|
||||
u8 *buffer = NULL;
|
||||
u8 i = 0, tmp = 0;
|
||||
int ret = -1;
|
||||
|
||||
/* read aoac report from rsvd page */
|
||||
page_offset = pwrctl->wowlan_aoac_rpt_loc;
|
||||
page_number = 1;
|
||||
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_TX_PAGE_SIZE, &page_size);
|
||||
buf_size = page_size * page_number;
|
||||
|
||||
buffer = rtw_zvmalloc(buf_size);
|
||||
|
||||
if (NULL == buffer) {
|
||||
RTW_ERR("%s buffer allocate failed size(%d)\n",
|
||||
__func__, buf_size);
|
||||
return;
|
||||
}
|
||||
|
||||
RTW_INFO("Get AOAC Report from rsvd page_offset:%d\n", page_offset);
|
||||
|
||||
ret = rtw_hal_get_rsvd_page(adapter, page_offset,
|
||||
page_number, buffer, buf_size);
|
||||
|
||||
if (ret == _FALSE) {
|
||||
RTW_ERR("%s get aoac report failed\n", __func__);
|
||||
rtw_warn_on(1);
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
_rtw_memset(paoac_rpt, 0, sizeof(struct aoac_report));
|
||||
_rtw_memcpy(paoac_rpt, buffer, sizeof(struct aoac_report));
|
||||
|
||||
for (i = 0 ; i < 4 ; i++) {
|
||||
tmp = paoac_rpt->replay_counter_eapol_key[i];
|
||||
paoac_rpt->replay_counter_eapol_key[i] =
|
||||
paoac_rpt->replay_counter_eapol_key[7 - i];
|
||||
paoac_rpt->replay_counter_eapol_key[7 - i] = tmp;
|
||||
}
|
||||
|
||||
/* rtw_dump_aoac_rpt(adapter); */
|
||||
|
||||
_exit:
|
||||
if (buffer)
|
||||
rtw_vmfree(buffer, buf_size);
|
||||
}
|
||||
|
||||
static void rtw_hal_update_gtk_offload_info(_adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
|
|
@ -3662,7 +3596,7 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter)
|
|||
struct cam_ctl_t *cam_ctl = &dvobj->cam_ctl;
|
||||
_irqL irqL;
|
||||
u8 get_key[16];
|
||||
u8 gtk_id = 0, offset = 0;
|
||||
u8 gtk_id = 0, offset = 0, i = 0, sz = 0;
|
||||
u64 replay_count = 0;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
|
|
@ -3716,6 +3650,12 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter)
|
|||
&(paoac_rpt->group_key[offset]),
|
||||
RTW_TKIP_MIC_LEN);
|
||||
}
|
||||
/* Update broadcast RX IV */
|
||||
if (psecuritypriv->dot118021XGrpPrivacy == _AES_) {
|
||||
sz = sizeof(psecuritypriv->iv_seq[0]);
|
||||
for (i = 0 ; i < 4 ; i++)
|
||||
_rtw_memset(psecuritypriv->iv_seq[i], 0, sz);
|
||||
}
|
||||
|
||||
RTW_PRINT("GTK (%d) "KEY_FMT"\n", gtk_id,
|
||||
KEY_ARG(psecuritypriv->dot118021XGrpKey[gtk_id].skey));
|
||||
|
|
@ -3731,6 +3671,73 @@ static void rtw_hal_update_gtk_offload_info(_adapter *adapter)
|
|||
dump_sec_cam_cache(RTW_DBGDUMP, adapter);
|
||||
#endif
|
||||
}
|
||||
#endif /*CONFIG_GTK_OL*/
|
||||
|
||||
static void rtw_dump_aoac_rpt(_adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
struct aoac_report *paoac_rpt = &pwrctl->wowlan_aoac_rpt;
|
||||
|
||||
RTW_INFO_DUMP("[AOAC-RPT] IV -", paoac_rpt->iv, 8);
|
||||
RTW_INFO_DUMP("[AOAC-RPT] Replay counter of EAPOL key - ",
|
||||
paoac_rpt->replay_counter_eapol_key, 8);
|
||||
RTW_INFO_DUMP("[AOAC-RPT] Group key - ", paoac_rpt->group_key, 32);
|
||||
RTW_INFO("[AOAC-RPT] Key Index - %d\n", paoac_rpt->key_index);
|
||||
RTW_INFO("[AOAC-RPT] Security Type - %d\n", paoac_rpt->security_type);
|
||||
}
|
||||
|
||||
static void rtw_hal_get_aoac_rpt(_adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(adapter);
|
||||
struct aoac_report *paoac_rpt = &pwrctl->wowlan_aoac_rpt;
|
||||
u32 page_offset = 0, page_number = 0;
|
||||
u32 page_size = 0, buf_size = 0;
|
||||
u8 *buffer = NULL;
|
||||
u8 i = 0, tmp = 0;
|
||||
int ret = -1;
|
||||
|
||||
/* read aoac report from rsvd page */
|
||||
page_offset = pwrctl->wowlan_aoac_rpt_loc;
|
||||
page_number = 1;
|
||||
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_TX_PAGE_SIZE, &page_size);
|
||||
buf_size = page_size * page_number;
|
||||
|
||||
buffer = rtw_zvmalloc(buf_size);
|
||||
|
||||
if (buffer == NULL) {
|
||||
RTW_ERR("%s buffer allocate failed size(%d)\n",
|
||||
__func__, buf_size);
|
||||
return;
|
||||
}
|
||||
|
||||
RTW_INFO("Get AOAC Report from rsvd page_offset:%d\n", page_offset);
|
||||
|
||||
ret = rtw_hal_get_rsvd_page(adapter, page_offset,
|
||||
page_number, buffer, buf_size);
|
||||
|
||||
if (ret == _FALSE) {
|
||||
RTW_ERR("%s get aoac report failed\n", __func__);
|
||||
rtw_warn_on(1);
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
_rtw_memset(paoac_rpt, 0, sizeof(struct aoac_report));
|
||||
_rtw_memcpy(paoac_rpt, buffer, sizeof(struct aoac_report));
|
||||
|
||||
for (i = 0 ; i < 4 ; i++) {
|
||||
tmp = paoac_rpt->replay_counter_eapol_key[i];
|
||||
paoac_rpt->replay_counter_eapol_key[i] =
|
||||
paoac_rpt->replay_counter_eapol_key[7 - i];
|
||||
paoac_rpt->replay_counter_eapol_key[7 - i] = tmp;
|
||||
}
|
||||
|
||||
rtw_dump_aoac_rpt(adapter);
|
||||
|
||||
_exit:
|
||||
if (buffer)
|
||||
rtw_vmfree(buffer, buf_size);
|
||||
}
|
||||
|
||||
static void rtw_hal_update_tx_iv(_adapter *adapter)
|
||||
{
|
||||
|
|
@ -3777,10 +3784,15 @@ static void rtw_hal_update_tx_iv(_adapter *adapter)
|
|||
|
||||
static void rtw_hal_update_sw_security_info(_adapter *adapter)
|
||||
{
|
||||
struct security_priv *psecpriv = &adapter->securitypriv;
|
||||
|
||||
rtw_hal_update_tx_iv(adapter);
|
||||
rtw_hal_update_gtk_offload_info(adapter);
|
||||
#ifdef CONFIG_GTK_OL
|
||||
if (psecpriv->binstallKCK_KEK == _TRUE &&
|
||||
psecpriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK)
|
||||
rtw_hal_update_gtk_offload_info(adapter);
|
||||
#endif
|
||||
}
|
||||
#endif /*CONFIG_GTK_OL*/
|
||||
|
||||
static u8 rtw_hal_set_keep_alive_cmd(_adapter *adapter, u8 enable, u8 pkt_type)
|
||||
{
|
||||
|
|
@ -3812,7 +3824,7 @@ static u8 rtw_hal_set_disconnect_decision_cmd(_adapter *adapter, u8 enable)
|
|||
{
|
||||
struct hal_ops *pHalFunc = &adapter->hal_func;
|
||||
u8 u1H2CDisconDecisionParm[H2C_DISCON_DECISION_LEN] = {0};
|
||||
u8 adopt = 1, check_period = 10, trypkt_num = 0;
|
||||
u8 adopt = 1, check_period = 30, trypkt_num = 5;
|
||||
u8 ret = _FAIL;
|
||||
|
||||
SET_H2CCMD_DISCONDECISION_PARM_ENABLE(u1H2CDisconDecisionParm, enable);
|
||||
|
|
@ -7829,15 +7841,12 @@ static void rtw_hal_wow_disable(_adapter *adapter)
|
|||
rtw_hal_enable_tx_report(adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GTK_OL
|
||||
if (((pwrctl->wowlan_wake_reason != RX_DISASSOC) ||
|
||||
if ((pwrctl->wowlan_wake_reason != RX_DISASSOC) ||
|
||||
(pwrctl->wowlan_wake_reason != RX_DEAUTH) ||
|
||||
(pwrctl->wowlan_wake_reason != FW_DECISION_DISCONNECT)) &&
|
||||
psecuritypriv->binstallKCK_KEK == _TRUE) {
|
||||
(pwrctl->wowlan_wake_reason != FW_DECISION_DISCONNECT)) {
|
||||
rtw_hal_get_aoac_rpt(adapter);
|
||||
rtw_hal_update_sw_security_info(adapter);
|
||||
}
|
||||
#endif /*CONFIG_GTK_OL*/
|
||||
|
||||
rtw_hal_fw_dl(adapter, _FALSE);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ typedef enum _C2H_EVT {
|
|||
C2H_DEFEATURE_DBG = 0x22,
|
||||
C2H_CUSTOMER_STR_RPT = 0x24,
|
||||
C2H_CUSTOMER_STR_RPT_2 = 0x25,
|
||||
C2H_WLAN_INFO = 0x27,
|
||||
C2H_DEFEATURE_RSVD = 0xFD,
|
||||
C2H_EXTEND = 0xff,
|
||||
} C2H_EVT;
|
||||
|
|
|
|||
|
|
@ -857,6 +857,9 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
|||
case C2H_MAILBOX_STATUS:
|
||||
RTW_INFO_DUMP("C2H_MAILBOX_STATUS: ", payload, plen);
|
||||
break;
|
||||
case C2H_WLAN_INFO:
|
||||
rtw_btcoex_WlFwDbgInfoNotify(adapter, payload, plen);
|
||||
break;
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
case C2H_IQK_FINISH:
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -25,15 +25,17 @@
|
|||
|
||||
#ifdef LOAD_FW_HEADER_FROM_DRIVER
|
||||
#if (defined(CONFIG_AP_WOWLAN) || (DM_ODM_SUPPORT_TYPE & (ODM_AP)))
|
||||
extern u8 array_mp_8703b_fw_ap[19630];
|
||||
extern u8 array_mp_8703b_fw_ap[19808];
|
||||
extern u32 array_length_mp_8703b_fw_ap;
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN)) || (DM_ODM_SUPPORT_TYPE & (ODM_CE))
|
||||
extern u8 array_mp_8703b_fw_nic[19686];
|
||||
extern u8 array_mp_8703b_fw_nic[19824];
|
||||
extern u32 array_length_mp_8703b_fw_nic;
|
||||
extern u8 array_mp_8703b_fw_wowlan[24198];
|
||||
#ifdef CONFIG_WOWLAN
|
||||
extern u8 array_mp_8703b_fw_wowlan[22446];
|
||||
extern u32 array_length_mp_8703b_fw_wowlan;
|
||||
#endif /*CONFIG_WOWLAN*/
|
||||
#endif
|
||||
#endif /* end of LOAD_FW_HEADER_FROM_DRIVER */
|
||||
|
||||
|
|
|
|||
|
|
@ -1636,9 +1636,6 @@ static u8 ReadAdapterInfo8703BS(PADAPTER padapter)
|
|||
}
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
if (!rtw_is_hw_init_completed(padapter))
|
||||
rtw_write8(padapter, 0x67, 0x00); /* for BT, Switch Ant control to BT */
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,4 +91,11 @@ u16 hal_btcoex_btreg_read(PADAPTER padapter, u8 type, u16 addr, u32 *data);
|
|||
u16 hal_btcoex_btreg_write(PADAPTER padapter, u8 type, u16 addr, u16 val);
|
||||
void hal_btcoex_set_rfe_type(u8 type);
|
||||
void hal_btcoex_switchband_notify(u8 under_scan, u8 band_type);
|
||||
void hal_btcoex_WlFwDbgInfoNotify(PADAPTER padapter, u8* tmpBuf, u8 length);
|
||||
void hal_btcoex_rx_rate_change_notify(PADAPTER padapter, u8 is_data_frame, u8 rate_id);
|
||||
|
||||
#ifdef CONFIG_RF4CE_COEXIST
|
||||
void hal_btcoex_set_rf4ce_link_state(u8 state);
|
||||
u8 hal_btcoex_get_rf4ce_link_state(void);
|
||||
#endif
|
||||
#endif /* !__HAL_BTCOEX_H__ */
|
||||
|
|
|
|||
|
|
@ -384,6 +384,8 @@ void rtw_btcoex_BtMpRptNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
|||
void rtw_btcoex_SuspendNotify(PADAPTER, u8 state);
|
||||
void rtw_btcoex_HaltNotify(PADAPTER);
|
||||
void rtw_btcoex_switchband_notify(u8 under_scan, u8 band_type);
|
||||
void rtw_btcoex_WlFwDbgInfoNotify(PADAPTER padapter, u8* tmpBuf, u8 length);
|
||||
void rtw_btcoex_rx_rate_change_notify(PADAPTER padapter, u8 is_data_frame, u8 rate_id);
|
||||
void rtw_btcoex_SwitchBtTRxMask(PADAPTER);
|
||||
void rtw_btcoex_Switch(PADAPTER, u8 enable);
|
||||
u8 rtw_btcoex_IsBtDisabled(PADAPTER);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ struct recv_reorder_ctrl {
|
|||
|
||||
struct stainfo_rxcache {
|
||||
u16 tid_rxseq[16];
|
||||
u8 iv[16][8];
|
||||
#if 0
|
||||
unsigned short tid0_rxseq;
|
||||
unsigned short tid1_rxseq;
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ struct security_priv {
|
|||
union Keytype dot118021XGrprxmickey[4];
|
||||
union pn48 dot11Grptxpn; /* PN48 used for Grp Key xmit. */
|
||||
union pn48 dot11Grprxpn; /* PN48 used for Grp Key recv. */
|
||||
u8 iv_seq[4][8];
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
u32 dot11wBIPKeyid; /* key id used for BIP Key ( tx key index) */
|
||||
union Keytype dot11wBIPKey[6]; /* BIP Key, for index4 and index5 */
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#define DRIVERVERSION "v5.2.1_21569.20170329_COEX20170214-1500"
|
||||
#define BTCOEXVERSION "COEX20170214-1500"
|
||||
#define DRIVERVERSION "v5.2.1.7_25082.20171108_COEX20170626-1a00"
|
||||
#define BTCOEXVERSION "COEX20170626-1a00"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#define STATION_INFO_TX_BITRATE BIT(NL80211_STA_INFO_TX_BITRATE)
|
||||
#define STATION_INFO_RX_PACKETS BIT(NL80211_STA_INFO_RX_PACKETS)
|
||||
#define STATION_INFO_TX_PACKETS BIT(NL80211_STA_INFO_TX_PACKETS)
|
||||
#define STATION_INFO_TX_FAILED BIT(NL80211_STA_INFO_TX_FAILED)
|
||||
#define STATION_INFO_ASSOC_REQ_IES 0
|
||||
#endif /* Linux kernel >= 4.0.0 */
|
||||
|
||||
|
|
@ -1259,6 +1260,9 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
|||
_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
||||
padapter->securitypriv.binstallGrpkey = _TRUE;
|
||||
if (param->u.crypt.idx < 4)
|
||||
_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);
|
||||
|
||||
/* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */
|
||||
RTW_INFO(" ~~~~set sta key:groupkey\n");
|
||||
|
||||
|
|
@ -1703,6 +1707,9 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
|||
sinfo->filled |= STATION_INFO_TX_PACKETS;
|
||||
sinfo->tx_packets = psta->sta_stats.tx_pkts;
|
||||
|
||||
sinfo->filled |= STATION_INFO_TX_FAILED;
|
||||
sinfo->tx_failed = psta->sta_stats.tx_fail_cnt;
|
||||
|
||||
}
|
||||
|
||||
/* for Ad-Hoc/AP mode */
|
||||
|
|
|
|||
|
|
@ -1380,6 +1380,10 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
}
|
||||
padapter->securitypriv.binstallGrpkey = _TRUE;
|
||||
/* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */
|
||||
if (param->u.crypt.idx < 4) {
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);
|
||||
}
|
||||
RTW_INFO(" ~~~~set sta key:groupkey\n");
|
||||
|
||||
padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user