mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove conditional #if 1
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
f0050d3365
commit
c25b5250a8
27 changed files with 2 additions and 373 deletions
|
@ -500,16 +500,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||
RTW_INFO("%s, got p2p_ie\n", __func__);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
bss = cfg80211_inform_bss_frame(wiphy, notify_channel, (struct ieee80211_mgmt *)pbuf,
|
||||
len, notify_signal, GFP_ATOMIC);
|
||||
#else
|
||||
|
||||
bss = cfg80211_inform_bss(wiphy, notify_channel, (const u8 *)pnetwork->network.MacAddress,
|
||||
notify_timestamp, notify_capability, notify_interval, notify_ie,
|
||||
notify_ielen, notify_signal, GFP_ATOMIC/*GFP_KERNEL*/);
|
||||
#endif
|
||||
|
||||
if (unlikely(!bss)) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" bss NULL\n", FUNC_ADPT_ARG(padapter));
|
||||
goto exit;
|
||||
|
@ -5866,7 +5858,6 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
|
|||
_rtw_memcpy(txmgmt.buf, (void *)buf, txmgmt.len);
|
||||
|
||||
/* Debug purpose */
|
||||
#if 1
|
||||
RTW_INFO("%s %d\n", __func__, __LINE__);
|
||||
RTW_INFO("peer:"MAC_FMT", action code:%d, dialog:%d, status code:%d\n",
|
||||
MAC_ARG(txmgmt.peer), txmgmt.action_code,
|
||||
|
@ -5877,7 +5868,6 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
|
|||
printk("%02x ", *(txmgmt.buf + i));
|
||||
RTW_INFO("len:%d\n", (u32)txmgmt.len);
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (txmgmt.action_code) {
|
||||
case TDLS_SETUP_REQUEST:
|
||||
|
|
|
@ -2158,7 +2158,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#if 1 /* Wireless Extension use EAGAIN to try */
|
||||
wait_status = _FW_UNDER_SURVEY
|
||||
#ifndef CONFIG_ANDROID
|
||||
| _FW_UNDER_LINKING
|
||||
|
@ -2167,20 +2166,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
|
||||
while (check_fwstate(pmlmepriv, wait_status) == _TRUE)
|
||||
return -EAGAIN;
|
||||
#else
|
||||
wait_status = _FW_UNDER_SURVEY
|
||||
#ifndef CONFIG_ANDROID
|
||||
| _FW_UNDER_LINKING
|
||||
#endif
|
||||
;
|
||||
|
||||
while (check_fwstate(pmlmepriv, wait_status) == _TRUE) {
|
||||
rtw_msleep_os(30);
|
||||
cnt++;
|
||||
if (cnt > wait_for_surveydone)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
|
@ -9338,7 +9323,6 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
printk("\n");
|
||||
}
|
||||
printk("\n");
|
||||
#if 1
|
||||
err = -EFAULT;
|
||||
RTW_INFO("%s: rtw_BT_efuse_map_read _rtw_memcmp\n", __func__);
|
||||
if ((rtw_BT_efuse_map_read(padapter, 0x00, EFUSE_BT_MAX_MAP_LEN, pEfuseHal->fakeBTEfuseInitMap) == _SUCCESS)) {
|
||||
|
@ -9370,8 +9354,6 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} else if (strcmp(tmp[0], "wlfk2map") == 0) {
|
||||
*extra = 0;
|
||||
|
||||
|
@ -10816,11 +10798,9 @@ static int rtw_tdls_get_best_ch(struct net_device *dev,
|
|||
best_channel_5G = pmlmeext->channel_set[i].ChannelNum;
|
||||
}
|
||||
}
|
||||
#if 1 /* debug */
|
||||
RTW_INFO("The rx cnt of channel %3d = %d\n",
|
||||
pmlmeext->channel_set[i].ChannelNum,
|
||||
pmlmeext->channel_set[i].rx_count);
|
||||
#endif
|
||||
}
|
||||
|
||||
sprintf(extra, "\nbest_channel_24G = %d\n", best_channel_24G);
|
||||
|
|
|
@ -3613,7 +3613,6 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
clr_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
}
|
||||
|
||||
#if 1
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED)) {
|
||||
ch = rtw_mi_get_union_chan(padapter);
|
||||
bw = rtw_mi_get_union_bw(padapter);
|
||||
|
@ -3622,14 +3621,6 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
FUNC_ADPT_ARG(padapter), ch, bw, offset);
|
||||
set_channel_bwmode(padapter, ch, offset, bw);
|
||||
}
|
||||
#else
|
||||
if (rtw_mi_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" back to linked/linking union - ch:%u, bw:%u, offset:%u\n",
|
||||
FUNC_ADPT_ARG(padapter), ch, bw, offset);
|
||||
set_channel_bwmode(padapter, ch, offset, bw);
|
||||
rtw_mi_update_union_chan_inf(padapter, ch, offset, bw);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_mi_buddy_suspend_free_assoc_resource(padapter);
|
||||
|
@ -3707,7 +3698,6 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam);
|
||||
|
||||
RTW_INFO("%s: wowmode suspending\n", __func__);
|
||||
#if 1
|
||||
if (rtw_mi_check_status(padapter, MI_LINKED)) {
|
||||
ch = rtw_mi_get_union_chan(padapter);
|
||||
bw = rtw_mi_get_union_bw(padapter);
|
||||
|
@ -3715,14 +3705,6 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
RTW_INFO("back to linked/linking union - ch:%u, bw:%u, offset:%u\n", ch, bw, offset);
|
||||
set_channel_bwmode(padapter, ch, offset, bw);
|
||||
}
|
||||
#else
|
||||
if (rtw_mi_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
|
||||
RTW_INFO("back to linked/linking union - ch:%u, bw:%u, offset:%u\n", ch, bw, offset);
|
||||
set_channel_bwmode(padapter, ch, offset, bw);
|
||||
rtw_mi_update_union_chan_inf(padapter, ch, offset, bw);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*FOR ONE AP - TODO :Multi-AP*/
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -32,21 +32,12 @@ int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pclonef
|
|||
RTW_INFO("%s [WARN] skb == NULL, drop frag frame\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
#if 1
|
||||
pkt_copy = rtw_skb_copy(pskb);
|
||||
|
||||
if (pkt_copy == NULL) {
|
||||
RTW_INFO("%s [WARN] rtw_skb_copy fail , drop frag frame\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
#else
|
||||
pkt_copy = rtw_skb_clone(pskb);
|
||||
|
||||
if (pkt_copy == NULL) {
|
||||
RTW_INFO("%s [WARN] rtw_skb_clone fail , drop frag frame\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
#endif
|
||||
pkt_copy->dev = padapter->pnetdev;
|
||||
|
||||
pcloneframe->u.hdr.pkt = pkt_copy;
|
||||
|
@ -453,12 +444,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
|||
/* DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n"); */
|
||||
/* return FAIL; */
|
||||
|
||||
#if 1
|
||||
/* bypass this frame to upper layer!! */
|
||||
#else
|
||||
rtw_skb_free(sub_skb);
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BR_EXT */
|
||||
|
@ -728,21 +714,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
|
|||
RTW_INFO("recv eapol packet\n");
|
||||
|
||||
#ifdef CONFIG_AUTO_AP_MODE
|
||||
#if 1 /* for testing */
|
||||
#if 1
|
||||
if (0x8899 == pattrib->eth_type) {
|
||||
rtw_os_ksocket_send(padapter, precv_frame);
|
||||
|
||||
/* goto _recv_indicatepkt_drop; */
|
||||
}
|
||||
#else
|
||||
if (0x8899 == pattrib->eth_type) {
|
||||
rtw_auto_ap_mode_rx(padapter, precv_frame);
|
||||
|
||||
goto _recv_indicatepkt_end;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* CONFIG_AUTO_AP_MODE */
|
||||
|
||||
/* TODO: move to core */
|
||||
|
|
|
@ -86,13 +86,7 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib)
|
|||
/* skb_checksum_help(skb); */
|
||||
} else if (ip->protocol == IPPROTO_UDP) {
|
||||
/* RTW_INFO("CHECKSUM_PARTIAL UDP\n"); */
|
||||
#if 1
|
||||
skb_checksum_help(skb);
|
||||
#else
|
||||
/* Set UDP checksum = 0 to skip checksum check */
|
||||
struct udphdr *udp = skb_transport_header(skb);
|
||||
udp->check = 0;
|
||||
#endif
|
||||
} else {
|
||||
RTW_INFO("%s-%d TCP CSUM offload Error!!\n", __func__, __LINE__);
|
||||
WARN_ON(1); /* we need a WARN() */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue