Commit f237216e authored by Tina Ruchandani's avatar Tina Ruchandani Committed by Greg Kroah-Hartman

Staging: rtl8723au: core: Dont have { on new line

This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.
Signed-off-by: default avatarTina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eca6a887
...@@ -231,12 +231,10 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ...@@ -231,12 +231,10 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
psta->expire_to--; psta->expire_to--;
} }
if (psta->expire_to <= 0) if (psta->expire_to <= 0) {
{
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
if (padapter->registrypriv.wifi_spec == 1) if (padapter->registrypriv.wifi_spec == 1) {
{
psta->expire_to = pstapriv->expire_to; psta->expire_to = pstapriv->expire_to;
continue; continue;
} }
...@@ -308,15 +306,12 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ...@@ -308,15 +306,12 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
ret = issue_nulldata23a(padapter, psta->hwaddr, 0, 3, 50); ret = issue_nulldata23a(padapter, psta->hwaddr, 0, 3, 50);
psta->keep_alive_trycnt++; psta->keep_alive_trycnt++;
if (ret == _SUCCESS) if (ret == _SUCCESS) {
{
DBG_8723A("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr)); DBG_8723A("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr));
psta->expire_to = pstapriv->expire_to; psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0; psta->keep_alive_trycnt = 0;
continue; continue;
} } else if (psta->keep_alive_trycnt <= 3) {
else if (psta->keep_alive_trycnt <= 3)
{
DBG_8723A("ack check for asoc expire, keep_alive_trycnt =%d\n", psta->keep_alive_trycnt); DBG_8723A("ack check for asoc expire, keep_alive_trycnt =%d\n", psta->keep_alive_trycnt);
psta->expire_to = 1; psta->expire_to = 1;
continue; continue;
...@@ -363,8 +358,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l ...@@ -363,8 +358,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l
return; return;
/* b/g mode ra_bitmap */ /* b/g mode ra_bitmap */
for (i = 0; i < sizeof(psta->bssrateset); i++) for (i = 0; i < sizeof(psta->bssrateset); i++) {
{
if (psta->bssrateset[i]) if (psta->bssrateset[i])
tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f); tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f);
} }
...@@ -406,8 +400,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l ...@@ -406,8 +400,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l
raid = networktype_to_raid23a(sta_band); raid = networktype_to_raid23a(sta_band);
init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f; init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f;
if (psta->aid < NUM_STA) if (psta->aid < NUM_STA) {
{
u8 arg = 0; u8 arg = 0;
arg = psta->mac_id&0x1f; arg = psta->mac_id&0x1f;
...@@ -436,11 +429,8 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l ...@@ -436,11 +429,8 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l
psta->raid = raid; psta->raid = raid;
psta->init_rate = init_rate; psta->init_rate = init_rate;
} } else
else
{
DBG_8723A("station aid %d exceed the max number\n", psta->aid); DBG_8723A("station aid %d exceed the max number\n", psta->aid);
}
} }
static void update_bmc_sta(struct rtw_adapter *padapter) static void update_bmc_sta(struct rtw_adapter *padapter)
...@@ -453,8 +443,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) ...@@ -453,8 +443,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
struct wlan_bssid_ex *pcur_network = &pmlmepriv->cur_network.network; struct wlan_bssid_ex *pcur_network = &pmlmepriv->cur_network.network;
struct sta_info *psta = rtw_get_bcmc_stainfo23a(padapter); struct sta_info *psta = rtw_get_bcmc_stainfo23a(padapter);
if (psta) if (psta) {
{
psta->aid = 0;/* default set to 0 */ psta->aid = 0;/* default set to 0 */
psta->mac_id = psta->aid + 1; psta->mac_id = psta->aid + 1;
...@@ -474,8 +463,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) ...@@ -474,8 +463,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
psta->bssratelen = supportRateNum; psta->bssratelen = supportRateNum;
/* b/g mode ra_bitmap */ /* b/g mode ra_bitmap */
for (i = 0; i < supportRateNum; i++) for (i = 0; i < supportRateNum; i++) {
{
if (psta->bssrateset[i]) if (psta->bssrateset[i])
tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f); tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f);
} }
...@@ -522,11 +510,8 @@ static void update_bmc_sta(struct rtw_adapter *padapter) ...@@ -522,11 +510,8 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
psta->state = _FW_LINKED; psta->state = _FW_LINKED;
spin_unlock_bh(&psta->lock); spin_unlock_bh(&psta->lock);
} } else
else
{
DBG_8723A("add_RATid23a_bmc_sta error!\n"); DBG_8723A("add_RATid23a_bmc_sta error!\n");
}
} }
/* notes: */ /* notes: */
...@@ -561,8 +546,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info ...@@ -561,8 +546,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info
/* ERP */ /* ERP */
VCS_update23a(padapter, psta); VCS_update23a(padapter, psta);
/* HT related cap */ /* HT related cap */
if (phtpriv_sta->ht_option) if (phtpriv_sta->ht_option) {
{
/* check if sta supports rx ampdu */ /* check if sta supports rx ampdu */
phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable; phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable;
...@@ -580,9 +564,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info ...@@ -580,9 +564,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info
psta->qos_option = true; psta->qos_option = true;
} } else {
else
{
phtpriv_sta->ampdu_enable = false; phtpriv_sta->ampdu_enable = false;
phtpriv_sta->sgi = false; phtpriv_sta->sgi = false;
...@@ -1258,8 +1240,7 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx) ...@@ -1258,8 +1240,7 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
spin_lock_bh(&pmlmepriv->bcn_update_lock); spin_lock_bh(&pmlmepriv->bcn_update_lock);
switch (ie_id) switch (ie_id) {
{
case 0xFF: case 0xFF:
/* 8: TimeStamp, 2: Beacon Interval 2:Capability */ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
update_bcn_fixed_ie(padapter); update_bcn_fixed_ie(padapter);
...@@ -1386,8 +1367,7 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter) ...@@ -1386,8 +1367,7 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
void associated_clients_update23a(struct rtw_adapter *padapter, u8 updated) void associated_clients_update23a(struct rtw_adapter *padapter, u8 updated)
{ {
/* update associated stations cap. */ /* update associated stations cap. */
if (updated == true) if (updated == true) {
{
struct list_head *phead, *plist, *ptmp; struct list_head *phead, *plist, *ptmp;
struct sta_info *psta; struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
...@@ -1413,34 +1393,27 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1413,34 +1393,27 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
if (!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) if (!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) {
{ if (!psta->no_short_preamble_set) {
if (!psta->no_short_preamble_set)
{
psta->no_short_preamble_set = 1; psta->no_short_preamble_set = 1;
pmlmepriv->num_sta_no_short_preamble++; pmlmepriv->num_sta_no_short_preamble++;
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
(pmlmepriv->num_sta_no_short_preamble == 1)) (pmlmepriv->num_sta_no_short_preamble == 1)) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
} }
} } else {
else if (psta->no_short_preamble_set) {
{
if (psta->no_short_preamble_set)
{
psta->no_short_preamble_set = 0; psta->no_short_preamble_set = 0;
pmlmepriv->num_sta_no_short_preamble--; pmlmepriv->num_sta_no_short_preamble--;
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
(pmlmepriv->num_sta_no_short_preamble == 0)) (pmlmepriv->num_sta_no_short_preamble == 0)) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
...@@ -1448,32 +1421,25 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1448,32 +1421,25 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
} }
} }
if (psta->flags & WLAN_STA_NONERP) if (psta->flags & WLAN_STA_NONERP) {
{ if (!psta->nonerp_set) {
if (!psta->nonerp_set)
{
psta->nonerp_set = 1; psta->nonerp_set = 1;
pmlmepriv->num_sta_non_erp++; pmlmepriv->num_sta_non_erp++;
if (pmlmepriv->num_sta_non_erp == 1) if (pmlmepriv->num_sta_non_erp == 1) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true); update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true);
} }
} }
} } else {
else if (psta->nonerp_set) {
{
if (psta->nonerp_set)
{
psta->nonerp_set = 0; psta->nonerp_set = 0;
pmlmepriv->num_sta_non_erp--; pmlmepriv->num_sta_non_erp--;
if (pmlmepriv->num_sta_non_erp == 0) if (pmlmepriv->num_sta_non_erp == 0) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true); update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true);
} }
...@@ -1481,42 +1447,34 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1481,42 +1447,34 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
} }
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) {
{ if (!psta->no_short_slot_time_set) {
if (!psta->no_short_slot_time_set)
{
psta->no_short_slot_time_set = 1; psta->no_short_slot_time_set = 1;
pmlmepriv->num_sta_no_short_slot_time++; pmlmepriv->num_sta_no_short_slot_time++;
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
(pmlmepriv->num_sta_no_short_slot_time == 1)) (pmlmepriv->num_sta_no_short_slot_time == 1)) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
} }
} } else {
else if (psta->no_short_slot_time_set) {
{
if (psta->no_short_slot_time_set)
{
psta->no_short_slot_time_set = 0; psta->no_short_slot_time_set = 0;
pmlmepriv->num_sta_no_short_slot_time--; pmlmepriv->num_sta_no_short_slot_time--;
if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) &&
(pmlmepriv->num_sta_no_short_slot_time == 0)) (pmlmepriv->num_sta_no_short_slot_time == 0)) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
} }
} }
if (psta->flags & WLAN_STA_HT) if (psta->flags & WLAN_STA_HT) {
{
u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info); u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
DBG_8723A("HT: STA " MAC_FMT " HT Capabilities " DBG_8723A("HT: STA " MAC_FMT " HT Capabilities "
...@@ -1549,9 +1507,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1549,9 +1507,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
pmlmepriv->num_sta_ht_20mhz); pmlmepriv->num_sta_ht_20mhz);
} }
} } else {
else
{
if (!psta->no_ht_set) { if (!psta->no_ht_set) {
psta->no_ht_set = 1; psta->no_ht_set = 1;
pmlmepriv->num_sta_no_ht++; pmlmepriv->num_sta_no_ht++;
...@@ -1564,8 +1520,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1564,8 +1520,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
} }
} }
if (rtw_ht_operation_update(padapter) > 0) if (rtw_ht_operation_update(padapter) > 0) {
{
update_beacon23a(padapter, WLAN_EID_HT_CAPABILITY, NULL, false); update_beacon23a(padapter, WLAN_EID_HT_CAPABILITY, NULL, false);
update_beacon23a(padapter, WLAN_EID_HT_OPERATION, NULL, true); update_beacon23a(padapter, WLAN_EID_HT_OPERATION, NULL, true);
} }
...@@ -1589,8 +1544,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1589,8 +1544,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info
psta->no_short_preamble_set = 0; psta->no_short_preamble_set = 0;
pmlmepriv->num_sta_no_short_preamble--; pmlmepriv->num_sta_no_short_preamble--;
if (pmlmeext->cur_wireless_mode > WIRELESS_11B if (pmlmeext->cur_wireless_mode > WIRELESS_11B
&& pmlmepriv->num_sta_no_short_preamble == 0) && pmlmepriv->num_sta_no_short_preamble == 0) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
...@@ -1599,8 +1553,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1599,8 +1553,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info
if (psta->nonerp_set) { if (psta->nonerp_set) {
psta->nonerp_set = 0; psta->nonerp_set = 0;
pmlmepriv->num_sta_non_erp--; pmlmepriv->num_sta_non_erp--;
if (pmlmepriv->num_sta_non_erp == 0) if (pmlmepriv->num_sta_non_erp == 0) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, WLAN_EID_ERP_INFO, update_beacon23a(padapter, WLAN_EID_ERP_INFO,
NULL, true); NULL, true);
...@@ -1611,8 +1564,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1611,8 +1564,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info
psta->no_short_slot_time_set = 0; psta->no_short_slot_time_set = 0;
pmlmepriv->num_sta_no_short_slot_time--; pmlmepriv->num_sta_no_short_slot_time--;
if (pmlmeext->cur_wireless_mode > WIRELESS_11B if (pmlmeext->cur_wireless_mode > WIRELESS_11B
&& pmlmepriv->num_sta_no_short_slot_time == 0) && pmlmepriv->num_sta_no_short_slot_time == 0) {
{
beacon_updated = true; beacon_updated = true;
update_beacon23a(padapter, 0xFF, NULL, true); update_beacon23a(padapter, 0xFF, NULL, true);
} }
...@@ -1633,8 +1585,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1633,8 +1585,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info
pmlmepriv->num_sta_ht_20mhz--; pmlmepriv->num_sta_ht_20mhz--;
} }
if (rtw_ht_operation_update(padapter) > 0) if (rtw_ht_operation_update(padapter) > 0) {
{
update_beacon23a(padapter, WLAN_EID_HT_CAPABILITY, NULL, false); update_beacon23a(padapter, WLAN_EID_HT_CAPABILITY, NULL, false);
update_beacon23a(padapter, WLAN_EID_HT_OPERATION, NULL, true); update_beacon23a(padapter, WLAN_EID_HT_OPERATION, NULL, true);
} }
...@@ -1654,8 +1605,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti ...@@ -1654,8 +1605,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti
if (!psta) if (!psta)
return beacon_updated; return beacon_updated;
if (active == true) if (active == true) {
{
/* tear down Rx AMPDU */ /* tear down Rx AMPDU */
send_delba23a(padapter, 0, psta->hwaddr);/* recipient */ send_delba23a(padapter, 0, psta->hwaddr);/* recipient */
...@@ -1783,13 +1733,10 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta) ...@@ -1783,13 +1733,10 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta)
psta->qos_option = 0; psta->qos_option = 0;
/* update 802.11n ht cap. */ /* update 802.11n ht cap. */
if (WLAN_STA_HT&flags) if (WLAN_STA_HT&flags) {
{
psta->htpriv.ht_option = true; psta->htpriv.ht_option = true;
psta->qos_option = 1; psta->qos_option = 1;
} } else {
else
{
psta->htpriv.ht_option = false; psta->htpriv.ht_option = false;
} }
...@@ -1802,8 +1749,7 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta) ...@@ -1802,8 +1749,7 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta)
/* called >= TSR LEVEL for USB or SDIO Interface*/ /* called >= TSR LEVEL for USB or SDIO Interface*/
void ap_sta_info_defer_update23a(struct rtw_adapter *padapter, struct sta_info *psta) void ap_sta_info_defer_update23a(struct rtw_adapter *padapter, struct sta_info *psta)
{ {
if (psta->state & _FW_LINKED) if (psta->state & _FW_LINKED) {
{
/* add ratid */ /* add ratid */
add_RATid23a(padapter, psta, 0);/* DM_RATR_STA_INIT */ add_RATid23a(padapter, psta, 0);/* DM_RATR_STA_INIT */
} }
......
...@@ -1020,8 +1020,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) ...@@ -1020,8 +1020,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type)
check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) check_fwstate(pmlmepriv, WIFI_ADHOC_STATE))
return; return;
switch (lps_ctrl_type) switch (lps_ctrl_type) {
{
case LPS_CTRL_SCAN: case LPS_CTRL_SCAN:
rtl8723a_BT_wifiscan_notify(padapter, true); rtl8723a_BT_wifiscan_notify(padapter, true);
if (!rtl8723a_BT_using_antenna_1(padapter)) { if (!rtl8723a_BT_using_antenna_1(padapter)) {
...@@ -1308,8 +1307,7 @@ int rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -1308,8 +1307,7 @@ int rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
pdrvextra_cmd = (struct drvextra_cmd_parm *)pbuf; pdrvextra_cmd = (struct drvextra_cmd_parm *)pbuf;
switch (pdrvextra_cmd->ec_id) switch (pdrvextra_cmd->ec_id) {
{
case DYNAMIC_CHK_WK_CID: case DYNAMIC_CHK_WK_CID:
dynamic_chk_wk_hdl(padapter, pdrvextra_cmd->pbuf, dynamic_chk_wk_hdl(padapter, pdrvextra_cmd->pbuf,
pdrvextra_cmd->type_size); pdrvextra_cmd->type_size);
......
...@@ -302,8 +302,7 @@ void rtw_set_supported_rate23a(u8 *SupportedRates, uint mode) ...@@ -302,8 +302,7 @@ void rtw_set_supported_rate23a(u8 *SupportedRates, uint mode)
memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX); memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
switch (mode) switch (mode) {
{
case WIRELESS_11B: case WIRELESS_11B:
memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN); memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
break; break;
......
...@@ -424,29 +424,23 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -424,29 +424,23 @@ static void SwLedBlink3(struct led_8723a *pLed)
u8 bStopBlinking = false; u8 bStopBlinking = false;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
if (pLed->BlinkingLedState == RTW_LED_ON) if (pLed->BlinkingLedState == RTW_LED_ON) {
{
SwLedOn23a(padapter, pLed); SwLedOn23a(padapter, pLed);
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
} } else {
else
{
if (pLed->CurrLedState != LED_BLINK_WPS_STOP) if (pLed->CurrLedState != LED_BLINK_WPS_STOP)
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
} }
switch (pLed->CurrLedState) switch (pLed->CurrLedState) {
{
case LED_BLINK_SCAN: case LED_BLINK_SCAN:
pLed->BlinkTimes--; pLed->BlinkTimes--;
if (pLed->BlinkTimes == 0) if (pLed->BlinkTimes == 0) {
{
bStopBlinking = true; bStopBlinking = true;
} }
if (bStopBlinking) if (bStopBlinking) {
{
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
{ {
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
...@@ -467,15 +461,11 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -467,15 +461,11 @@ static void SwLedBlink3(struct led_8723a *pLed)
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
} }
pLed->bLedScanBlinkInProgress = false; pLed->bLedScanBlinkInProgress = false;
} } else {
else
{
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
{ {
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
} } else {
else
{
if (pLed->bLedOn) if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
...@@ -488,12 +478,10 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -488,12 +478,10 @@ static void SwLedBlink3(struct led_8723a *pLed)
case LED_BLINK_TXRX: case LED_BLINK_TXRX:
pLed->BlinkTimes--; pLed->BlinkTimes--;
if (pLed->BlinkTimes == 0) if (pLed->BlinkTimes == 0) {
{
bStopBlinking = true; bStopBlinking = true;
} }
if (bStopBlinking) if (bStopBlinking) {
{
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
{ {
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
...@@ -516,15 +504,11 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -516,15 +504,11 @@ static void SwLedBlink3(struct led_8723a *pLed)
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
} }
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} } else {
else
{
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
{ {
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
} } else {
else
{
if (pLed->bLedOn) if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
else else
...@@ -545,8 +529,7 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -545,8 +529,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
break; break;
case LED_BLINK_WPS_STOP: /* WPS success */ case LED_BLINK_WPS_STOP: /* WPS success */
if (pLed->BlinkingLedState == RTW_LED_ON) if (pLed->BlinkingLedState == RTW_LED_ON) {
{
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
mod_timer(&pLed->BlinkTimer, jiffies + mod_timer(&pLed->BlinkTimer, jiffies +
msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA)); msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
...@@ -555,8 +538,7 @@ static void SwLedBlink3(struct led_8723a *pLed) ...@@ -555,8 +538,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
bStopBlinking = true; bStopBlinking = true;
} }
if (bStopBlinking) if (bStopBlinking) {
{
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) if (padapter->pwrctrlpriv.rf_pwrstate != rf_on)
{ {
SwLedOff23a(padapter, pLed); SwLedOff23a(padapter, pLed);
...@@ -586,8 +568,7 @@ static void SwLedBlink4(struct led_8723a *pLed) ...@@ -586,8 +568,7 @@ static void SwLedBlink4(struct led_8723a *pLed)
unsigned long delay = 0; unsigned long delay = 0;
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
if (pLed->BlinkingLedState == RTW_LED_ON) if (pLed->BlinkingLedState == RTW_LED_ON) {
{
SwLedOn23a(padapter, pLed); SwLedOn23a(padapter, pLed);
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn on\n", pLed->BlinkTimes));
} else { } else {
...@@ -602,8 +583,7 @@ static void SwLedBlink4(struct led_8723a *pLed) ...@@ -602,8 +583,7 @@ static void SwLedBlink4(struct led_8723a *pLed)
SwLedOff23a(padapter, pLed1); SwLedOff23a(padapter, pLed1);
} }
switch (pLed->CurrLedState) switch (pLed->CurrLedState) {
{
case LED_BLINK_SLOWLY: case LED_BLINK_SLOWLY:
if (pLed->bLedOn) if (pLed->bLedOn)
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
...@@ -752,8 +732,7 @@ static void SwLedBlink5(struct led_8723a *pLed) ...@@ -752,8 +732,7 @@ static void SwLedBlink5(struct led_8723a *pLed)
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes)); RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
} }
switch (pLed->CurrLedState) switch (pLed->CurrLedState) {
{
case LED_BLINK_SCAN: case LED_BLINK_SCAN:
pLed->BlinkTimes--; pLed->BlinkTimes--;
if (pLed->BlinkTimes == 0) { if (pLed->BlinkTimes == 0) {
...@@ -855,8 +834,7 @@ SwLedControlMode1(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -855,8 +834,7 @@ SwLedControlMode1(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
long delay = -1; long delay = -1;
switch (LedAction) switch (LedAction) {
{
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
...@@ -1185,8 +1163,7 @@ SwLedControlMode2(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1185,8 +1163,7 @@ SwLedControlMode2(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
break; break;
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
if (!IS_LED_BLINKING(pLed)) if (!IS_LED_BLINKING(pLed)) {
{
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
delay = 0; delay = 0;
...@@ -1230,8 +1207,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1230,8 +1207,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
struct led_8723a *pLed = &ledpriv->SwLed0; struct led_8723a *pLed = &ledpriv->SwLed0;
long delay = -1; long delay = -1;
switch (LedAction) switch (LedAction) {
{
case LED_CTL_SITE_SURVEY: case LED_CTL_SITE_SURVEY:
if (pmlmepriv->LinkDetectInfo.bBusyTraffic) if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
; ;
...@@ -1345,8 +1321,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1345,8 +1321,7 @@ SwLedControlMode3(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
if (!IS_LED_BLINKING(pLed)) if (!IS_LED_BLINKING(pLed)) {
{
pLed->CurrLedState = RTW_LED_OFF; pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
delay = 0; delay = 0;
...@@ -1392,8 +1367,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1392,8 +1367,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
struct led_8723a *pLed = &ledpriv->SwLed0; struct led_8723a *pLed = &ledpriv->SwLed0;
struct led_8723a *pLed1 = &ledpriv->SwLed1; struct led_8723a *pLed1 = &ledpriv->SwLed1;
switch (LedAction) switch (LedAction) {
{
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
if (pLed1->bLedWPSBlinkInProgress) { if (pLed1->bLedWPSBlinkInProgress) {
pLed1->bLedWPSBlinkInProgress = false; pLed1->bLedWPSBlinkInProgress = false;
...@@ -1550,8 +1524,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1550,8 +1524,7 @@ SwLedControlMode4(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
} }
pLed->bLedWPSBlinkInProgress = true; pLed->bLedWPSBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_WPS; pLed->CurrLedState = LED_BLINK_WPS;
if (pLed->bLedOn) if (pLed->bLedOn) {
{
pLed->BlinkingLedState = RTW_LED_OFF; pLed->BlinkingLedState = RTW_LED_OFF;
mod_timer(&pLed->BlinkTimer, jiffies + mod_timer(&pLed->BlinkTimer, jiffies +
msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL)); msecs_to_jiffies(LED_BLINK_SLOWLY_INTERVAL));
...@@ -1697,8 +1670,7 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1697,8 +1670,7 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct led_8723a *pLed = &ledpriv->SwLed0; struct led_8723a *pLed = &ledpriv->SwLed0;
switch (LedAction) switch (LedAction) {
{
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
case LED_CTL_LINK: /* solid blue */ case LED_CTL_LINK: /* solid blue */
...@@ -1712,10 +1684,8 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction) ...@@ -1712,10 +1684,8 @@ SwLedControlMode5(struct rtw_adapter *padapter, enum led_ctl_mode LedAction)
if (pmlmepriv->LinkDetectInfo.bBusyTraffic && if (pmlmepriv->LinkDetectInfo.bBusyTraffic &&
check_fwstate(pmlmepriv, _FW_LINKED)) check_fwstate(pmlmepriv, _FW_LINKED))
; ;
else if (pLed->bLedScanBlinkInProgress == false) else if (pLed->bLedScanBlinkInProgress == false) {
{ if (pLed->bLedBlinkInProgress == true) {
if (pLed->bLedBlinkInProgress == true)
{
del_timer_sync(&pLed->BlinkTimer); del_timer_sync(&pLed->BlinkTimer);
pLed->bLedBlinkInProgress = false; pLed->bLedBlinkInProgress = false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment