1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-19 12:04:48 +00:00

minor updates

This commit is contained in:
morrownr 2023-02-09 23:34:54 -06:00
parent 5f3bbbf007
commit 7d16a68513
2 changed files with 33 additions and 29 deletions

View File

@ -87,7 +87,7 @@
#define WIFI_CIPHER_SUITE_BIP_CMAC_256 0x000FAC0D
/*
* If customer need, defining this flag will make driver
* If customer need, defining this flag will make driver
* always return -EBUSY at the condition of scan deny.
*/
/* #define CONFIG_NOTIFY_SCAN_ABORT_WITH_BUSY */
@ -295,7 +295,7 @@ static void rtw_get_chbw_from_cfg80211_chan_def(struct cfg80211_chan_def *chdef,
rtw_warn_on(1);
*ch = 0;
return;
}
}
switch (chdef->width) {
case NL80211_CHAN_WIDTH_20_NOHT:
@ -1813,8 +1813,8 @@ 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);
if (param->u.crypt.idx < 4)
_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);
padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx;
rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE);
} else if (strcmp(param->u.crypt.alg, "GCMP_256") == 0
@ -2127,7 +2127,7 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|| (MLME_IS_STA(adapter) && !pairwise)
#endif
) {
) {
/* WEP key, TX GTK/IGTK, RX GTK/IGTK(for STA mode) */
if (is_wep_enc(sec->dot118021XGrpPrivacy)) {
if (keyid >= WEP_KEYS)
@ -2239,7 +2239,7 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
}
ret = 0;
exit:
RTW_INFO(FUNC_NDEV_FMT
GET_KEY_PARAM_FMT_S
@ -3234,7 +3234,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
if (request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
get_random_mask_addr(pwdev_priv->pno_mac_addr, request->mac_addr,
request->mac_addr_mask);
print_hex_dump(KERN_DEBUG, "random mac_addr: ",
print_hex_dump(KERN_DEBUG, "random mac_addr: ",
DUMP_PREFIX_OFFSET, 16, 1, pwdev_priv->pno_mac_addr, ETH_ALEN, 1);
}
else
@ -3557,7 +3557,7 @@ check_need_indicate_scan_done:
info.aborted = 0;
#endif
/* the process time of scan results must be over at least 1ms in the newly Android */
rtw_msleep_os(1);
rtw_msleep_os(1);
_rtw_cfg80211_surveydone_event_callback(padapter, request);
#if (KERNEL_VERSION(4, 8, 0) <= LINUX_VERSION_CODE)
@ -3817,8 +3817,8 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key
psecuritypriv->rsn_akm_suite_type = 4;
}
#endif
else if (key_mgt == WLAN_AKM_SUITE_SAE) {
psecuritypriv->rsn_akm_suite_type = 8;
else if (key_mgt == WLAN_AKM_SUITE_SAE) {
psecuritypriv->rsn_akm_suite_type = 8;
} else {
RTW_INFO("Invalid key mgt: 0x%x\n", key_mgt);
/* return -EINVAL; */
@ -6104,7 +6104,7 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde
else
_rtw_memcpy(mac, plink->addr, ETH_ALEN);
#endif
sinfo->filled = 0;
if (psta) {
@ -6266,11 +6266,15 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy
#endif
, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type)
{
#ifdef CONFIG_WIFI_MONITOR
_adapter *padapter = wiphy_to_adapter(wiphy);
#else /* CONFIG_WIFI_MONITOR */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
#else
_adapter *padapter = wiphy_to_adapter(wiphy);
#endif
#endif /* CONFIG_WIFI_MONITOR */
int chan_target = (u8) ieee80211_frequency_to_channel(chan->center_freq);
int chan_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
int chan_width = CHANNEL_WIDTH_20;
@ -8825,7 +8829,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "path_refresh_time:%u\n", conf->path_refresh_time);
RTW_PRINT_SEL(sel, "min_discovery_timeout:%u\n", conf->min_discovery_timeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathTimeout:%u\n", conf->dot11MeshHWMPactivePathTimeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMPpreqMinInterval:%u\n", conf->dot11MeshHWMPpreqMinInterval);
RTW_PRINT_SEL(sel, "dot11MeshHWMPpreqMinInterval:%u\n", conf->dot11MeshHWMPpreqMinInterval);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0))
RTW_PRINT_SEL(sel, "dot11MeshHWMPperrMinInterval:%u\n", conf->dot11MeshHWMPperrMinInterval);
#endif
@ -8840,11 +8844,11 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "dot11MeshForwarding:%d\n", conf->dot11MeshForwarding);
RTW_PRINT_SEL(sel, "rssi_threshold:%d\n", conf->rssi_threshold);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
RTW_PRINT_SEL(sel, "ht_opmode:0x%04x\n", conf->ht_opmode);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
RTW_PRINT_SEL(sel, "dot11MeshHWMPactivePathToRootTimeout:%u\n", conf->dot11MeshHWMPactivePathToRootTimeout);
RTW_PRINT_SEL(sel, "dot11MeshHWMProotInterval:%u\n", conf->dot11MeshHWMProotInterval);
@ -8855,7 +8859,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)
RTW_PRINT_SEL(sel, "power_mode:%s\n", nl80211_mesh_power_mode_str(conf->power_mode));
RTW_PRINT_SEL(sel, "dot11MeshAwakeWindowDuration:%u\n", conf->dot11MeshAwakeWindowDuration);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
RTW_PRINT_SEL(sel, "plink_timeout:%u\n", conf->plink_timeout);
#endif
@ -8991,14 +8995,14 @@ static void rtw_cfg80211_mesh_cfg_set(_adapter *adapter, const struct mesh_confi
if (chk_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask));
#endif
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, mask))
mcfg->dot11MeshHWMPactivePathToRootTimeout = conf->dot11MeshHWMPactivePathToRootTimeout;
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_ROOT_INTERVAL, mask))
mcfg->dot11MeshHWMProotInterval = conf->dot11MeshHWMProotInterval;
if (chk_mesh_attr(NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, mask))
mcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval;
mcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval;
#endif
#if 0 /* TBD */
@ -9056,7 +9060,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte
#endif
if (!ch)
goto exit;
#if defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
vht = ht && ch > 14 && bw >= CHANNEL_WIDTH_80; /* VHT40/VHT20? */
#endif
@ -9387,7 +9391,7 @@ static int cfg80211_rtw_join_mesh(struct wiphy *wiphy, struct net_device *dev,
ret = -EINVAL;
goto exit;
}
rtw_mesh_work(&adapter->mesh_work);
exit:
@ -9467,7 +9471,7 @@ static int cfg80211_rtw_del_mpath(struct wiphy *wiphy, struct net_device *dev
}
} else {
rtw_mesh_path_flush_by_iface(adapter);
}
}
exit:
return ret;
@ -9768,13 +9772,13 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
//rtw_sitesurvey_cmd(padapter, NULL);
rtw_sitesurvey_cmd(padapter, &parm);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {
if(check_fwstate(pmlmepriv, WIFI_UNDER_SURVEY) == _FALSE)
break;
rtw_msleep_os(1000);
}
_enter_critical_bh(&pmlmepriv->lock, &irqL);
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
@ -9782,7 +9786,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
}
RTW_DBG("<== %s\n",__func__);
return 0;
}
#endif /* CONFIG_PNO_SUPPORT */

View File

@ -118,7 +118,7 @@ MODULE_PARM_DESC(rtw_wow_lps_1t1r, "The default WOW LPS 1T1R setting");
#endif
#endif /* CONFIG_WOWLAN */
/* LPS:
/* LPS:
* rtw_smart_ps = 0 => TX: pwr bit = 1, RX: PS_Poll
* rtw_smart_ps = 1 => TX: pwr bit = 0, RX: PS_Poll
* rtw_smart_ps = 2 => TX: pwr bit = 0, RX: NullData with pwr bit = 0
@ -127,8 +127,8 @@ int rtw_smart_ps = 2;
int rtw_max_bss_cnt = 0;
module_param(rtw_max_bss_cnt, int, 0644);
#ifdef CONFIG_WMMPS_STA
/* WMMPS:
#ifdef CONFIG_WMMPS_STA
/* WMMPS:
* rtw_smart_ps = 0 => Only for fw test
* rtw_smart_ps = 1 => Refer to Beacon's TIM Bitmap
* rtw_smart_ps = 2 => Don't refer to Beacon's TIM Bitmap
@ -200,7 +200,7 @@ int rtw_uapsd_ac_enable = 0x0;
/*PHYDM API, must enable by default*/
int rtw_pwrtrim_enable = 1;
#else
int rtw_pwrtrim_enable = 0; /* Default Enalbe power trim by efuse config */
int rtw_pwrtrim_enable = 0; /* Default Enable power trim by efuse config */
#endif
#if CONFIG_TX_AC_LIFETIME
@ -3915,7 +3915,7 @@ int _netdev_open(struct net_device *pnetdev)
#ifdef CONFIG_IOCTL_CFG80211
rtw_cfg80211_init_wdev_data(padapter);
#endif
/* rtw_netif_carrier_on(pnetdev); */ /* call this func when rtw_joinbss_event_callback return success */
rtw_netif_carrier_on(pnetdev); /* call this func when rtw_joinbss_event_callback return success */
rtw_netif_wake_queue(pnetdev);
#ifdef CONFIG_BR_EXT
@ -4036,7 +4036,7 @@ int _netdev_open(struct net_device *pnetdev)
rtw_set_pwr_state_check_timer(pwrctrlpriv);
#endif
/* rtw_netif_carrier_on(pnetdev); */ /* call this func when rtw_joinbss_event_callback return success */
rtw_netif_carrier_on(pnetdev); /* call this func when rtw_joinbss_event_callback return success */
rtw_netif_wake_queue(pnetdev);
#ifdef CONFIG_BR_EXT