staging: r8723au: use kernel preferred style for commenting
Reworked comments per kernel coding style to improve readability. Corrects checkpatch.pl: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6b7bbd18c7
commit
e9cd7afaf1
@ -239,11 +239,16 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
||||
|
||||
if (psta->state & WIFI_SLEEP_STATE) {
|
||||
if (!(psta->state & WIFI_STA_ALIVE_CHK_STATE)) {
|
||||
/* to check if alive by another methods if station is at ps mode. */
|
||||
/*
|
||||
* check if alive by another method
|
||||
* if station is at ps mode.
|
||||
*/
|
||||
psta->expire_to = pstapriv->expire_to;
|
||||
psta->state |= WIFI_STA_ALIVE_CHK_STATE;
|
||||
|
||||
/* to update bcn with tim_bitmap for this station */
|
||||
/*
|
||||
* update bcn with tim_bitmap
|
||||
* for this station
|
||||
*/
|
||||
pstapriv->tim_bitmap |= CHKBIT(psta->aid);
|
||||
update_beacon23a(padapter, WLAN_EID_TIM, NULL, false);
|
||||
|
||||
@ -264,7 +269,10 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
||||
psta->hwaddr, psta->state);
|
||||
updated = ap_free_sta23a(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
|
||||
} else {
|
||||
/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
|
||||
/*
|
||||
* TODO: Aging mechanism to digest frames in
|
||||
* sleep_q to avoid running out of xmitframe
|
||||
*/
|
||||
if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt)
|
||||
&& padapter->xmitpriv.free_xmitframe_cnt < ((NR_XMITFRAME/pstapriv->asoc_list_cnt)/2)
|
||||
) {
|
||||
@ -285,7 +293,10 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
||||
|
||||
u8 backup_oper_channel = 0;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
/* switch to correct channel of current network before issue keep-alive frames */
|
||||
/*
|
||||
* switch to correct channel of current
|
||||
* network before issue keep-alive frames
|
||||
*/
|
||||
if (rtw_get_oper_ch23a(padapter) != pmlmeext->cur_channel) {
|
||||
backup_oper_channel = rtw_get_oper_ch23a(padapter);
|
||||
SelectChannel23a(padapter, pmlmeext->cur_channel);
|
||||
@ -332,7 +343,7 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
||||
|
||||
}
|
||||
|
||||
if (backup_oper_channel > 0) /* back to the original operation channel */
|
||||
if (backup_oper_channel > 0) /* back to original operation channel */
|
||||
SelectChannel23a(padapter, backup_oper_channel);
|
||||
}
|
||||
|
||||
@ -516,13 +527,13 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
|
||||
DBG_8723A("add_RATid23a_bmc_sta error!\n");
|
||||
}
|
||||
|
||||
/* notes: */
|
||||
/* AID: 1~MAX for sta and 0 for bc/mc in ap/adhoc mode */
|
||||
/* MAC_ID = AID+1 for sta in ap/adhoc mode */
|
||||
/* MAC_ID = 1 for bc/mc for sta/ap/adhoc */
|
||||
/* MAC_ID = 0 for bssid for sta/ap/adhoc */
|
||||
/* CAM_ID = 0~3 for default key, cmd_id = macid + 3, macid = aid+1; */
|
||||
|
||||
/*
|
||||
* AID: 1~MAX for sta and 0 for bc/mc in ap/adhoc mode
|
||||
* MAC_ID = AID+1 for sta in ap/adhoc mode
|
||||
* MAC_ID = 1 for bc/mc for sta/ap/adhoc
|
||||
* MAC_ID = 0 for bssid for sta/ap/adhoc
|
||||
* CAM_ID = 0~3 for default key, cmd_id = macid + 3, macid = aid + 1;
|
||||
*/
|
||||
void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
@ -599,11 +610,10 @@ static void update_hw_ht_param(struct rtw_adapter *padapter)
|
||||
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
|
||||
|
||||
DBG_8723A("%s\n", __func__);
|
||||
|
||||
/* handle A-MPDU parameter field */
|
||||
/*
|
||||
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
|
||||
AMPDU_para [4:2]:Min MPDU Start Spacing
|
||||
* handle A-MPDU parameter field
|
||||
* AMPDU_para [1:0]:Max AMPDU Len => 0:8k, 1:16k, 2:32k, 3:64k
|
||||
* AMPDU_para [4:2]:Min MPDU Start Spacing
|
||||
*/
|
||||
max_AMPDU_len = pmlmeinfo->ht_cap.ampdu_params_info &
|
||||
IEEE80211_HT_AMPDU_PARM_FACTOR;
|
||||
@ -641,9 +651,13 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
||||
cur_bwmode = HT_CHANNEL_WIDTH_20;
|
||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
|
||||
/* check if there is wps ie, */
|
||||
/* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
|
||||
/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
|
||||
/*
|
||||
* check if there is wps ie
|
||||
* if there is wpsie in beacon the hostapd will
|
||||
* update beacon twice when stating hostapd
|
||||
* and at first time the security
|
||||
* ie (RSN/WPA IE) will not include in beacon
|
||||
*/
|
||||
if (NULL == cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
||||
WLAN_OUI_TYPE_MICROSOFT_WPS,
|
||||
pnetwork->IEs,
|
||||
@ -663,8 +677,11 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
||||
}
|
||||
|
||||
if (pmlmepriv->cur_network.join_res != true) {
|
||||
/* setting only at first time */
|
||||
/* WEP Key will be set before this function, do not clear CAM. */
|
||||
/*
|
||||
* setting only at first time
|
||||
* WEP Key will be set before this
|
||||
* function, do not clear CAM.
|
||||
*/
|
||||
if (psecuritypriv->dot11PrivacyAlgrthm !=
|
||||
WLAN_CIPHER_SUITE_WEP40 &&
|
||||
psecuritypriv->dot11PrivacyAlgrthm !=
|
||||
@ -722,8 +739,10 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
||||
switch (pht_info->ht_param &
|
||||
IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
|
||||
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
|
||||
/* pmlmeext->cur_ch_offset =
|
||||
HAL_PRIME_CHNL_OFFSET_LOWER; */
|
||||
/*
|
||||
* pmlmeext->cur_ch_offset =
|
||||
* HAL_PRIME_CHNL_OFFSET_LOWER;
|
||||
*/
|
||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
|
||||
break;
|
||||
case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
|
||||
@ -735,7 +754,10 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
||||
}
|
||||
}
|
||||
}
|
||||
/* TODO: need to judge the phy parameters on concurrent mode for single phy */
|
||||
/*
|
||||
* TODO: need to judge the phy parameters
|
||||
* on concurrent mode for single phy
|
||||
*/
|
||||
set_channel_bwmode23a(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
|
||||
DBG_8723A("CH =%d, BW =%d, offset =%d\n", cur_channel, cur_bwmode,
|
||||
@ -934,7 +956,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||
if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
|
||||
pmlmepriv->qos_option = 1;
|
||||
|
||||
*(p+8) |= BIT(7);/* QoS Info, support U-APSD */
|
||||
*(p + 8) |= BIT(7);/* QoS Info:support U-APSD */
|
||||
|
||||
/* disable all ACM bits since the WMM admission
|
||||
* control is not supported
|
||||
@ -1286,16 +1308,16 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
||||
}
|
||||
|
||||
/*
|
||||
op_mode
|
||||
Set to 0 (HT pure) under the following conditions
|
||||
- all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
|
||||
- all STAs in the BSS are 20 MHz HT in 20 MHz BSS
|
||||
Set to 1 (HT non-member protection) if there may be non-HT STAs
|
||||
in both the primary and the secondary channel
|
||||
Set to 2 if only HT STAs are associated in BSS,
|
||||
however and at least one 20 MHz HT STA is associated
|
||||
Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
|
||||
(currently non-GF HT station is considered as non-HT STA also)
|
||||
* op_mode
|
||||
* Set to 0 (HT pure) under the following conditions
|
||||
* - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
|
||||
* - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
|
||||
* Set to 1 (HT non-member protection) if there may be non-HT STAs
|
||||
* in both the primary and the secondary channel
|
||||
* Set to 2 if only HT STAs are associated in BSS,
|
||||
* however and at least one 20 MHz HT STA is associated
|
||||
* Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
|
||||
* (currently non-GF HT station is considered as non-HT STA also)
|
||||
*/
|
||||
static int rtw_ht_operation_update(struct rtw_adapter *padapter)
|
||||
{
|
||||
@ -1338,7 +1360,8 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
|
||||
op_mode_changes++;
|
||||
}
|
||||
|
||||
/* Note: currently we switch to the MIXED op mode if HT non-greenfield
|
||||
/*
|
||||
* Note: currently we switch to the MIXED op mode if HT non-greenfield
|
||||
* station is associated. Probably it's a theoretical case, since
|
||||
* it looks like all known HT STAs support greenfield.
|
||||
*/
|
||||
@ -1870,7 +1893,10 @@ void stop_ap_mode23a(struct rtw_adapter *padapter)
|
||||
pmlmepriv->update_bcn = false;
|
||||
pmlmeext->bstart_bss = false;
|
||||
|
||||
/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */
|
||||
/*
|
||||
* reset and init security priv , this can
|
||||
* refine with rtw_reset_securitypriv23a
|
||||
*/
|
||||
memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
|
||||
padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
|
||||
|
Reference in New Issue
Block a user