diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 1935537..6de9fac 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -11,11 +11,6 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * ******************************************************************************/ #define _RTW_AP_C_ @@ -36,7 +31,7 @@ extern unsigned char WFD_OUI[]; void init_mlme_ap_info(struct adapter *padapter) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; @@ -55,9 +50,9 @@ void free_mlme_ap_info(struct adapter *padapter) unsigned long irqL; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; /* stop_ap_mode(padapter); */ @@ -73,17 +68,17 @@ void free_mlme_ap_info(struct adapter *padapter) /* free bc/mc sta_info */ psta = rtw_get_bcmc_stainfo(padapter); - spin_lock_bh(&(pstapriv->sta_hash_lock)); + spin_lock_bh(&pstapriv->sta_hash_lock); rtw_free_stainfo(padapter, psta); - spin_unlock_bh(&(pstapriv->sta_hash_lock)); + spin_unlock_bh(&pstapriv->sta_hash_lock); } static void update_BCNTIM(struct adapter *padapter) { struct sta_priv *pstapriv = &padapter->stapriv; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *pnetwork_mlmeext = &(pmlmeinfo->network); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network; unsigned char *pie = pnetwork_mlmeext->IEs; /* DBG_88E("%s\n", __FUNCTION__); */ @@ -328,9 +323,9 @@ void expire_timeout_chk(struct adapter *padapter) spin_unlock_bh(&pstapriv->auth_list_lock); - spin_lock_bh(&(pstapriv->sta_hash_lock)); + spin_lock_bh(&pstapriv->sta_hash_lock); rtw_free_stainfo(padapter, psta); - spin_unlock_bh(&(pstapriv->sta_hash_lock)); + spin_unlock_bh(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->auth_list_lock); } @@ -476,7 +471,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level) unsigned char limit; unsigned int tx_ra_bitmap =0; struct ht_priv *psta_ht = NULL; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; if (psta) @@ -573,7 +568,7 @@ void update_bmc_sta(struct adapter *padapter) unsigned char network_type, raid; int i, supportRateNum = 0; unsigned int tx_ra_bitmap =0; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; struct sta_info *psta = rtw_get_bcmc_stainfo(padapter); @@ -659,9 +654,9 @@ void update_bmc_sta(struct adapter *padapter) void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta) { unsigned long irqL; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv; struct ht_priv *phtpriv_sta = &psta->htpriv; /* set intf_tag to if1 */ @@ -731,7 +726,7 @@ static void update_hw_ht_param(struct adapter *padapter) unsigned char min_MPDU_spacing; struct registry_priv *pregpriv = &padapter->registrypriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; DBG_88E("%s\n", __FUNCTION__); @@ -770,15 +765,15 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf) u32 acparm; int ie_len; struct registry_priv *pregpriv = &padapter->registrypriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct security_priv* psecuritypriv =&(padapter->securitypriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct security_priv* psecuritypriv =&padapter->securitypriv; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *pnetwork_mlmeext = &(pmlmeinfo->network); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network; struct HT_info_element *pht_info = NULL; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + struct wifidirect_info *pwdinfo = &padapter->wdinfo; #endif /* CONFIG_P2P */ /* DBG_88E("%s\n", __FUNCTION__); */ @@ -928,7 +923,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) u8 WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; struct registry_priv *pregistrypriv = &padapter->registrypriv; struct security_priv *psecuritypriv = &padapter->securitypriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pbss_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; struct sta_priv *pstapriv = &padapter->stapriv; u8 *ie = pbss_network->IEs; @@ -963,7 +958,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) pbss_network->Rssi = 0; - memcpy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pbss_network->MacAddress, myid(&padapter->eeprompriv), ETH_ALEN); /* beacon interval */ p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */ @@ -1111,7 +1106,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) || (psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) - pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2)); + pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x07<<2); else pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00); @@ -1214,7 +1209,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) if ((NUM_ACL-1) < pacl_list->num) return (-1); - spin_lock_bh(&(pacl_node_q->lock)); + spin_lock_bh(&pacl_node_q->lock); phead = get_list_head(pacl_node_q); plist = get_next(phead); @@ -1232,12 +1227,12 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) } } - spin_unlock_bh(&(pacl_node_q->lock)); + spin_unlock_bh(&pacl_node_q->lock); if (added == true) return ret; - spin_lock_bh(&(pacl_node_q->lock)); + spin_lock_bh(&pacl_node_q->lock); for (i =0; i< NUM_ACL; i++) { paclnode = &pacl_list->aclnode[i]; @@ -1259,7 +1254,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num); - spin_unlock_bh(&(pacl_node_q->lock)); + spin_unlock_bh(&pacl_node_q->lock); return ret; } @@ -1276,7 +1271,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) DBG_88E("%s(acl_num =%d) =" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr)); - spin_lock_bh(&(pacl_node_q->lock)); + spin_lock_bh(&pacl_node_q->lock); phead = get_list_head(pacl_node_q); plist = get_next(phead); @@ -1296,7 +1291,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) } } - spin_unlock_bh(&(pacl_node_q->lock)); + spin_unlock_bh(&pacl_node_q->lock); DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num); @@ -1312,10 +1307,10 @@ static void update_bcn_fixed_ie(struct adapter *padapter) static void update_bcn_erpinfo_ie(struct adapter *padapter) { - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network; unsigned char *p, *ie = pnetwork->IEs; u32 len = 0; @@ -1378,10 +1373,10 @@ static void update_bcn_wps_ie(struct adapter *padapter) { u8 *pwps_ie = NULL, *pwps_ie_src, *premainder_ie, *pbackup_remainder_ie = NULL; uint wps_ielen =0, wps_offset, remainder_ielen; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network; unsigned char *ie = pnetwork->IEs; u32 ielen = pnetwork->IELength; @@ -1460,9 +1455,9 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx) if (!padapter) return; - pmlmepriv = &(padapter->mlmepriv); - pmlmeext = &(padapter->mlmeextpriv); - /* pmlmeinfo = &(pmlmeext->mlmext_info); */ + pmlmepriv = &padapter->mlmepriv; + pmlmeext = &padapter->mlmeextpriv; + /* pmlmeinfo = &pmlmeext->mlmext_info; */ if (false == pmlmeext->bstart_bss) return; @@ -1540,7 +1535,7 @@ static int rtw_ht_operation_update(struct adapter *padapter) { u16 cur_op_mode, new_op_mode; int op_mode_changes = 0; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv; if (pmlmepriv->htpriv.ht_option == true) @@ -1640,8 +1635,8 @@ void associated_clients_update(struct adapter *padapter, u8 updated) void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta) { u8 beacon_updated = false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) { if (!psta->no_short_preamble_set) { @@ -1782,8 +1777,8 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta) u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta) { u8 beacon_updated = false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if (!psta) return beacon_updated; @@ -1847,8 +1842,8 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16 { unsigned long irqL; u8 beacon_updated = false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct sta_priv *pstapriv = &padapter->stapriv; if (!psta) @@ -1882,9 +1877,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16 beacon_updated = bss_cap_update_on_sta_leave(padapter, psta); - spin_lock_bh(&(pstapriv->sta_hash_lock)); + spin_lock_bh(&pstapriv->sta_hash_lock); rtw_free_stainfo(padapter, psta); - spin_unlock_bh(&(pstapriv->sta_hash_lock)); + spin_unlock_bh(&pstapriv->sta_hash_lock); return beacon_updated; } @@ -1897,7 +1892,7 @@ int rtw_ap_inform_ch_switch (struct adapter *padapter, u8 new_ch, u8 ch_offset) struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) @@ -1933,7 +1928,7 @@ int rtw_sta_flush(struct adapter *padapter) struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u8 chk_alive_num = 0; char chk_alive_list[NUM_STA]; @@ -1984,7 +1979,7 @@ int rtw_sta_flush(struct adapter *padapter) void sta_info_update(struct adapter *padapter, struct sta_info *psta) { int flags = psta->flags; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; /* update wmm cap. */ if (WLAN_STA_WME&flags) @@ -2022,10 +2017,10 @@ void rtw_ap_restore_network(struct adapter *padapter) { struct mlme_priv *mlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct sta_priv * pstapriv = &padapter->stapriv; struct sta_info *psta; - struct security_priv* psecuritypriv =&(padapter->securitypriv); + struct security_priv* psecuritypriv =&padapter->securitypriv; unsigned long irqL; struct list_head *phead, *plist; u8 chk_alive_num = 0; @@ -2083,7 +2078,7 @@ void rtw_ap_restore_network(struct adapter *padapter) void start_ap_mode(struct adapter *padapter) { int i; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; @@ -2120,7 +2115,7 @@ void start_ap_mode(struct adapter *padapter) pmlmepriv->p2p_probe_resp_ie = NULL; /* for ACL */ - _rtw_init_listhead(&(pacl_list->acl_node_q.queue)); + _rtw_init_listhead(&pacl_list->acl_node_q.queue); pacl_list->num = 0; pacl_list->mode = 0; for (i = 0; i < NUM_ACL; i++) { @@ -2137,7 +2132,7 @@ void stop_ap_mode(struct adapter *padapter) struct rtw_wlan_acl_node *paclnode; struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; struct __queue *pacl_node_q =&pacl_list->acl_node_q; @@ -2150,7 +2145,7 @@ void stop_ap_mode(struct adapter *padapter) padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; /* for ACL */ - spin_lock_bh(&(pacl_node_q->lock)); + spin_lock_bh(&pacl_node_q->lock); phead = get_list_head(pacl_node_q); plist = get_next(phead); while ((rtw_end_of_queue_search(phead, plist)) == false) { @@ -2165,7 +2160,7 @@ void stop_ap_mode(struct adapter *padapter) pacl_list->num--; } } - spin_unlock_bh(&(pacl_node_q->lock)); + spin_unlock_bh(&pacl_node_q->lock); DBG_88E("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num); @@ -2175,9 +2170,9 @@ void stop_ap_mode(struct adapter *padapter) rtw_free_all_stainfo(padapter); psta = rtw_get_bcmc_stainfo(padapter); - spin_lock_bh(&(pstapriv->sta_hash_lock)); + spin_lock_bh(&pstapriv->sta_hash_lock); rtw_free_stainfo(padapter, psta); - spin_unlock_bh(&(pstapriv->sta_hash_lock)); + spin_unlock_bh(&pstapriv->sta_hash_lock); rtw_init_bcmc_stainfo(padapter); diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index faa010e..2315a52 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -1040,7 +1040,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) } else { /* session phase */ DEBUG_INFO("NAT25: Insert PPPoE, insert session packet to %s\n", skb->dev->name); - __nat25_generate_pppoe_network_addr(networkAddr, skb->data, &(ph->sid)); + __nat25_generate_pppoe_network_addr(networkAddr, skb->data, &ph->sid); __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); @@ -1111,7 +1111,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) if (ph->sid != 0) { DEBUG_INFO("NAT25: Lookup PPPoE, lookup session packet from %s\n", skb->dev->name); - __nat25_generate_pppoe_network_addr(networkAddr, skb->data+ETH_ALEN, &(ph->sid)); + __nat25_generate_pppoe_network_addr(networkAddr, skb->data+ETH_ALEN, &ph->sid); __nat25_db_network_lookup_and_replace(priv, skb, networkAddr); diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 390fb8e..50db300 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -44,11 +44,11 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv) ; - _rtw_init_sema(&(pcmdpriv->cmd_queue_sema), 0); - /* _rtw_init_sema(&(pcmdpriv->cmd_done_sema), 0); */ - _rtw_init_sema(&(pcmdpriv->terminate_cmdthread_sema), 0); + _rtw_init_sema(&pcmdpriv->cmd_queue_sema, 0); + /* _rtw_init_sema(&pcmdpriv->cmd_done_sema, 0); */ + _rtw_init_sema(&pcmdpriv->terminate_cmdthread_sema, 0); - _rtw_init_queue(&(pcmdpriv->cmd_queue)); + _rtw_init_queue(&pcmdpriv->cmd_queue); /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ @@ -90,7 +90,7 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) sint res =_SUCCESS; #ifdef CONFIG_H2CLBK - _rtw_init_sema(&(pevtpriv->lbkevt_done), 0); + _rtw_init_sema(&pevtpriv->lbkevt_done, 0); pevtpriv->lbkevt_limit = 0; pevtpriv->lbkevt_num = 0; pevtpriv->cmdevt_parm = NULL; @@ -139,8 +139,8 @@ void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv) ; if (pcmdpriv) { - _rtw_free_sema(&(pcmdpriv->cmd_queue_sema)); - _rtw_free_sema(&(pcmdpriv->terminate_cmdthread_sema)); + _rtw_free_sema(&pcmdpriv->cmd_queue_sema); + _rtw_free_sema(&pcmdpriv->terminate_cmdthread_sema); if (pcmdpriv->cmd_allocated_buf) rtw_mfree(pcmdpriv->cmd_allocated_buf, MAX_CMDSZ + CMDBUFF_ALIGN_SZ); @@ -186,10 +186,10 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) struct cmd_obj *obj; _enter_critical(&queue->lock, &irqL); - if (rtw_is_list_empty(&(queue->queue))) { + if (rtw_is_list_empty(&queue->queue)) { obj = NULL; } else { - obj = LIST_CONTAINOR(get_next(&(queue->queue)), struct cmd_obj, list); + obj = LIST_CONTAINOR(get_next(&queue->queue), struct cmd_obj, list); rtw_list_delete(&obj->list); } @@ -302,7 +302,7 @@ void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv) { ; pcmdpriv->cmd_done_cnt++; - /* _rtw_up_sema(&(pcmdpriv->cmd_done_sema)); */ + /* _rtw_up_sema(&pcmdpriv->cmd_done_sema); */ ; } @@ -310,7 +310,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd) { ; - if ((pcmd->cmdcode!=_JoinBss_CMD_) &&(pcmd->cmdcode!= _CreateBss_CMD_)) + if ((pcmd->cmdcode!=_JoinBss_CMD_) &&pcmd->cmdcode!= _CreateBss_CMD_) rtw_mfree((unsigned char*)pcmd->parmbuf, pcmd->cmdsz); if (pcmd->rsp!= NULL) { @@ -342,7 +342,7 @@ int rtw_cmd_thread(void * context) u8 (*cmd_hdl)(struct adapter *padapter, u8* pbuf); void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd); struct adapter *padapter = (struct adapter *)context; - struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; ; @@ -375,7 +375,7 @@ int rtw_cmd_thread(void * context) break; } - if (rtw_is_list_empty(&(pcmdpriv->cmd_queue.queue))) + if (rtw_is_list_empty(&pcmdpriv->cmd_queue.queue)) { /* DBG_88E("%s: cmd queue is empty!\n", __func__); */ continue; @@ -524,7 +524,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + struct wifidirect_info *pwdinfo = &padapter->wdinfo; #endif /* CONFIG_P2P */ if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { @@ -957,7 +957,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork) struct ht_priv *phtpriv = &pmlmepriv->htpriv; enum NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; ; @@ -1771,7 +1771,7 @@ static void traffic_status_watchdog(struct adapter *padapter) u16 BusyThreshold = 200;/* 100; */ u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false; u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; RT_LINK_DETECT_T * link_detect = &pmlmepriv->LinkDetectInfo; @@ -1860,7 +1860,7 @@ void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz) struct mlme_priv *pmlmepriv; padapter = (struct adapter *)pbuf; - pmlmepriv = &(padapter->mlmepriv); + pmlmepriv = &padapter->mlmepriv; #ifdef CONFIG_AP_MODE if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) @@ -1885,7 +1885,7 @@ void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz) static void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type) { struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 mstatus; if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) || @@ -2056,7 +2056,7 @@ u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna, u8 enqueue) u8 res = _SUCCESS; ; - rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv)); + rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &bSupportAntDiv); if (false == bSupportAntDiv ) return res; if (true == enqueue) { @@ -2112,7 +2112,7 @@ u8 p2p_protocol_wk_cmd(struct adapter*padapter, int intCmdType ) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + struct wifidirect_info *pwdinfo = &padapter->wdinfo; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; @@ -2505,7 +2505,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) struct wlan_network *pwlan = NULL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf; - struct wlan_network *tgt_network = &(pmlmepriv->cur_network); + struct wlan_network *tgt_network = &pmlmepriv->cur_network; ; @@ -2552,28 +2552,28 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) unsigned long irqL; pwlan = _rtw_alloc_network(pmlmepriv); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); if ( pwlan == NULL) { pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue); if ( pwlan == NULL) { RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n Error: can't get pwlan in rtw_joinbss_event_callback\n")); - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); goto createbss_cmd_fail; } pwlan->last_scanned = jiffies; } else { - rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); + rtw_list_insert_tail(&pwlan->list, &pmlmepriv->scanned_queue.queue); } pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork); - memcpy(&(pwlan->network), pnetwork, pnetwork->Length); + memcpy(&pwlan->network, pnetwork, pnetwork->Length); /* pwlan->fixed = true; */ - /* rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); */ + /* rtw_list_insert_tail(&pwlan->list, &pmlmepriv->scanned_queue.queue); */ /* copy pdev_network information to pmlmepriv->cur_network */ memcpy(&tgt_network->network, pnetwork, (get_wlan_bssid_ex_sz(pnetwork))); @@ -2583,7 +2583,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); /* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */ } diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 8ac12ab..7262498 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -181,7 +181,7 @@ int proc_get_fwstate(char *page, char **start, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int len = 0; @@ -216,7 +216,7 @@ int proc_get_mlmext_state(char *page, char **start, struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; int len = 0; @@ -232,7 +232,7 @@ int proc_get_qos_option(char *page, char **start, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int len = 0; @@ -249,7 +249,7 @@ int proc_get_ht_option(char *page, char **start, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int len = 0; len += snprintf(page + len, count - len, "ht_option =%d\n", pmlmepriv->htpriv.ht_option); @@ -281,9 +281,9 @@ int proc_get_ap_info(char *page, char **start, struct sta_info *psta; struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct wlan_network *cur_network = &(pmlmepriv->cur_network); + struct wlan_network *cur_network = &pmlmepriv->cur_network; struct sta_priv *pstapriv = &padapter->stapriv; int len = 0; @@ -607,7 +607,7 @@ int proc_get_rx_signal(char *page, char **start, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int len = 0; @@ -944,7 +944,7 @@ int proc_get_all_sta_info(char *page, char **start, for (i =0; i< NUM_STA; i++) { - phead = &(pstapriv->sta_hash[i]); + phead = &pstapriv->sta_hash[i]; plist = get_next(phead); while ((rtw_end_of_queue_search(phead, plist)) == false) @@ -1136,7 +1136,7 @@ int proc_get_sreset(char *page, char **start, off_t offset, int count, int *eof, { struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int len = 0; diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index 60c79ea..3db0220 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -430,7 +430,7 @@ efuse_OneByteRead( rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);/* read cmd */ - while (!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3))&&(tmpidx<100)) + while (!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100)) { tmpidx++; } diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index 2ec4bc7..dd112de 100644 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -347,7 +347,7 @@ odm_RateDecision_8188E( pRaInfo->RssiStaRA,RtyPtID, PenaltyID1,PenaltyID2, RateID, pRaInfo->NscDown, pRaInfo->NscUp, pRaInfo->RateSGI)); if ((pRaInfo->NscDown < N_THRESHOLD_LOW[RateID]) ||(pRaInfo->DROP>DROPING_NECESSARY[RateID])) odm_RateDown_8188E(pDM_Odm,pRaInfo); - /* else if ((pRaInfo->NscUp > N_THRESHOLD_HIGH[RateID])&&(pool_retryNscUp > N_THRESHOLD_HIGH[RateID])&&pool_retryNscUp > N_THRESHOLD_HIGH[RateID]) odm_RateUp_8188E(pDM_Odm,pRaInfo); @@ -757,7 +757,7 @@ ODM_RA_UpdateRateInfo_8188E( if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM)) return; - pRaInfo = &(pDM_Odm->RAInfo[MacID]); + pRaInfo = &pDM_Odm->RAInfo[MacID]; pRaInfo->RateID = RateID; pRaInfo->RateMask = RateMask; pRaInfo->SGIEnable = SGIEnable; @@ -778,7 +778,7 @@ ODM_RA_SetRSSI_8188E( if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM)) return; - pRaInfo = &(pDM_Odm->RAInfo[MacID]); + pRaInfo = &pDM_Odm->RAInfo[MacID]; pRaInfo->RssiStaRA = Rssi; } @@ -822,7 +822,7 @@ ODM_RA_TxRPT2Handle_8188E( else valid = (1<RAInfo[MacId]); + pRAInfo = &pDM_Odm->RAInfo[MacId]; if (valid) { diff --git a/hal/HalPhyRf_8188e.c b/hal/HalPhyRf_8188e.c index 4711fcb..3731c74 100644 --- a/hal/HalPhyRf_8188e.c +++ b/hal/HalPhyRf_8188e.c @@ -1052,9 +1052,9 @@ _PHY_MACSettingCalibration( ODM_Write1Byte(pDM_Odm, MACReg[i], 0x3F); for (i = 1 ; i < (IQK_MAC_REG_NUM - 1); i++) { - ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT3))); + ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&~BIT3)); } - ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT5))); + ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&~BIT5)); } @@ -1578,7 +1578,7 @@ phy_APCalibrate_8188E( #if MP_DRIVER == 1 if ( *(pDM_Odm->mp_mode) == 1) { - struct mpt_context *pMptCtx = &(pAdapter->mppriv.MptCtx); + struct mpt_context *pMptCtx = &pAdapter->mppriv.MptCtx; pMptCtx->APK_bound[0] = 45; pMptCtx->APK_bound[1] = 52; } @@ -1917,7 +1917,7 @@ PHY_IQCalibrate_8188E( PDM_ODM_T pDM_Odm = &pHalData->odmpriv; #if (MP_DRIVER == 1) - struct mpt_context *pMptCtx = &(pAdapter->mppriv.MptCtx); + struct mpt_context *pMptCtx = &pAdapter->mppriv.MptCtx; #endif/* MP_DRIVER == 1) */ s32 result[4][8]; /* last is final result */ @@ -2065,11 +2065,11 @@ if (*(pDM_Odm->mp_mode) == 1) pDM_Odm->RFCalibrateInfo.RegE9C = pDM_Odm->RFCalibrateInfo.RegEBC = 0x0; /* Y default value */ } - if ((RegE94 != 0)/*&&(RegEA4 != 0)*/) + if ((RegE94 != 0)/*&&RegEA4 != 0*/) _PHY_PathAFillIQKMatrix(pAdapter, bPathAOK, result, final_candidate, (RegEA4 == 0)); if (is2T) { - if ((RegEB4 != 0)/*&&(RegEC4 != 0)*/) + if ((RegEB4 != 0)/*&&RegEC4 != 0*/) _PHY_PathBFillIQKMatrix(pAdapter, bPathBOK, result, final_candidate, (RegEC4 == 0)); } @@ -2102,7 +2102,7 @@ PHY_LCCalibrate_8188E( PDM_ODM_T pDM_Odm = &pHalData->odmpriv; #if (MP_DRIVER == 1) - struct mpt_context *pMptCtx = &(pAdapter->mppriv.MptCtx); + struct mpt_context *pMptCtx = &pAdapter->mppriv.MptCtx; #endif/* MP_DRIVER == 1) */ diff --git a/hal/hal_com.c b/hal/hal_com.c index f37fe8a..e505b73 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -384,7 +384,7 @@ u8 SetHalDefVar(struct adapter *adapter, enum HAL_DEF_VARIABLE variable, void *value) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter); - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; u8 bResult = _SUCCESS; switch (variable) { @@ -413,7 +413,7 @@ u8 GetHalDefVar(struct adapter *adapter, enum HAL_DEF_VARIABLE variable, void *value) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter); - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; u8 bResult = _SUCCESS; switch (variable) { diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 14f08bf..25009b4 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -338,7 +338,7 @@ void rtw_hal_update_ra_mask(struct sta_info *psta, u8 rssi_level) padapter = psta->padapter; - pmlmepriv = &(padapter->mlmepriv); + pmlmepriv = &padapter->mlmepriv; if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { diff --git a/hal/odm.c b/hal/odm.c index 9ff45cc..814f2ab 100644 --- a/hal/odm.c +++ b/hal/odm.c @@ -1247,7 +1247,7 @@ PDM_ODM_T pDM_Odm { pDM_Odm->TH_L2H_ini = 0xf8; /* -8 */ } - if ((pDM_Odm->SupportICType == ODM_RTL8192E)&&(pDM_Odm->SupportInterface == ODM_ITRF_PCIE)) + if ((pDM_Odm->SupportICType == ODM_RTL8192E)&&pDM_Odm->SupportInterface == ODM_ITRF_PCIE) { pDM_Odm->TH_L2H_ini = 0xf0; /* -16 */ } @@ -1481,7 +1481,7 @@ odm_DIG( } /* 1 Boundary Decision */ - if (pDM_Odm->SupportICType & (ODM_RTL8192C) &&(pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA))) + if (pDM_Odm->SupportICType & (ODM_RTL8192C) &&pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA)) { if (pDM_Odm->SupportPlatform & (ODM_AP|ODM_ADSL)) { @@ -1523,7 +1523,7 @@ odm_DIG( if (pDM_Odm->bLinked) { - if (pDM_Odm->SupportICType&(ODM_RTL8723A/*|ODM_RTL8821*/)) + if (pDM_Odm->SupportICType&ODM_RTL8723A/*|ODM_RTL8821*/) { /* 2 Upper Bound */ if (( pDM_Odm->RSSI_Min + 10) > DM_DIG_MAX_NIC ) @@ -1590,7 +1590,7 @@ odm_DIG( } /* 1 Lower Bound for 88E AntDiv */ - if ((pDM_Odm->SupportICType == ODM_RTL8188E)&&(pDM_Odm->SupportAbility & ODM_BB_ANT_DIV)) + if ((pDM_Odm->SupportICType == ODM_RTL8188E)&&pDM_Odm->SupportAbility & ODM_BB_ANT_DIV) { if ((pDM_Odm->AntDivType == CG_TRX_HW_ANTDIV) ||(pDM_Odm->AntDivType == CGCS_RX_HW_ANTDIV)) { @@ -1679,7 +1679,7 @@ odm_DIG( } ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): pDM_DigTable->LargeFAHit=%d\n",pDM_DigTable->LargeFAHit)); - if ((pDM_Odm->SupportPlatform&(ODM_CE))&&(pDM_Odm->PhyDbgInfo.NumQryBeaconPkt < 10) && (pDM_Odm->bsta_state)) + if ((pDM_Odm->SupportPlatform&ODM_CE)&&pDM_Odm->PhyDbgInfo.NumQryBeaconPkt < 10 && (pDM_Odm->bsta_state)) pDM_DigTable->rx_gain_range_min = dm_dig_min; if (pDM_DigTable->rx_gain_range_min > pDM_DigTable->rx_gain_range_max) @@ -1744,8 +1744,8 @@ odm_DIG( else if (pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0) CurrentIGI = CurrentIGI - 2;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ - if ((pDM_Odm->SupportPlatform&(ODM_CE))&&(pDM_Odm->PhyDbgInfo.NumQryBeaconPkt < 10) - &&(pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH1) && (pDM_Odm->bsta_state)) + if ((pDM_Odm->SupportPlatform&ODM_CE)&&pDM_Odm->PhyDbgInfo.NumQryBeaconPkt < 10 + &&pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH1 && (pDM_Odm->bsta_state)) { CurrentIGI = pDM_DigTable->rx_gain_range_min; ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Beacon is less than 10 and FA is less than 768, IGI GOES TO 0x1E!!!!!!!!!!!!\n")); @@ -1859,7 +1859,7 @@ odm_FalseAlarmCounterStatistics( ) { u32 ret_value; - Pfalse_ALARM_STATISTICS FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); + Pfalse_ALARM_STATISTICS FalseAlmCnt = &pDM_Odm->FalseAlmCnt; if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT)) return; @@ -1972,7 +1972,7 @@ odm_CCKPacketDetectionThresh( pDIG_T pDM_DigTable = &pDM_Odm->DM_DigTable; u8 CurCCK_CCAThres; - Pfalse_ALARM_STATISTICS FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); + Pfalse_ALARM_STATISTICS FalseAlmCnt = &pDM_Odm->FalseAlmCnt; if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD|ODM_BB_FA_CNT))) return; @@ -2054,7 +2054,7 @@ odm_DynamicBBPowerSaving( return; /* 1 2.Power Saving for 92C */ - if ((pDM_Odm->SupportICType == ODM_RTL8192C) &&(pDM_Odm->RFType == ODM_2T2R)) + if ((pDM_Odm->SupportICType == ODM_RTL8192C) &&pDM_Odm->RFType == ODM_2T2R) { odm_1R_CCA(pDM_Odm); } @@ -2667,7 +2667,7 @@ struct adapter *pAdapter { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; /* 1 1.Determine the minimum RSSI */ @@ -2723,7 +2723,7 @@ odm_RSSIMonitorCheckCE( else { #if (RATE_ADAPTIVE_SUPPORT == 1) ODM_RA_SetRSSI_8188E( - &(pHalData->odmpriv), (PWDB_rssi[i]&0xFF), (u8)((PWDB_rssi[i]>>16) & 0xFF)); + &pHalData->odmpriv, (PWDB_rssi[i]&0xFF), (u8)((PWDB_rssi[i]>>16) & 0xFF)); #endif } } @@ -3031,7 +3031,7 @@ odm_StaDefAntSel( ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("CCK_Ant1_Cnt:%d, CCK_Ant2_Cnt:%d\n",CCK_Ant1_Cnt,CCK_Ant2_Cnt)); - if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)== 0)&&((CCK_Ant1_Cnt + CCK_Ant2_Cnt) <10)) { + if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)== 0)&&CCK_Ant1_Cnt + CCK_Ant2_Cnt <10) { ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect Fail: No enough packet info!\n")); return false; } @@ -3287,11 +3287,11 @@ odm_EdcaTurboCheckCE( u64 cur_rx_bytes = 0; u8 bbtchange = false; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); - struct recv_priv *precvpriv = &(Adapter->recvpriv); + struct xmit_priv *pxmitpriv = &Adapter->xmitpriv; + struct recv_priv *precvpriv = &Adapter->recvpriv; struct registry_priv *pregpriv = &Adapter->registrypriv; - struct mlme_ext_priv *pmlmeext = &(Adapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; if ((pregpriv->wifi_spec == 1) )/* (pmlmeinfo->HT_enable == 0)) */ @@ -3697,7 +3697,7 @@ ODM_SingleDualAntennaDetection( } /* 2 Test Ant A and B based on DPDT Open */ else if (mode==ANTTESTALL) { - if ((AntO_report >=100)&(AntO_report <118)) { + if (AntO_report >= 100 && AntO_report < 118) { if (AntA_report > (AntO_report+1)) { pDM_SWAT_Table->ANTA_ON=false; ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV, ODM_DBG_LOUD,("Ant A is OFF")); diff --git a/hal/odm_RTL8188E.c b/hal/odm_RTL8188E.c index dfbe23d..b4705d2 100644 --- a/hal/odm_RTL8188E.c +++ b/hal/odm_RTL8188E.c @@ -504,7 +504,7 @@ void odm_PrimaryCCA_Init( PDM_ODM_T pDM_Odm) { - pPri_CCA_T PrimaryCCA = &(pDM_Odm->DM_PriCCA); + pPri_CCA_T PrimaryCCA = &pDM_Odm->DM_PriCCA; PrimaryCCA->DupRTS_flag = 0; PrimaryCCA->intf_flag = 0; PrimaryCCA->intf_type = 0; @@ -517,7 +517,7 @@ ODM_DynamicPrimaryCCA_DupRTS( PDM_ODM_T pDM_Odm ) { - pPri_CCA_T PrimaryCCA = &(pDM_Odm->DM_PriCCA); + pPri_CCA_T PrimaryCCA = &pDM_Odm->DM_PriCCA; return PrimaryCCA->DupRTS_flag; } @@ -530,8 +530,8 @@ odm_DynamicPrimaryCCA( struct adapter *Adapter = pDM_Odm->Adapter; /* for NIC */ prtl8192cd_priv priv = pDM_Odm->priv; /* for AP */ HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - Pfalse_ALARM_STATISTICS FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); - pPri_CCA_T PrimaryCCA = &(pDM_Odm->DM_PriCCA); + Pfalse_ALARM_STATISTICS FalseAlmCnt = &pDM_Odm->FalseAlmCnt; + pPri_CCA_T PrimaryCCA = &pDM_Odm->DM_PriCCA; bool Is40MHz; bool Client_40MHz = false, Client_tmp = false; /* connected client BW */ bool bConnected = false; /* connected or not */ diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index f359e75..2ea924e 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -94,7 +94,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 return ret; } - _enter_critical_mutex(&(adapter_to_dvobj(padapter)->h2c_fwcmd_mutex), NULL); + _enter_critical_mutex(&adapter_to_dvobj(padapter)->h2c_fwcmd_mutex, NULL); if (!pCmdBuffer) { goto exit; @@ -156,7 +156,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 exit: - _exit_critical_mutex(&(adapter_to_dvobj(padapter)->h2c_fwcmd_mutex), NULL); + _exit_critical_mutex(&adapter_to_dvobj(padapter)->h2c_fwcmd_mutex, NULL); ; @@ -234,7 +234,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi #if (RATE_ADAPTIVE_SUPPORT == 1) ODM_RA_UpdateRateInfo_8188E( - &(pHalData->odmpriv), + &pHalData->odmpriv, macid, raid, bitmap, @@ -336,9 +336,9 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength) struct rtw_ieee80211_hdr *pwlanhdr; __le16 *fctrl; u32 rate_len, pktlen; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; @@ -346,11 +346,11 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength) pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - fctrl = &(pwlanhdr->frame_ctl); + fctrl = &pwlanhdr->frame_ctl; *(fctrl) = 0; memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); @@ -395,7 +395,7 @@ static void ConstructBeacon(struct adapter *padapter, u8 *pframe, u32 *pLength) pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &pktlen); /* DS parameter set */ - pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen); + pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&cur_network->Configuration.DSConfig, &pktlen); if ( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) { @@ -438,15 +438,15 @@ static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength) struct rtw_ieee80211_hdr *pwlanhdr; __le16 *fctrl; u32 pktlen; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; /* DBG_88E("%s\n", __FUNCTION__); */ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; /* Frame control. */ - fctrl = &(pwlanhdr->frame_ctl); + fctrl = &pwlanhdr->frame_ctl; *(fctrl) = 0; SetPwrMgt(fctrl); SetFrameSubType(pframe, WIFI_PSPOLL); @@ -455,10 +455,10 @@ static void ConstructPSPoll(struct adapter *padapter, u8 *pframe, u32 *pLength) SetDuration(pframe, (pmlmeinfo->aid | 0xc000)); /* BSSID. */ - memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); /* TA. */ - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); *pLength = 16; } @@ -478,8 +478,8 @@ static void ConstructNullFunctionData( u32 pktlen; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *cur_network = &pmlmepriv->cur_network; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; /* DBG_88E("%s:%d\n", __FUNCTION__, bForcePowerSave); */ @@ -497,21 +497,21 @@ static void ConstructNullFunctionData( { case Ndis802_11Infrastructure: SetToDs(fctrl); - memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN); break; case Ndis802_11APMode: SetFrDs(fctrl); memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); - memcpy(pwlanhdr->addr2, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr2, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN); break; case Ndis802_11IBSS: default: memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); - memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); + memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); break; } @@ -699,8 +699,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) { JOINBSSRPT_PARM JoinBssRptParm; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; bool bSendBeacon=false; bool bcn_valid = false; u8 DLBcnCount=0; @@ -727,7 +727,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) /* 2010.05.11. Added by tynli. */ /* SetBcnCtrlReg(padapter, 0, BIT3); */ /* SetBcnCtrlReg(padapter, BIT4, 0); */ - rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)&(~BIT(3))); + rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)&~BIT(3)); rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)|BIT(4)); if (pHalData->RegFwHwTxQCtrl&BIT6) @@ -737,7 +737,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) } /* Set FWHW_TXQ_CTRL 0x422[6]=0 to tell Hw the packet is not a real beacon frame. */ - rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, (pHalData->RegFwHwTxQCtrl&(~BIT6))); + rtw_write8(padapter, REG_FWHW_TXQ_CTRL+2, (pHalData->RegFwHwTxQCtrl&~BIT6)); pHalData->RegFwHwTxQCtrl &= (~BIT6); /* Clear beacon valid check bit. */ @@ -812,7 +812,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) /* SetBcnCtrlReg(padapter, BIT3, 0); */ /* SetBcnCtrlReg(padapter, 0, BIT4); */ rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)|BIT(3)); - rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)&(~BIT(4))); + rtw_write8(padapter, REG_BCN_CTRL, rtw_read8(padapter, REG_BCN_CTRL)&~BIT(4)); /* To make sure that if there exists an adapter which would like to send beacon. */ /* If exists, the origianl value of 0x422[6] will be 1, we should check this to */ @@ -850,7 +850,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; struct P2P_PS_Offload_t *p2p_ps_offload = &pHalData->p2p_ps_offload; u8 i; diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index 6b7806f..a14ecd0 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -129,7 +129,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter) PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; u8 cut_ver,fab_ver; /* */ @@ -185,7 +185,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(Adapter); PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; struct dm_priv *pdmpriv = &pHalData->dmpriv; int i; @@ -218,21 +218,21 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_ABILITY,pdmpriv->InitODMFlag); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_TX_UNI,&(Adapter->xmitpriv.tx_bytes)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_RX_UNI,&(Adapter->recvpriv.rx_bytes)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_WM_MODE,&(pmlmeext->cur_wireless_mode)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_CHNL_OFFSET,&(pHalData->nCur40MhzPrimeSC)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_MODE,&(Adapter->securitypriv.dot11PrivacyAlgrthm)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BW,&(pHalData->CurrentChannelBW )); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_CHNL,&( pHalData->CurrentChannel)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_NET_CLOSED,&( Adapter->net_closed)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_MP_MODE,&(Adapter->registrypriv.mp_mode)); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_TX_UNI,&Adapter->xmitpriv.tx_bytes); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_RX_UNI,&Adapter->recvpriv.rx_bytes); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_WM_MODE,&pmlmeext->cur_wireless_mode); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_CHNL_OFFSET,&pHalData->nCur40MhzPrimeSC); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_MODE,&Adapter->securitypriv.dot11PrivacyAlgrthm); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BW,&pHalData->CurrentChannelBW ); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_CHNL,& pHalData->CurrentChannel); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_NET_CLOSED,& Adapter->net_closed); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_MP_MODE,&Adapter->registrypriv.mp_mode); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BAND,&(pDM_Odm->u8_temp)); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BAND,&pDM_Odm->u8_temp); /* only for 8192D ================= */ - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SCAN,&(pmlmepriv->bScanInProcess)); - ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_POWER_SAVING,&(pwrctrlpriv->bpower_saving)); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SCAN,&pmlmepriv->bScanInProcess); + ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_POWER_SAVING,&pwrctrlpriv->bpower_saving); ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_ANTENNA_TYPE, pHalData->TRxAntDivType); for (i=0; i< NUM_STA; i++) @@ -249,7 +249,7 @@ rtl8188e_InitHalDm( { PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; u8 i; dm_InitGPIOSetting(Adapter); @@ -275,7 +275,7 @@ rtl8188e_HalDmWatchDog( u8 hw_init_completed = false; PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - PDM_ODM_T pDM_Odm = &(pHalData->odmpriv); + PDM_ODM_T pDM_Odm = &pHalData->odmpriv; hw_init_completed = Adapter->hw_init_completed; @@ -335,7 +335,7 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter) struct dm_priv *pdmpriv = &pHalData->dmpriv; PDM_ODM_T podmpriv = &pHalData->odmpriv; memset(pdmpriv, 0, sizeof(struct dm_priv)); - /* spin_lock_init(&(pHalData->odm_stainfo_lock)); */ + /* spin_lock_init(&pHalData->odm_stainfo_lock); */ Init_ODM_ComInfo_88E(Adapter); ODM_InitDebugSetting(podmpriv); } @@ -375,7 +375,7 @@ u8 AntDivBeforeLink8188E(struct adapter *Adapter ) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); PDM_ODM_T pDM_Odm =&pHalData->odmpriv; SWAT_T *pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; - struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); + struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; /* Condition that does not need to use antenna diversity. */ if (pHalData->AntDivCfg== 0) diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 6eb14e5..8aa1a46 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -708,7 +708,7 @@ static void _MCUIO_Reset88E(struct adapter *padapter,u8 bReset) if (bReset==true) { /* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */ u1bTmp = rtw_read8(padapter, REG_RSV_CTRL+1); - rtw_write8(padapter,REG_RSV_CTRL+1, (u1bTmp&(~BIT3))); + rtw_write8(padapter,REG_RSV_CTRL+1, (u1bTmp&~BIT3)); } else { /* Enable MCU IO Wrapper */ u1bTmp = rtw_read8(padapter, REG_RSV_CTRL+1); @@ -722,7 +722,7 @@ void _8051Reset88E(struct adapter *padapter) _MCUIO_Reset88E(padapter,true); u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN+1); - rtw_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp&(~BIT2)); + rtw_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp&~BIT2); _MCUIO_Reset88E(padapter,false); rtw_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp|(BIT2)); @@ -1788,7 +1788,7 @@ hal_EfusePgPacketRead_8188e( /* Header Read ------------- */ if (ReadState & PG_STATE_HEADER) { - if (efuse_OneByteRead(pAdapter, efuse_addr ,&efuse_data, bPseudoTest)&&(efuse_data!=0xFF)) + if (efuse_OneByteRead(pAdapter, efuse_addr ,&efuse_data, bPseudoTest)&&efuse_data!=0xFF) { if (EXT_HEADER(efuse_data)) { @@ -1855,8 +1855,8 @@ hal_EfusePgPacketRead_8188e( } - if ( (data[0]== 0xff) &&(data[1]== 0xff) && (data[2]== 0xff) && (data[3]== 0xff) && - (data[4]== 0xff) &&(data[5]== 0xff) && (data[6]== 0xff) && (data[7]== 0xff)) + if ( (data[0]== 0xff) &&data[1]== 0xff && (data[2]== 0xff) && (data[3]== 0xff) && + (data[4]== 0xff) &&data[5]== 0xff && (data[6]== 0xff) && (data[7]== 0xff)) return false; else return true; @@ -2208,7 +2208,7 @@ hal_EfuseCheckIfDatafollowed( for (i=0; i<(word_cnts*2) ; i++) { - if (efuse_OneByteRead(pAdapter, (startAddr+i) ,&efuse_data, bPseudoTest)&&(efuse_data != 0xFF)) + if (efuse_OneByteRead(pAdapter, (startAddr+i) ,&efuse_data, bPseudoTest)&&efuse_data != 0xFF) bRet = true; } diff --git a/hal/rtl8188e_phycfg.c b/hal/rtl8188e_phycfg.c index d4b2ab0..14be401 100644 --- a/hal/rtl8188e_phycfg.c +++ b/hal/rtl8188e_phycfg.c @@ -434,7 +434,7 @@ phy_RFSerialRead( tmplong2 = (tmplong2 & (~bLSSIReadAddress)) | (NewOffset<<23) | bLSSIReadEdge; /* T65 RF */ - PHY_SetBBReg(Adapter, rFPGA0_XA_HSSIParameter2, bMaskDWord, tmplong&(~bLSSIReadEdge)); + PHY_SetBBReg(Adapter, rFPGA0_XA_HSSIParameter2, bMaskDWord, tmplong&~bLSSIReadEdge); rtw_udelay_os(10);/* PlatformStallExecution(10); */ PHY_SetBBReg(Adapter, pPhyReg->rfHSSIPara2, bMaskDWord, tmplong2); diff --git a/hal/rtl8188e_rf6052.c b/hal/rtl8188e_rf6052.c index 3df3cfd..830fbc1 100644 --- a/hal/rtl8188e_rf6052.c +++ b/hal/rtl8188e_rf6052.c @@ -249,7 +249,7 @@ rtl8188e_PHY_RF6052SetCckTxPower( for (idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) { - ptr = (u8*)(&(TxAGC[idx1])); + ptr = (u8*)(&TxAGC[idx1]); for (idx2=0; idx2<4; idx2++) { if (*ptr > RF6052_MAX_TX_PWR) @@ -400,7 +400,7 @@ static void getTxPowerWriteValByRegulatory88E( for (i=0; i<4; i++) { - pwr_diff_limit[i] = (u8)((pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf?8:0)]&(0x7f<<(i*8)))>>(i*8)); + pwr_diff_limit[i] = (u8)((pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf?8:0)]&0x7f<<(i*8))>>(i*8)); if (pwr_diff_limit[i] > pwr_diff) pwr_diff_limit[i] = pwr_diff; diff --git a/hal/rtl8188e_rxdesc.c b/hal/rtl8188e_rxdesc.c index bb9ee77..e0f078c 100644 --- a/hal/rtl8188e_rxdesc.c +++ b/hal/rtl8188e_rxdesc.c @@ -228,7 +228,7 @@ void update_recvframe_phyinfo_88e( pkt_info.StationID = psta->mac_id; pkt_info.Rate = pattrib->mcs_rate; - ODM_PhyStatusQuery(&pHalData->odmpriv,pPHYInfo,(u8 *)pphy_status,&(pkt_info)); + ODM_PhyStatusQuery(&pHalData->odmpriv,pPHYInfo,(u8 *)pphy_status,&pkt_info); precvframe->u.hdr.psta = NULL; if (pkt_info.bPacketMatchBSSID && diff --git a/hal/rtl8188e_xmit.c b/hal/rtl8188e_xmit.c index 97ed071..445fec0 100644 --- a/hal/rtl8188e_xmit.c +++ b/hal/rtl8188e_xmit.c @@ -65,7 +65,7 @@ void _dbg_dump_tx_info(struct adapter *padapter,int frame_tag,struct tx_desc *pt { u8 bDumpTxPkt; u8 bDumpTxDesc = false; - rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt)); + rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &bDumpTxPkt); if (bDumpTxPkt ==1) {/* dump txdesc for data frame */ DBG_88E("dump tx_desc for data frame\n"); diff --git a/hal/rtl8188eu_led.c b/hal/rtl8188eu_led.c index d1b5c31..84990dd 100644 --- a/hal/rtl8188eu_led.c +++ b/hal/rtl8188eu_led.c @@ -145,13 +145,13 @@ rtl8188eu_InitSwLeds( struct adapter *padapter ) { - struct led_priv *pledpriv = &(padapter->ledpriv); + struct led_priv *pledpriv = &padapter->ledpriv; pledpriv->LedControlHandler = LedControl871x; - InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0); + InitLed871x(padapter, &pledpriv->SwLed0, LED_PIN_LED0); - InitLed871x(padapter,&(pledpriv->SwLed1), LED_PIN_LED1); + InitLed871x(padapter,&pledpriv->SwLed1, LED_PIN_LED1); } @@ -164,8 +164,8 @@ rtl8188eu_DeInitSwLeds( struct adapter *padapter ) { - struct led_priv *ledpriv = &(padapter->ledpriv); + struct led_priv *ledpriv = &padapter->ledpriv; - DeInitLed871x( &(ledpriv->SwLed0) ); - DeInitLed871x( &(ledpriv->SwLed1) ); + DeInitLed871x( &ledpriv->SwLed0 ); + DeInitLed871x( &ledpriv->SwLed1 ); } diff --git a/hal/rtl8188eu_recv.c b/hal/rtl8188eu_recv.c index cedef33..9f0c435 100644 --- a/hal/rtl8188eu_recv.c +++ b/hal/rtl8188eu_recv.c @@ -107,7 +107,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf->adapter =padapter; - /* rtw_list_insert_tail(&precvbuf->list, &(precvpriv->free_recv_buf_queue.queue)); */ + /* rtw_list_insert_tail(&precvbuf->list, &precvpriv->free_recv_buf_queue.queue); */ precvbuf++; diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 185d3bf..2b20662 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -214,14 +214,14 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct tx_desc *ptxdesc = (struct tx_desc *)pmem; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; sint bmcst = IS_MCAST(pattrib->ra); #ifdef CONFIG_P2P struct wifidirect_info* pwdinfo = &padapter->wdinfo; #endif /* CONFIG_P2P */ if (padapter->registrypriv.mp_mode == 0) { - if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)== 0)) { + if ((!bagg_pkt) &&urb_zero_packet_chk(padapter, sz== 0)) { ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ); pull = 1; } @@ -641,26 +641,26 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm switch (pfirstframe->attrib.priority) { case 1: case 2: - ptxservq = &(psta->sta_xmitpriv.bk_q); + ptxservq = &psta->sta_xmitpriv.bk_q; phwxmit = pxmitpriv->hwxmits + 3; break; case 4: case 5: - ptxservq = &(psta->sta_xmitpriv.vi_q); + ptxservq = &psta->sta_xmitpriv.vi_q; phwxmit = pxmitpriv->hwxmits + 1; break; case 6: case 7: - ptxservq = &(psta->sta_xmitpriv.vo_q); + ptxservq = &psta->sta_xmitpriv.vo_q; phwxmit = pxmitpriv->hwxmits; break; case 0: case 3: default: - ptxservq = &(psta->sta_xmitpriv.be_q); + ptxservq = &psta->sta_xmitpriv.be_q; phwxmit = pxmitpriv->hwxmits + 2; break; } diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index e56c505..7250685 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -223,7 +223,7 @@ static void _InitPABias(struct adapter *padapter) static void _InitBTCoexist(struct adapter *padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - struct btcoexist_priv *pbtpriv = &(pHalData->bt_coexist); + struct btcoexist_priv *pbtpriv = &pHalData->bt_coexist; u8 u1Tmp; if (pbtpriv->BT_Coexist && pbtpriv->BT_CoexistType == BT_CSR_BC4) @@ -800,7 +800,7 @@ usb_AggSettingTxUpdate( ) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - /* PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); */ + /* PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; */ u32 value32; if (Adapter->registrypriv.wifi_spec) @@ -837,7 +837,7 @@ usb_AggSettingRxUpdate( ) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - /* PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); */ + /* PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; */ u8 valueDMA; u8 valueUSB; @@ -1158,7 +1158,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) rt_rf_power_state eRfPowerStateToSet; #ifdef CONFIG_BT_COEXIST - struct btcoexist_priv *pbtpriv = &(pHalData->bt_coexist); + struct btcoexist_priv *pbtpriv = &pHalData->bt_coexist; #endif u32 init_start_time = jiffies; @@ -1561,7 +1561,7 @@ static void hal_poweroff_rtl8188eu( /* Stop Tx Report Timer. 0x4EC[Bit1]=b'0 */ val8 = rtw_read8(Adapter, REG_TX_RPT_CTRL); - rtw_write8(Adapter, REG_TX_RPT_CTRL, val8&(~BIT1)); + rtw_write8(Adapter, REG_TX_RPT_CTRL, val8&~BIT1); /* stop rx */ rtw_write8(Adapter, REG_CR, 0x0); @@ -1589,14 +1589,14 @@ static void hal_poweroff_rtl8188eu( /* YJ,add,111212 */ /* Disable 32k */ val8 = rtw_read8(Adapter, REG_32K_CTRL); - rtw_write8(Adapter, REG_32K_CTRL, val8&(~BIT0)); + rtw_write8(Adapter, REG_32K_CTRL, val8&~BIT0); /* Card disable power action flow */ HalPwrSeqCmdParsing(Adapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_DISABLE_FLOW); /* Reset MCU IO Wrapper */ val8 = rtw_read8(Adapter, REG_RSV_CTRL+1); - rtw_write8(Adapter, REG_RSV_CTRL+1, (val8&(~BIT3))); + rtw_write8(Adapter, REG_RSV_CTRL+1, (val8&~BIT3)); val8 = rtw_read8(Adapter, REG_RSV_CTRL+1); rtw_write8(Adapter, REG_RSV_CTRL+1, val8|BIT3); @@ -1659,7 +1659,7 @@ static unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) uint status; struct dvobj_priv *pdev= adapter_to_dvobj(Adapter); struct intf_hdl * pintfhdl=&Adapter->iopriv.intf; - struct recv_priv *precvpriv = &(Adapter->recvpriv); + struct recv_priv *precvpriv = &Adapter->recvpriv; u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); #ifdef CONFIG_USB_INTERRUPT_IN_PIPE HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); @@ -1769,7 +1769,7 @@ _ReadLEDSetting( bool AutoloadFail ) { - struct led_priv *pledpriv = &(Adapter->ledpriv); + struct led_priv *pledpriv = &Adapter->ledpriv; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); pledpriv->bRegUseLed = true; @@ -2042,9 +2042,9 @@ static void UpdateInterruptMask8188EU(struct adapter *padapter,u8 bHIMR0 ,u32 Ad pHalData = GET_HAL_DATA(padapter); if (bHIMR0) - himr = &(pHalData->IntrMask[0]); + himr = &pHalData->IntrMask[0]; else - himr = &(pHalData->IntrMask[1]); + himr = &pHalData->IntrMask[1]; if (AddMSR) *himr |= AddMSR; @@ -2181,7 +2181,7 @@ static void hw_var_set_bcn_func(struct adapter *Adapter, u8 variable, u8* val) if (*((u8 *)val)) rtw_write8(Adapter, bcn_ctrl_reg, (EN_BCN_FUNCTION | EN_TXBCN_RPT)); else - rtw_write8(Adapter, bcn_ctrl_reg, rtw_read8(Adapter, bcn_ctrl_reg)&(~(EN_BCN_FUNCTION | EN_TXBCN_RPT))); + rtw_write8(Adapter, bcn_ctrl_reg, rtw_read8(Adapter, bcn_ctrl_reg)&~(EN_BCN_FUNCTION | EN_TXBCN_RPT)); } static void hw_var_set_correct_tsf(struct adapter *Adapter, u8 variable, u8* val) @@ -2281,7 +2281,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) { u64 tsf; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; tsf = pmlmeext->TSFValue - rtw_modular64(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) -1024; /* us */ @@ -2293,7 +2293,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) } /* disable related TSF function */ - rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(3))); + rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&~BIT(3)); rtw_write32(Adapter, REG_TSFTR, tsf); rtw_write32(Adapter, REG_TSFTR+4, tsf>>32); @@ -2305,7 +2305,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) if (((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) { /* pHalData->RegTxPause &= (~STOP_BCNQ); */ - /* rtw_write8(Adapter, REG_TXPAUSE, (rtw_read8(Adapter, REG_TXPAUSE)&(~BIT(6)))); */ + /* rtw_write8(Adapter, REG_TXPAUSE, (rtw_read8(Adapter, REG_TXPAUSE)&~BIT(6))); */ ResumeTxBeacon(Adapter); } } @@ -2356,7 +2356,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) else/* sitesurvey done */ { struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; if ((is_client_associated_to_ap(Adapter) == true) || ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) ) @@ -2366,7 +2366,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) rtw_write16(Adapter, REG_RXFLTMAP2,0xFFFF); /* enable update TSF */ - rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4))); + rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&~BIT(4)); } else if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) { @@ -2374,7 +2374,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) rtw_write16(Adapter, REG_RXFLTMAP2,0xFFFF); /* enable update TSF */ - rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4))); + rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&~BIT(4)); } if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) @@ -2433,7 +2433,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) else if (type == 2) /* sta add event call back */ { /* enable update TSF */ - rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4))); + rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&~BIT(4)); if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE)) { @@ -2459,7 +2459,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) { u8 u1bAIFS, aSifsTime; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; rtw_write8(Adapter, REG_SLOT, val[0]); @@ -3145,8 +3145,8 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); /* struct dm_priv *pdmpriv = &pHalData->dmpriv; */ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; if (mac_id >= NUM_STA) /* CAM_SIZE */ return; @@ -3163,9 +3163,9 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss raid = networktype_to_raid(networkType); mask = update_supported_rate(cur_network->SupportedRates, supportRateNum); - mask |= (pmlmeinfo->HT_enable)? update_MSC_rate(&(pmlmeinfo->HT_caps)): 0; + mask |= (pmlmeinfo->HT_enable)? update_MSC_rate(&pmlmeinfo->HT_caps): 0; - if (support_short_GI(padapter, &(pmlmeinfo->HT_caps))) + if (support_short_GI(padapter, &pmlmeinfo->HT_caps)) shortGIrate = true; break; case 1:/* for broadcast/multicast */ @@ -3217,7 +3217,7 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss } else { #if (RATE_ADAPTIVE_SUPPORT == 1) ODM_RA_UpdateRateInfo_8188E( - &(pHalData->odmpriv), + &pHalData->odmpriv, mac_id, raid, mask, @@ -3238,8 +3238,8 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss static void SetBeaconRelatedRegisters8188EUsb(struct adapter *padapter) { u32 value32; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u32 bcn_ctrl_reg = REG_BCN_CTRL; /* reset TSF, enable update TSF, correcting TSF On Beacon */ diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 419338f..ce09818 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -297,8 +297,8 @@ static void interrupt_handler_8188eu(struct adapter *padapter,u16 pkt_len,u8 *pb } /* HISR */ - memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4); - memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4); + memcpy(&pHalData->IntArray[0], &pbuf[USB_INTR_CONTENT_HISR_OFFSET], 4); + memcpy(&pHalData->IntArray[1], &pbuf[USB_INTR_CONTENT_HISRE_OFFSET], 4); if ( pHalData->IntArray[1] & IMR_TXERR_88E ) DBG_88E("===> %s Tx Error Flag Interrupt Status\n",__FUNCTION__); @@ -311,7 +311,7 @@ static void interrupt_handler_8188eu(struct adapter *padapter,u16 pkt_len,u8 *pb /* C2H Event */ if (pbuf[0]!= 0) { - memcpy(&(pHalData->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16); + memcpy(&pHalData->C2hArray[0], &pbuf[USB_INTR_CONTENT_C2H_OFFSET], 16); /* rtw_c2h_wk_cmd(padapter); to do.. */ } @@ -460,7 +460,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb) pattrib = &precvframe->u.hdr.attrib; - if ((padapter->registrypriv.mp_mode == 0) &&((pattrib->crc_err) || (pattrib->icv_err))) + if ((padapter->registrypriv.mp_mode == 0) && (pattrib->crc_err || pattrib->icv_err)) { DBG_8192C("%s: RX Warning! crc_err=%d icv_err=%d, skip!\n", __FUNCTION__, pattrib->crc_err, pattrib->icv_err); @@ -498,7 +498,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb) /* for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */ /* modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */ - if ((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)) { + if ((pattrib->mfrag == 1)&&pattrib->frag_num == 0) { if (skb_len <= 1650) alloc_sz = 1664; else @@ -526,7 +526,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb) } else { - if ((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)) + if ((pattrib->mfrag == 1)&&pattrib->frag_num == 0) { DBG_8192C("recvbuf2recvframe: alloc_skb fail , drop frag frame\n"); rtw_free_recvframe(precvframe, pfree_recv_queue); diff --git a/include/osdep_service.h b/include/osdep_service.h index ada7aca..ac65329 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -152,7 +152,7 @@ __inline static struct list_head *get_next(struct list_head *list) __inline static struct list_head *get_list_head(struct __queue *queue) { - return (&(queue->queue)); + return (&queue->queue); } diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 7bfd6ff..3b9ca88 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -343,7 +343,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl struct wireless_dev *wdev = padapter->rtw_wdev; struct wiphy *wiphy = wdev->wiphy; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; /* DBG_8192C("%s\n", __func__); */ @@ -419,7 +419,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl pbuf = buf; pwlanhdr = (struct rtw_ieee80211_hdr *)pbuf; - fctrl = &(pwlanhdr->frame_ctl); + fctrl = &pwlanhdr->frame_ctl; *(fctrl) = 0; SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); @@ -429,7 +429,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); SetFrameSubType(pbuf, WIFI_BEACON); } else { - memcpy(pwlanhdr->addr1, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); SetFrameSubType(pbuf, WIFI_PROBERSP); } @@ -509,7 +509,7 @@ exit: */ int rtw_cfg80211_check_bss(struct adapter *padapter) { - struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); + struct wlan_bssid_ex *pnetwork = &padapter->mlmeextpriv.mlmext_info.network; struct cfg80211_bss *bss = NULL; struct ieee80211_channel *notify_channel = NULL; u32 freq; @@ -534,7 +534,7 @@ int rtw_cfg80211_check_bss(struct adapter *padapter) void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct wlan_network *cur_network = &(pmlmepriv->cur_network); + struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wireless_dev *pwdev = padapter->rtw_wdev; struct cfg80211_bss *bss = NULL; struct ieee80211_channel *notify_channel; @@ -549,7 +549,7 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter) } if (!rtw_cfg80211_check_bss(padapter)) { - struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); + struct wlan_bssid_ex *pnetwork = &padapter->mlmeextpriv.mlmext_info.network; struct wlan_network *scanned = pmlmepriv->cur_network_scanned; if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true) @@ -571,7 +571,7 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter) return; } - if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid)) == true + if (_rtw_memcmp(&scanned->network.Ssid, &pnetwork->Ssid, sizeof(struct ndis_802_11_ssid)) == true && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(ETH_ALEN)) == true ) { if (!rtw_cfg80211_inform_bss(padapter,scanned)) { @@ -604,10 +604,10 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter) void rtw_cfg80211_indicate_connect(struct adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct wlan_network *cur_network = &(pmlmepriv->cur_network); + struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wireless_dev *pwdev = padapter->rtw_wdev; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; #endif struct cfg80211_bss *bss = NULL; @@ -637,7 +637,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter) #endif /* CONFIG_P2P */ { - struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); + struct wlan_bssid_ex *pnetwork = &padapter->mlmeextpriv.mlmext_info.network; struct wlan_network *scanned = pmlmepriv->cur_network_scanned; /* DBG_88E(FUNC_ADPT_FMT" BSS not found\n", FUNC_ADPT_ARG(padapter)); */ @@ -648,7 +648,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter) } if (_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(ETH_ALEN)) == true - && _rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(struct ndis_802_11_ssid)) == true + && _rtw_memcmp(&scanned->network.Ssid, &pnetwork->Ssid, sizeof(struct ndis_802_11_ssid)) == true ) { if (!rtw_cfg80211_inform_bss(padapter,scanned)) { DBG_88E(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter)); @@ -726,7 +726,7 @@ void rtw_cfg80211_indicate_disconnect(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wireless_dev *pwdev = padapter->rtw_wdev; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; #endif DBG_88E(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); @@ -813,7 +813,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) u8 keylen; struct cmd_obj* pcmd; struct setkey_parm *psetkeyparm; - struct cmd_priv *pcmdpriv=&(padapter->cmdpriv); + struct cmd_priv *pcmdpriv=&padapter->cmdpriv; int res=_SUCCESS; DBG_8192C("%s\n", __FUNCTION__); @@ -854,7 +854,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) keylen = 16; } - memcpy(&(psetkeyparm->key[0]), key, keylen); + memcpy(&psetkeyparm->key[0], key, keylen); pcmd->cmdcode = _SetKey_CMD_; pcmd->parmbuf = (u8 *)psetkeyparm; @@ -901,7 +901,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa struct sta_info *psta = NULL, *pbcmc_sta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct security_priv* psecuritypriv=&(padapter->securitypriv); + struct security_priv* psecuritypriv=&padapter->securitypriv; struct sta_priv *pstapriv = &padapter->stapriv; DBG_8192C("%s\n", __FUNCTION__); @@ -985,7 +985,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; } - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); + memcpy(&psecuritypriv->dot11DefKey[wep_key_idx].skey[0], param->u.crypt.key, wep_key_len); psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; @@ -1023,8 +1023,8 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[16], 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -1091,8 +1091,8 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, ¶m->u.crypt.key[16], 8); + memcpy(psta->dot11tkiprxmickey.skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -1138,8 +1138,8 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[16], 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -1257,7 +1257,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; } - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); + memcpy(&psecuritypriv->dot11DefKey[wep_key_idx].skey[0], param->u.crypt.key, wep_key_len); psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; @@ -1303,8 +1303,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param if (strcmp(param->u.crypt.alg, "TKIP") == 0)/* set mic key */ { /* DEBUG_ERR(("\nset key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ - memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, ¶m->u.crypt.key[16], 8); + memcpy(psta->dot11tkiprxmickey.skey, ¶m->u.crypt.key[24], 8); padapter->securitypriv.busetkipkey=false; /* _set_timer(&padapter->securitypriv.tkip_timer, 50); */ @@ -1320,8 +1320,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param if (strcmp(param->u.crypt.alg, "TKIP") == 0 || strcmp(param->u.crypt.alg, "CCMP") == 0) { memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key,(param->u.crypt.key_len>16 ?16:param->u.crypt.key_len)); - memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[16]),8); - memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[24]),8); + memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,¶m->u.crypt.key[16],8); + memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,¶m->u.crypt.key[24],8); padapter->securitypriv.binstallGrpkey = true; /* DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len)); */ DBG_88E(" ~~~~set sta key:groupkey\n"); @@ -1617,7 +1617,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, && check_fwstate(pmlmepriv, _FW_LINKED) ) { - struct wlan_network *cur_network = &(pmlmepriv->cur_network); + struct wlan_network *cur_network = &pmlmepriv->cur_network; if (_rtw_memcmp((void *)mac, cur_network->network.MacAddress, ETH_ALEN) == false) { DBG_88E("%s, mismatch bssid="MAC_FMT"\n", __func__, MAC_ARG(cur_network->network.MacAddress)); @@ -1670,10 +1670,10 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, enum nl80211_iftype old_type; enum NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ; struct adapter *padapter = wiphy_to_adapter(wiphy); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct wireless_dev *rtw_wdev = wiphy_to_wdev(wiphy); #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; #endif int ret = 0; u8 change = false; @@ -1815,8 +1815,8 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) { unsigned long irqL; struct list_head *plist, *phead; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u32 cnt=0; u32 wait_for_surveydone; @@ -1830,7 +1830,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) DBG_8192C("%s\n", __func__); #endif - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -1844,7 +1844,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) /* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0 - && true == rtw_validate_ssid(&(pnetwork->network.Ssid)) + && true == rtw_validate_ssid(&pnetwork->network.Ssid) ) { /* ev=translate_scan(padapter, a, pnetwork, ev, stop); */ @@ -1855,7 +1855,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); /* call this after other things have been done */ rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), false); @@ -1870,7 +1870,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b u8 *p2p_ie; u32 wfd_ielen = 0; u8 *wfd_ie; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; #ifdef CONFIG_DEBUG_CFG80211 DBG_8192C("%s, ielen=%d\n", __func__, len); @@ -2001,7 +2001,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy u8 survey_times=3; u8 survey_times_for_one_ch=6; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; #endif /* CONFIG_P2P */ struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev); struct cfg80211_ssid *ssids = request->ssids; @@ -2416,7 +2416,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel {/* check p2p_ie for assoc req; */ uint p2p_ielen=0; u8 *p2p_ie; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if ((p2p_ie=rtw_get_p2p_ie(buf, ielen, NULL, &p2p_ielen))) { @@ -2447,7 +2447,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel {/* check wfd_ie for assoc req; */ uint wfd_ielen=0; u8 *wfd_ie; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if (rtw_get_wfd_ie(buf, ielen, NULL, &wfd_ielen)) { @@ -2932,7 +2932,7 @@ void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, s32 freq; int channel; struct wireless_dev *pwdev = padapter->rtw_wdev; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct net_device *ndev = padapter->pnetdev; DBG_88E(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); @@ -2961,8 +2961,8 @@ void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char struct rtw_ieee80211_hdr *pwlanhdr; unsigned short *fctrl; u8 mgmt_buf[128] = {0}; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct net_device *ndev = padapter->pnetdev; DBG_88E(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); @@ -3071,8 +3071,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de /* u8 category, action, OUI_Subtype, dialogToken=0; */ /* unsigned char *frame_body; */ struct rtw_ieee80211_hdr *pwlanhdr; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; u8 *buf = skb->data; u32 len = skb->len; u8 category, action; @@ -3373,7 +3373,7 @@ static int rtw_add_beacon(struct adapter *adapter, const u8 *head, size_t head_l uint p2p_ielen=0; u8 *p2p_ie; u8 got_p2p_ie = false; - struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); + struct mlme_priv *pmlmepriv = &adapter->mlmepriv; /* struct sta_priv *pstapriv = &padapter->stapriv; */ @@ -3415,7 +3415,7 @@ static int rtw_add_beacon(struct adapter *adapter, const u8 *head, size_t head_l if (rtw_get_p2p_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, NULL, &p2p_ielen)) { struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; - struct wifidirect_info *pwdinfo= &(adapter->wdinfo); + struct wifidirect_info *pwdinfo= &adapter->wdinfo; DBG_8192C("got p2p_ie, len=%d\n", p2p_ielen); got_p2p_ie = true; @@ -3449,7 +3449,7 @@ static int rtw_add_beacon(struct adapter *adapter, const u8 *head, size_t head_l if (got_p2p_ie == true) { struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; - struct wifidirect_info *pwdinfo= &(adapter->wdinfo); + struct wifidirect_info *pwdinfo= &adapter->wdinfo; pwdinfo->operating_channel = pmlmeext->cur_channel; } #endif /* CONFIG_P2P */ @@ -3483,7 +3483,7 @@ static int cfg80211_rtw_set_beacon(struct wiphy *wiphy, struct net_device *ndev, struct beacon_parameters *info) { struct adapter *padapter = wiphy_to_adapter(wiphy); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); @@ -3579,7 +3579,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev u8 updated; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) const u8 *mac = params->mac; @@ -3743,7 +3743,7 @@ void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame, uint int type; s32 freq; int channel; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; u8 category, action; channel = rtw_get_oper_ch(padapter); @@ -3775,7 +3775,7 @@ void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter, u8 *pmgmt_frame int type; s32 freq; int channel; - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; u8 category, action; channel = rtw_get_oper_ch(padapter); @@ -3814,7 +3814,7 @@ void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len, { s32 freq; int channel; - struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(adapter->rtw_wdev); u8 category, action; @@ -3868,11 +3868,11 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8 unsigned char *pframe; struct rtw_ieee80211_hdr *pwlanhdr; __le16 *fctrl; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + struct wifidirect_info *pwdinfo = &padapter->wdinfo; u8 *frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr)); size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr); __be16 be_tmp; @@ -3936,11 +3936,11 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - fctrl = &(pwlanhdr->frame_ctl); + fctrl = &pwlanhdr->frame_ctl; *(fctrl) = 0; memcpy(pwlanhdr->addr1, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); + memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr3, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); @@ -3950,11 +3950,11 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); - pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); - pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); - pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *) &(p2poui), &(pattrib->pktlen)); - pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen)); - pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen)); + pframe = rtw_set_fixed_ie(pframe, 1, &category, &pattrib->pktlen); + pframe = rtw_set_fixed_ie(pframe, 1, &action, &pattrib->pktlen); + pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *) &p2poui, &pattrib->pktlen); + pframe = rtw_set_fixed_ie(pframe, 1, &oui_subtype, &pattrib->pktlen); + pframe = rtw_set_fixed_ie(pframe, 1, &dialogToken, &pattrib->pktlen); /* build_prov_disc_request_p2p_ie */ @@ -4199,9 +4199,9 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b bool ack = true; struct rtw_ieee80211_hdr *pwlanhdr; struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev); - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct wifidirect_info *pwdinfo = &padapter->wdinfo; /* struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo; */ @@ -4450,8 +4450,8 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf, u32 wfd_ielen = 0; u8 *wfd_ie; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; DBG_88E(FUNC_NDEV_FMT" ielen=%d\n", FUNC_NDEV_ARG(ndev), len); @@ -4562,7 +4562,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu u32 wfd_ielen = 0; u8 *wfd_ie; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; #ifdef CONFIG_DEBUG_CFG80211 DBG_8192C("%s, ielen=%d\n", __func__, len); @@ -4737,7 +4737,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu { int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; DBG_8192C("%s, ielen=%d\n", __func__, len); diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 47e5ae2..781c8dc 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -197,8 +197,8 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter) union iwreq_data wrqu; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network)); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; + struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&pmlmeinfo->network); memset(&wrqu, 0, sizeof(union iwreq_data)); @@ -226,7 +226,7 @@ static char *translate_scan(struct adapter *padapter, struct iw_request_info* info, struct wlan_network *pnetwork, char *start, char *stop) { - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 ss, sq; struct iw_event iwe; u16 cap; @@ -600,7 +600,7 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value) struct adapter *padapter = (struct adapter *) rtw_netdev_priv(dev); int ret = 0; - if ((value & AUTH_ALG_SHARED_KEY)&&(value & AUTH_ALG_OPEN_SYSTEM)) + if ((value & AUTH_ALG_SHARED_KEY)&&value & AUTH_ALG_OPEN_SYSTEM) { DBG_88E("wpa_set_auth_algs, AUTH_ALG_SHARED_KEY and AUTH_ALG_OPEN_SYSTEM [value:0x%x]\n",value); padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; @@ -747,7 +747,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, ret = -EOPNOTSUPP ; goto exit; } - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&psecuritypriv->dot11DefKey[wep_key_idx].skey[0], pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx]=pwep->KeyLength; rtw_set_key(padapter, psecuritypriv, wep_key_idx, 0,true); } @@ -784,8 +784,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (strcmp(param->u.crypt.alg, "TKIP") == 0)/* set mic key */ { - memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, ¶m->u.crypt.key[16], 8); + memcpy(psta->dot11tkiprxmickey.skey, ¶m->u.crypt.key[24], 8); padapter->securitypriv.busetkipkey=false; } @@ -803,8 +803,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, /* only TKIP group key need to install this */ if (param->u.crypt.key_len > 16) { - memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[16]),8); - memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[24]),8); + memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,¶m->u.crypt.key[16],8); + memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,¶m->u.crypt.key[24],8); } padapter->securitypriv.binstallGrpkey = true; DBG_88E(" ~~~~set sta key:groupkey\n"); @@ -983,7 +983,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie { eid = buf[cnt]; - if ((eid==_VENDOR_SPECIFIC_IE_)&&(_rtw_memcmp(&buf[cnt+2], wps_oui, 4)==true)) + if ((eid==_VENDOR_SPECIFIC_IE_)&&_rtw_memcmp(&buf[cnt+2], wps_oui, 4==true)) { DBG_88E("SET WPS_IE\n"); @@ -1037,7 +1037,7 @@ static int rtw_wx_get_name(struct net_device *dev, u32 ht_ielen = 0; char *p; u8 ht_cap=false; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; u8 *prates; @@ -1097,7 +1097,7 @@ static int rtw_wx_get_freq(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; if (check_fwstate(pmlmepriv, _FW_LINKED) == true) @@ -1183,7 +1183,7 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *b) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_get_mode\n")); @@ -1403,10 +1403,10 @@ static int rtw_wx_set_wap(struct net_device *dev, uint ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct sockaddr *temp = (struct sockaddr *)awrq; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct list_head *phead; u8 *dst_bssid, *src_bssid; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; enum NDIS_802_11_AUTHENTICATION_MODE authmode; @@ -1480,7 +1480,7 @@ static int rtw_wx_get_wap(struct net_device *dev, { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; wrqu->ap_addr.sa_family = ARPHRD_ETHER; @@ -1554,7 +1554,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT]; unsigned long irqL; #ifdef CONFIG_P2P - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; #endif /* CONFIG_P2P */ RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_set_scan\n")); @@ -1744,8 +1744,8 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, unsigned long irqL; struct list_head *plist, *phead; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; char *ev = extra; char *stop = ev + wrqu->data.length; @@ -1800,7 +1800,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, if (check_fwstate(pmlmepriv, wait_status)) return -EAGAIN; - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -1819,7 +1819,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, /* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0 - && true == rtw_validate_ssid(&(pnetwork->network.Ssid)) + && true == rtw_validate_ssid(&pnetwork->network.Ssid) ) { ev=translate_scan(padapter, a, pnetwork, ev, stop); @@ -1829,7 +1829,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); wrqu->data.length = ev-extra; wrqu->data.flags = 0; @@ -2001,7 +2001,7 @@ static int rtw_wx_get_essid(struct net_device *dev, { u32 len,ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network; RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_essid\n")); @@ -2237,7 +2237,7 @@ static int rtw_wx_set_enc(struct net_device *dev, struct ndis_802_11_wep wep; enum NDIS_802_11_AUTHENTICATION_MODE authmode; - struct iw_point *erq = &(wrqu->encoding); + struct iw_point *erq = &wrqu->encoding; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); DBG_88E("+rtw_wx_set_enc, flags=0x%x\n", erq->flags); @@ -2350,8 +2350,8 @@ static int rtw_wx_get_enc(struct net_device *dev, { uint key, ret =0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct iw_point *erq = &(wrqu->encoding); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct iw_point *erq = &wrqu->encoding; + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ; @@ -2439,11 +2439,11 @@ static int rtw_wx_set_auth(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct iw_param *param = (struct iw_param*)&(wrqu->param); + struct iw_param *param = (struct iw_param*)&wrqu->param; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u32 value = param->value; int ret = 0; @@ -3109,8 +3109,8 @@ static int rtw_get_ap_info(struct net_device *dev, char data[32]; struct wlan_network *pnetwork = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct __queue *queue = &pmlmepriv->scanned_queue; struct iw_point *pdata = &wrqu->data; DBG_88E("+rtw_get_aplist_info\n"); @@ -3146,7 +3146,7 @@ static int rtw_get_ap_info(struct net_device *dev, goto exit; } - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -3163,7 +3163,7 @@ static int rtw_get_ap_info(struct net_device *dev, if (hwaddr_aton_i(data, bssid)) { DBG_88E("Invalid BSSID '%s'.\n", (u8*)data); - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); return -EINVAL; } @@ -3192,7 +3192,7 @@ static int rtw_get_ap_info(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (pdata->length>=34) { if (copy_to_user((u8 __user *)pdata->pointer+32, (u8*)&pdata->flags, 1)) { @@ -3289,9 +3289,9 @@ static int rtw_wext_p2p_enable(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; enum P2P_ROLE init_role = P2P_ROLE_DISABLE; @@ -3346,9 +3346,9 @@ static int rtw_p2p_set_go_nego_ssid(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; DBG_88E( "[%s] ssid = %s, len = %zu\n", __FUNCTION__, extra, strlen( extra ) ); memcpy( pwdinfo->nego_ssid, extra, strlen( extra ) ); @@ -3365,7 +3365,7 @@ static int rtw_p2p_set_intent(struct net_device *dev, { int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; u8 intent = pwdinfo->intent; extra[ wrqu->data.length ] = 0x00; @@ -3394,7 +3394,7 @@ static int rtw_p2p_set_listen_ch(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; u8 listen_ch = pwdinfo->listen_channel; /* Listen channel number */ extra[ wrqu->data.length ] = 0x00; @@ -3425,7 +3425,7 @@ static int rtw_p2p_set_op_ch(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; u8 op_ch = pwdinfo->operating_channel; /* Operating channel number */ extra[ wrqu->data.length ] = 0x00; @@ -3454,7 +3454,7 @@ static int rtw_p2p_profilefound(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; /* Comment by Albert 2010/10/13 */ /* Input data format: */ @@ -3513,7 +3513,7 @@ static int rtw_p2p_setDN(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; DBG_88E( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 ); @@ -3534,7 +3534,7 @@ static int rtw_p2p_get_status(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; if ( padapter->bShowGetP2PState ) { @@ -3566,7 +3566,7 @@ static int rtw_p2p_get_req_cm(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; sprintf( extra, "\n\nCM=%s\n", pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req ); wrqu->data.length = strlen( extra ); @@ -3583,7 +3583,7 @@ static int rtw_p2p_get_role(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] Role = %d, Status = %d, peer addr = %.2X:%.2X:%.2X:%.2X:%.2X:%.2X\n", __FUNCTION__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), @@ -3605,7 +3605,7 @@ static int rtw_p2p_get_peer_ifaddr(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] Role = %d, Status = %d, peer addr = %.2X:%.2X:%.2X:%.2X:%.2X:%.2X\n", __FUNCTION__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), @@ -3629,7 +3629,7 @@ static int rtw_p2p_get_peer_devaddr(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] Role = %d, Status = %d, peer addr = %.2X:%.2X:%.2X:%.2X:%.2X:%.2X\n", __FUNCTION__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), pwdinfo->rx_prov_disc_info.peerDevAddr[ 0 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 1 ], @@ -3653,7 +3653,7 @@ static int rtw_p2p_get_peer_devaddr_by_invitation(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] Role = %d, Status = %d, peer addr = %.2X:%.2X:%.2X:%.2X:%.2X:%.2X\n", __FUNCTION__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), pwdinfo->p2p_peer_device_addr[ 0 ], pwdinfo->p2p_peer_device_addr[ 1 ], @@ -3677,7 +3677,7 @@ static int rtw_p2p_get_groupid(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; sprintf( extra, "\n%.2X:%.2X:%.2X:%.2X:%.2X:%.2X %s", pwdinfo->groupid_info.go_device_addr[ 0 ], pwdinfo->groupid_info.go_device_addr[ 1 ], @@ -3698,7 +3698,7 @@ static int rtw_p2p_get_op_ch(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] Op_ch = %02x\n", __FUNCTION__, pwdinfo->operating_channel); @@ -3729,7 +3729,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist,*phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 blnMatch = 0; __be16 be_attr_content = 0; @@ -3746,7 +3746,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, macstr2num(peerMAC, subcmd); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -3780,7 +3780,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (!blnMatch) sprintf(attr_content_str, "\n\nM=0000"); @@ -3800,7 +3800,7 @@ static int rtw_p2p_get_peer_wfd_port(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] p2p_state = %d\n", __FUNCTION__, rtw_p2p_state(pwdinfo) ); @@ -3820,7 +3820,7 @@ static int rtw_p2p_get_peer_wfd_preferred_connection(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; sprintf( extra, "\n\nwfd_pc=%d\n", pwdinfo->wfd_info->wfd_pc ); DBG_88E( "[%s] wfd_pc = %d\n", __FUNCTION__, pwdinfo->wfd_info->wfd_pc ); @@ -3839,7 +3839,7 @@ static int rtw_p2p_get_peer_wfd_session_available(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; sprintf( extra, "\n\nwfd_sa=%d\n", pwdinfo->wfd_info->peer_session_avail ); DBG_88E( "[%s] wfd_sa = %d\n", __FUNCTION__, pwdinfo->wfd_info->peer_session_avail ); @@ -3863,7 +3863,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 blnMatch = 0; u8 *p2pie; @@ -3879,7 +3879,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev, macstr2num(peerMAC, subcmd); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -3926,7 +3926,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (!blnMatch) { sprintf(go_devadd_str, "\n\ndev_add= NULL"); @@ -3953,7 +3953,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 blnMatch = 0; u8 dev_type[8] = { 0x00 }; @@ -3969,7 +3969,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, macstr2num(peerMAC, subcmd); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4006,7 +4006,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (!blnMatch) sprintf(dev_type_str, "\n\nN=00"); @@ -4028,7 +4028,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 blnMatch = 0; u8 dev_name[WPS_MAX_DEVICE_NAME_LEN] = { 0x00 }; @@ -4044,7 +4044,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev, macstr2num(peerMAC, subcmd); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4077,7 +4077,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (!blnMatch) sprintf(dev_name_str, "\n\nN=0000"); @@ -4099,7 +4099,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 blnMatch = 0; u8 *p2pie; @@ -4115,7 +4115,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, macstr2num(peerMAC, subcmd); - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4154,7 +4154,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if (!blnMatch) { sprintf(inv_proc_str, "\nIP=-1"); @@ -4178,14 +4178,14 @@ static int rtw_p2p_connect(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; u8 peerMAC[ ETH_ALEN ] = { 0x00 }; int jj,kk; u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 }; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; unsigned long irqL; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; uint uintPeerChannel = 0; @@ -4214,7 +4214,7 @@ static int rtw_p2p_connect(struct net_device *dev, peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4235,7 +4235,7 @@ static int rtw_p2p_connect(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if ( uintPeerChannel ) { memset( &pwdinfo->nego_req_info, 0x00, sizeof( struct tx_nego_req_info ) ); @@ -4274,12 +4274,12 @@ static int rtw_p2p_invite_req(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; int jj,kk; u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 }; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; uint uintPeerChannel = 0; u8 attr_content[50] = { 0x00 }, _status = 0; @@ -4329,7 +4329,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, pinvite_req_info->peer_macaddr[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4375,7 +4375,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); #ifdef CONFIG_P2P if ( uintPeerChannel ) @@ -4454,12 +4454,12 @@ static int rtw_p2p_set_persistent(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; int jj,kk; u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 }; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; uint uintPeerChannel = 0; u8 attr_content[50] = { 0x00 }, _status = 0; @@ -4565,7 +4565,7 @@ static int rtw_p2p_set_wps_uuid(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + struct wifidirect_info *pwdinfo = &padapter->wdinfo; DBG_88E("[%s] data = %s\n", __FUNCTION__, extra); @@ -4589,13 +4589,13 @@ static int rtw_p2p_set_pc(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; u8 peerMAC[ ETH_ALEN ] = { 0x00 }; int jj,kk; u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 }; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; u8 attr_content[50] = { 0x00 }, _status = 0; u8 *p2pie; @@ -4621,7 +4621,7 @@ static int rtw_p2p_set_pc(struct net_device *dev, peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -4669,7 +4669,7 @@ static int rtw_p2p_set_pc(struct net_device *dev, } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); printk( "[%s] channel = %d\n", __FUNCTION__, uintPeerChannel ); if ( uintPeerChannel ) @@ -4721,7 +4721,7 @@ static int rtw_p2p_set_wfd_device_type(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; struct wifi_display_info* pwfd_info = pwdinfo->wfd_info; /* Commented by Albert 20120328 */ @@ -4754,7 +4754,7 @@ static int rtw_p2p_set_scan_result_type(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; struct wifi_display_info *pwfd_info = pwdinfo->wfd_info; /* Commented by Albert 20120328 */ @@ -4799,7 +4799,7 @@ static int rtw_p2p_set_wfd_enable(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; if (*extra == '0' ) pwdinfo->wfd_info->wfd_enable = false; @@ -4820,7 +4820,7 @@ static int rtw_p2p_set_driver_iface(struct net_device *dev, /* This function is used to set driver iface is WEXT or CFG80211 */ int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; if (*extra == '1' ) { @@ -4846,7 +4846,7 @@ static int rtw_p2p_set_sa(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; struct wifi_display_info *pwfd_info = pwdinfo->wfd_info; DBG_88E( "[%s] data = %s\n", __FUNCTION__, extra ); @@ -4886,13 +4886,13 @@ static int rtw_p2p_prov_disc(struct net_device *dev, { int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; u8 peerMAC[ ETH_ALEN ] = { 0x00 }; int jj,kk; u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 }; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct list_head *plist, *phead; - struct __queue *queue = &(pmlmepriv->scanned_queue); + struct __queue *queue = &pmlmepriv->scanned_queue; struct wlan_network *pnetwork = NULL; uint uintPeerChannel = 0; u8 attr_content[100] = { 0x00 }, _status = 0; @@ -4954,7 +4954,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, return( ret ); } - spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_lock_bh(&pmlmepriv->scanned_queue.lock); phead = get_list_head(queue); plist = get_next(phead); @@ -5011,7 +5011,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, plist = get_next(plist); } - spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); + spin_unlock_bh(&pmlmepriv->scanned_queue.lock); if ( uintPeerChannel ) { @@ -5096,7 +5096,7 @@ static int rtw_p2p_got_wpsinfo(struct net_device *dev, int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); + struct wifidirect_info *pwdinfo = & padapter->wdinfo ; DBG_88E( "[%s] data = %s\n", __FUNCTION__, extra ); @@ -5142,9 +5142,9 @@ static int rtw_p2p_set(struct net_device *dev, #ifdef CONFIG_P2P struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; DBG_88E( "[%s] extra = %s\n", __FUNCTION__, extra ); @@ -5273,9 +5273,9 @@ static int rtw_p2p_get(struct net_device *dev, #ifdef CONFIG_P2P struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct iw_point *pdata = &wrqu->data; - struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + struct wifidirect_info *pwdinfo= &padapter->wdinfo; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; if ( padapter->bShowGetP2PState ) @@ -5534,11 +5534,11 @@ static int rtw_dbg_port(struct net_device *dev, u32 extra_arg, *pdata, val32; struct sta_info *psta; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct security_priv *psecuritypriv = &padapter->securitypriv; - struct wlan_network *cur_network = &(pmlmepriv->cur_network); + struct wlan_network *cur_network = &pmlmepriv->cur_network; struct sta_priv *pstapriv = &padapter->stapriv; @@ -5874,7 +5874,7 @@ static int rtw_dbg_port(struct net_device *dev, for (i=0; i< NUM_STA; i++) { - phead = &(pstapriv->sta_hash[i]); + phead = &pstapriv->sta_hash[i]; plist = get_next(phead); while ((rtw_end_of_queue_search(phead, plist)) == false) @@ -5933,7 +5933,7 @@ static int rtw_dbg_port(struct net_device *dev, for (i=0; i< NUM_STA; i++) { - phead = &(pstapriv->sta_hash[i]); + phead = &pstapriv->sta_hash[i]; plist = get_next(phead); while ((rtw_end_of_queue_search(phead, plist)) == false) @@ -5979,11 +5979,11 @@ static int rtw_dbg_port(struct net_device *dev, if (arg == 0) { DBG_88E("dump rx packet (%d)\n",extra_arg); /* pHalData->bDumpRxPkt =extra_arg; */ - rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_RXPKT, &(extra_arg)); + rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_RXPKT, &extra_arg); } else if (arg==1) { DBG_88E("dump tx packet (%d)\n",extra_arg); - rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(extra_arg)); + rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &extra_arg); } } break; @@ -6012,7 +6012,7 @@ static int rtw_dbg_port(struct net_device *dev, case 0x11: DBG_88E("turn %s Rx RSSI display function\n",(extra_arg==1)?"on":"off"); padapter->bRxRSSIDisplay = extra_arg; - rtw_hal_set_def_var(padapter, HW_DEF_FA_CNT_DUMP, &(padapter->bRxRSSIDisplay)); + rtw_hal_set_def_var(padapter, HW_DEF_FA_CNT_DUMP, &padapter->bRxRSSIDisplay); break; case 0x12: /* set rx_stbc */ { @@ -6064,7 +6064,7 @@ static int rtw_dbg_port(struct net_device *dev, #ifdef DBG_FIXED_CHAN case 0x17: { - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; printk("===> Fixed channel to %d\n",extra_arg); pmlmeext->fixed_chan = extra_arg; @@ -6133,7 +6133,7 @@ static int rtw_dbg_port(struct net_device *dev, extra_arg = 2 - disable tx power tracking extra_arg = 3 - turn on all dynamic func */ - rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DM_FUNC, &(extra_arg)); + rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DM_FUNC, &extra_arg); rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DM_FUNC,&odm_flag); DBG_88E(" === DMFlag(0x%08x) ===\n",odm_flag); } @@ -6385,7 +6385,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) u8 keylen; struct cmd_obj* pcmd; struct setkey_parm *psetkeyparm; - struct cmd_priv *pcmdpriv=&(padapter->cmdpriv); + struct cmd_priv *pcmdpriv=&padapter->cmdpriv; int res=_SUCCESS; DBG_88E("%s\n", __FUNCTION__); @@ -6426,7 +6426,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) keylen = 16; } - memcpy(&(psetkeyparm->key[0]), key, keylen); + memcpy(&psetkeyparm->key[0], key, keylen); pcmd->cmdcode = _SetKey_CMD_; pcmd->parmbuf = (u8 *)psetkeyparm; @@ -6475,7 +6475,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, struct sta_info *psta = NULL, *pbcmc_sta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct security_priv* psecuritypriv=&(padapter->securitypriv); + struct security_priv* psecuritypriv=&padapter->securitypriv; struct sta_priv *pstapriv = &padapter->stapriv; DBG_88E("%s\n", __FUNCTION__); @@ -6573,7 +6573,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&psecuritypriv->dot11DefKey[wep_key_idx].skey[0], pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx]=pwep->KeyLength; @@ -6584,7 +6584,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* don't update "psecuritypriv->dot11PrivacyAlgrthm" and */ /* psecuritypriv->dot11PrivacyKeyIndex=keyid", but can rtw_set_key to cam */ - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&psecuritypriv->dot11DefKey[wep_key_idx].skey[0], pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; @@ -6624,8 +6624,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[16], 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -6692,8 +6692,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8); - memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8); + memcpy(psta->dot11tkiptxmickey.skey, ¶m->u.crypt.key[16], 8); + memcpy(psta->dot11tkiprxmickey.skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -6737,8 +6737,8 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, /* DEBUG_ERR("set key length :param->u.crypt.key_len=%d\n", param->u.crypt.key_len); */ /* set mic key */ - memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8); - memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8); + memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[16], 8); + memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, ¶m->u.crypt.key[24], 8); psecuritypriv->busetkipkey = true; @@ -6790,7 +6790,7 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; unsigned char *pbuf = param->u.bcn_ie.buf; @@ -6837,7 +6837,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) int ret=0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; DBG_88E("rtw_add_sta(aid=%d)=" MAC_FMT "\n", param->u.add_sta.aid, MAC_ARG(param->sta_addr)); @@ -6904,7 +6904,7 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) int ret=0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; DBG_88E("rtw_del_sta=" MAC_FMT "\n", MAC_ARG(param->sta_addr)); @@ -6957,7 +6957,7 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par int ret=0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; struct ieee_param_ex *param_ex = (struct ieee_param_ex *)param; struct sta_data *psta_data = (struct sta_data *)param_ex->data; @@ -7016,7 +7016,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) int ret=0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct sta_priv *pstapriv = &padapter->stapriv; DBG_88E("rtw_get_sta_wpaie, sta_addr: " MAC_FMT "\n", MAC_ARG(param->sta_addr)); @@ -7069,9 +7069,9 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, int ret=0; unsigned char wps_oui[4]={0x0,0x50,0xf2,0x04}; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; int ie_len; DBG_88E("%s, len=%d\n", __FUNCTION__, len); @@ -7114,7 +7114,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ie_len; DBG_88E("%s, len=%d\n", __FUNCTION__, len); @@ -7151,7 +7151,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ie_len; DBG_88E("%s, len=%d\n", __FUNCTION__, len); @@ -7189,9 +7189,9 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, { int ret=0; struct adapter *adapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *mlmepriv = &(adapter->mlmepriv); - struct mlme_ext_priv *mlmeext = &(adapter->mlmeextpriv); - struct mlme_ext_info *mlmeinfo = &(mlmeext->mlmext_info); + struct mlme_priv *mlmepriv = &adapter->mlmepriv; + struct mlme_ext_priv *mlmeext = &adapter->mlmeextpriv; + struct mlme_ext_info *mlmeinfo = &mlmeext->mlmext_info; int ie_len; u8 *ssid_ie; char ssid[NDIS_802_11_LENGTH_SSID + 1]; @@ -7232,7 +7232,7 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; @@ -7254,7 +7254,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; @@ -7276,7 +7276,7 @@ static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param * { int ret=0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true) return -EINVAL; @@ -7484,7 +7484,7 @@ static int rtw_wx_set_priv(struct net_device *dev, if (dwrq->flags == 0x8766 && len > 8) { u32 cp_sz; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; u8 *probereq_wpsie = ext; int probereq_wpsie_len = len; u8 wps_oui[4]={0x0,0x50,0xf2,0x04}; @@ -7542,7 +7542,7 @@ static int rtw_wx_set_priv(struct net_device *dev, break; case ANDROID_WIFI_CMD_RSSI : { - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *pcur_network = &pmlmepriv->cur_network; if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 64705a8..dc78fd4 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -91,12 +91,12 @@ void rtw_init_mlme_timer(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) - _init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter); - _init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter); + _init_timer(&pmlmepriv->assoc_timer, padapter->pnetdev, rtw_join_timeout_handler, padapter); + _init_timer(&pmlmepriv->scan_to_timer, padapter->pnetdev, _rtw_scan_timeout_handler, padapter); - _init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter); + _init_timer(&pmlmepriv->dynamic_chk_timer, padapter->pnetdev, _dynamic_check_timer_handlder, padapter); - _init_timer(&(pmlmepriv->set_scan_deny_timer), padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter); + _init_timer(&pmlmepriv->set_scan_deny_timer, padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter); #else timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0); timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0); @@ -112,7 +112,7 @@ void rtw_init_mlme_timer(struct adapter *padapter) void rtw_os_indicate_connect(struct adapter *adapter) { - struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); + struct mlme_priv *pmlmepriv = &adapter->mlmepriv; ; if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) || diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 7d712fa..3ea9fbc 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -365,8 +365,8 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p) static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev); - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct recv_priv *precvpriv = &(padapter->recvpriv); + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; + struct recv_priv *precvpriv = &padapter->recvpriv; padapter->stats.tx_packets = pxmitpriv->tx_pkts;/* pxmitpriv->tx_pkts++; */ padapter->stats.rx_packets = precvpriv->rx_pkts;/* precvpriv->rx_pkts++; */ @@ -868,7 +868,7 @@ void rtw_cancel_all_timer(struct adapter *padapter) rtw_hal_sw_led_deinit(padapter); RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel DeInitSwLeds!\n")); - _cancel_timer_ex(&(adapter_to_pwrctl(padapter)->pwr_state_check_timer)); + _cancel_timer_ex(&adapter_to_pwrctl(padapter)->pwr_state_check_timer); #ifdef CONFIG_P2P _cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer); @@ -1178,9 +1178,9 @@ int netdev_open(struct net_device *pnetdev) int ret; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev); - _enter_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); + _enter_critical_mutex(&adapter_to_dvobj(padapter)->hw_init_mutex, NULL); ret = _netdev_open(pnetdev); - _exit_critical_mutex(&(adapter_to_dvobj(padapter)->hw_init_mutex), NULL); + _exit_critical_mutex(&adapter_to_dvobj(padapter)->hw_init_mutex, NULL); return ret; } @@ -1252,7 +1252,7 @@ void rtw_ips_pwr_down(struct adapter *padapter) void rtw_ips_dev_unload(struct adapter *padapter) { struct net_device *pnetdev= (struct net_device*)padapter->pnetdev; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); + struct xmit_priv *pxmitpriv = &padapter->xmitpriv; DBG_88E("====> %s...\n",__FUNCTION__); rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, NULL); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 63ae38a..e6cec97 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -206,10 +206,10 @@ int _rtw_mstat_dump(char *buf, int len) int tx_alloc, tx_peak, tx_alloc_err, rx_alloc, rx_peak, rx_alloc_err; for (i=0;iqueue)); + _rtw_init_listhead(&pqueue->queue); - spin_lock_init(&(pqueue->lock)); + spin_lock_init(&pqueue->lock); } u32 _rtw_queue_empty(struct __queue *pqueue) { - return (rtw_is_list_empty(&(pqueue->queue))); + return (rtw_is_list_empty(&pqueue->queue)); } diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index ee35089..0e2c905 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -201,8 +201,8 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame void *br_port = NULL; #endif - precvpriv = &(padapter->recvpriv); - pfree_recv_queue = &(precvpriv->free_recv_queue); + precvpriv = &padapter->recvpriv; + pfree_recv_queue = &precvpriv->free_recv_queue; #ifdef CONFIG_DRVEXT_MODULE if (drvext_rx_handler(padapter, precv_frame->u.hdr.rx_data, precv_frame->u.hdr.len) == _SUCCESS) @@ -415,7 +415,7 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) struct adapter *padapter = preorder_ctrl->padapter; - _init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl); + _init_timer(&preorder_ctrl->reordering_ctrl_timer, padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl); #else timer_setup(&preorder_ctrl->reordering_ctrl_timer, _rtw_reordering_ctrl_timeout_handler, 0); diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index 80f4e58..14f0510 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -242,7 +242,7 @@ int rtw_android_cmdstr_to_num(char *cmdstr) static int rtw_android_get_rssi(struct net_device *net, char *command, int total_len) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *pcur_network = &pmlmepriv->cur_network; int bytes_written = 0; @@ -257,7 +257,7 @@ static int rtw_android_get_rssi(struct net_device *net, char *command, int total static int rtw_android_get_link_speed(struct net_device *net, char *command, int total_len) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *pcur_network = &pmlmepriv->cur_network; int bytes_written = 0; u16 link_speed = 0; diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 968fb60..de9877e 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -344,7 +344,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) } /* 3 misc */ - _rtw_init_sema(&(pdvobjpriv->usb_suspend_sema), 0); + _rtw_init_sema(&pdvobjpriv->usb_suspend_sema, 0); rtw_reset_continual_io_error(pdvobjpriv); usb_get_dev(pusbd); @@ -723,8 +723,8 @@ int rtw_resume_process(struct adapter *padapter) #ifdef CONFIG_BT_COEXIST #ifdef CONFIG_AUTOSUSPEND #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,32)) - DBG_88E("%s...pm_usage_cnt(%d) pwrpriv->bAutoResume=%x. ....\n",__func__,atomic_read(&(adapter_to_dvobj(padapter)->pusbintf->pm_usage_cnt)),pwrpriv->bAutoResume); - pm_cnt=atomic_read(&(adapter_to_dvobj(padapter)->pusbintf->pm_usage_cnt)); + DBG_88E("%s...pm_usage_cnt(%d) pwrpriv->bAutoResume=%x. ....\n",__func__,atomic_read(&adapter_to_dvobj(padapter->pusbintf->pm_usage_cnt)),pwrpriv->bAutoResume); + pm_cnt=atomic_read(&adapter_to_dvobj(padapter->pusbintf->pm_usage_cnt)); #else DBG_88E("...pm_usage_cnt(%d).....\n", adapter_to_dvobj(padapter)->pusbintf->pm_usage_cnt); pm_cnt = adapter_to_dvobj(padapter)->pusbintf->pm_usage_cnt; @@ -838,7 +838,7 @@ void autosuspend_enter(struct adapter* padapter) #endif /* ifndef CONFIG_BT_COEXIST */ } #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,32)) - DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&(dvobj->pusbintf->pm_usage_cnt))); + DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&dvobj->pusbintf->pm_usage_cnt)); #else DBG_88E("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt); #endif @@ -848,9 +848,9 @@ int autoresume_enter(struct adapter* padapter) { int result = _SUCCESS; struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); - struct security_priv* psecuritypriv=&(padapter->securitypriv); + struct security_priv* psecuritypriv=&padapter->securitypriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); DBG_88E("====> autoresume_enter\n"); @@ -873,7 +873,7 @@ int autoresume_enter(struct adapter* padapter) #endif #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,32)) - DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&(dvobj->pusbintf->pm_usage_cnt))); + DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&dvobj->pusbintf->pm_usage_cnt)); #else DBG_88E("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt); #endif @@ -893,7 +893,7 @@ int autoresume_enter(struct adapter* padapter) usb_autoresume_device(dvobj->pusbdev, 1); #endif #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,32)) - DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&(dvobj->pusbintf->pm_usage_cnt))); + DBG_88E("...pm_usage_cnt(%d).....\n", atomic_read(&dvobj->pusbintf->pm_usage_cnt)); #else DBG_88E("...pm_usage_cnt(%d).....\n", dvobj->pusbintf->pm_usage_cnt); #endif @@ -1011,7 +1011,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, #endif #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,32)) - DBG_88E("%s...pm_usage_cnt(%d).....\n",__FUNCTION__,atomic_read(&(dvobj->pusbintf ->pm_usage_cnt))); + DBG_88E("%s...pm_usage_cnt(%d).....\n",__FUNCTION__,atomic_read(&dvobj->pusbintf ->pm_usage_cnt)); #else DBG_88E("%s...pm_usage_cnt(%d).....\n",__FUNCTION__,dvobj->pusbintf ->pm_usage_cnt); #endif