rtl8188eu: Remove dead code inside #if 0

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-28 20:00:11 -06:00
parent 2d60bad9ad
commit b6b121512b
56 changed files with 121 additions and 6115 deletions

View file

@ -407,45 +407,10 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
if(psr !=NULL)
*psr = 0; //clear sr
#if 0
WLAN_BSSID_EX *pselect_network = &pnetwork->network;
struct cfg80211_bss *pselect_bss = NULL;
struct ieee80211_channel *notify_channel = NULL;
u32 freq;
DBG_871X("%s, got sr, but ssid mismatch, to remove this bss\n", __func__);
if (pselect_network->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
else
freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
pselect_bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
pselect_network->MacAddress, pselect_network->Ssid.Ssid,
pselect_network->Ssid.SsidLength, 0/*WLAN_CAPABILITY_ESS*/,
0/*WLAN_CAPABILITY_ESS*/);
if(pselect_bss)
{
DBG_871X("%s, got bss for cfg80211 for unlinking bss\n", __func__);
cfg80211_unlink_bss(wiphy, pselect_bss);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, pselect_bss);
#else
cfg80211_put_bss(pselect_bss);
#endif
}
goto exit;
#endif
}
}
}
}
//_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
channel = pnetwork->network.Configuration.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
@ -455,7 +420,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
notify_channel = ieee80211_get_channel(wiphy, freq);
//rtw_get_timestampe_from_ie()
notify_timestamp = jiffies_to_msecs(jiffies)*1000; /* uSec */
notify_interval = le16_to_cpu(*(u16*)rtw_get_beacon_interval_from_ie(pnetwork->network.IEs));
@ -472,16 +436,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
} else {
notify_signal = 100*translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength);//dbm
}
#if 0
DBG_8192C("bssid: "MAC_FMT"\n", MAC_ARG(pnetwork->network.MacAddress));
DBG_8192C("Channel: %d(%d)\n", channel, freq);
DBG_8192C("Capability: %X\n", notify_capability);
DBG_8192C("Beacon interval: %d\n", notify_interval);
DBG_8192C("Signal: %d\n", notify_signal);
DBG_8192C("notify_timestamp: %#018llx\n", notify_timestamp);
#endif
pbuf = buf;
pwlanhdr = (struct rtw_ieee80211_hdr *)pbuf;
@ -1678,25 +1632,6 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
void (*callback)(void *cookie,
struct key_params*))
{
#if 0
struct iwm_priv *iwm = ndev_to_iwm(ndev);
struct iwm_key *key = &iwm->keys[key_index];
struct key_params params;
IWM_DBG_WEXT(iwm, DBG, "Getting key %d\n", key_index);
memset(&params, 0, sizeof(params));
params.cipher = key->cipher;
params.key_len = key->key_len;
params.seq_len = key->seq_len;
params.seq = key->seq;
params.key = key->key;
callback(cookie, &params);
return key->key_len ? 0 : -ENOENT;
#endif
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
return 0;
}
@ -2413,35 +2348,6 @@ exit:
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
if (changed & WIPHY_PARAM_RTS_THRESHOLD &&
(iwm->conf.rts_threshold != wiphy->rts_threshold)) {
int ret;
iwm->conf.rts_threshold = wiphy->rts_threshold;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_RTS_THRESHOLD,
iwm->conf.rts_threshold);
if (ret < 0)
return ret;
}
if (changed & WIPHY_PARAM_FRAG_THRESHOLD &&
(iwm->conf.frag_threshold != wiphy->frag_threshold)) {
int ret;
iwm->conf.frag_threshold = wiphy->frag_threshold;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_FA_CFG_FIX,
CFG_FRAG_THRESHOLD,
iwm->conf.frag_threshold);
if (ret < 0)
return ret;
}
#endif
DBG_8192C("%s\n", __func__);
return 0;
}
@ -2902,12 +2808,6 @@ exit:
static int cfg80211_rtw_leave_ibss(struct wiphy *wiphy, struct net_device *ndev)
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
if (iwm->umac_profile_active)
return iwm_invalidate_mlme_profile(iwm);
#endif
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
return 0;
}
@ -3201,32 +3101,6 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
enum tx_power_setting type, int dbm)
#endif
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
int ret;
switch (type) {
case NL80211_TX_POWER_AUTOMATIC:
return 0;
case NL80211_TX_POWER_FIXED:
if (mbm < 0 || (mbm % 100))
return -EOPNOTSUPP;
if (!test_bit(IWM_STATUS_READY, &iwm->status))
return 0;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_TX_PWR_LIMIT_USR,
MBM_TO_DBM(mbm) * 2);
if (ret < 0)
return ret;
return iwm_tx_power_trigger(iwm);
default:
IWM_ERR(iwm, "Unsupported power type: %d\n", type);
return -EOPNOTSUPP;
}
#endif
DBG_8192C("%s\n", __func__);
return 0;
}
@ -3237,8 +3111,6 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
#endif
int *dbm)
{
//struct adapter *padapter = wiphy_to_adapter(wiphy);
DBG_8192C("%s\n", __func__);
*dbm = (12);
@ -4749,18 +4621,6 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy,
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
}
#if 0
// Disable P2P Listen State
if(!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) && !rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
{
if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
{
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
_rtw_memset(pwdinfo, 0x00, sizeof(struct wifidirect_info));
}
}
else
#endif
{
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
#ifdef CONFIG_DEBUG_CFG80211

View file

@ -1110,21 +1110,6 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
goto exit;
}
#if 0
pos += RSN_HEADER_LEN;
left = ielen - RSN_HEADER_LEN;
if (left >= RSN_SELECTOR_LEN){
pos += RSN_SELECTOR_LEN;
left -= RSN_SELECTOR_LEN;
}
else if (left > 0){
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie length mismatch, %u too much \n", left));
ret =-1;
goto exit;
}
#endif
if(rtw_parse_wpa_ie(buf, ielen, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS)
{
padapter->securitypriv.dot11AuthAlgrthm= dot11AuthAlgrthm_8021X;
@ -1794,29 +1779,10 @@ static int rtw_wx_set_wap(struct net_device *dev,
phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead);
while (1)
{
while (1) {
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE)
{
#if 0
ret = -EINVAL;
goto exit;
if(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)
{
rtw_set_802_11_bssid(padapter, temp->sa_data);
goto exit;
}
else
{
ret = -EINVAL;
goto exit;
}
#endif
break;
}
pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
@ -1894,16 +1860,6 @@ static int rtw_wx_set_mlme(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
#if 0
/* SIOCSIWMLME data */
struct iw_mlme
{
__u16 cmd; /* IW_MLME_* */
__u16 reason_code;
struct sockaddr addr;
};
#endif
int ret=0;
__le16 reason;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
@ -2152,12 +2108,6 @@ _func_enter_;
//DBG_871X("WEXT_CSCAN_TYPE_SECTION\n");
pos+=1; len-=1;
break;
#if 0
case WEXT_CSCAN_NPROBE_SECTION:
DBG_871X("WEXT_CSCAN_NPROBE_SECTION\n");
break;
#endif
default:
//DBG_871X("Unknown CSCAN section %c\n", section);
len = 0; // stop parsing
@ -2463,24 +2413,8 @@ static int rtw_wx_set_essid(struct net_device *dev,
phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead);
while (1)
{
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE)
{
#if 0
if(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE)
{
rtw_set_802_11_ssid(padapter, &ndis_ssid);
goto exit;
}
else
{
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("rtw_wx_set_ssid(): scanned_queue is empty\n"));
ret = -EINVAL;
goto exit;
}
#endif
while (1) {
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE) {
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_warning_,
("rtw_wx_set_essid: scan_q is empty, set ssid to check if scanning again!\n"));
@ -2795,29 +2729,6 @@ static int rtw_wx_get_retry(struct net_device *dev,
}
#if 0
#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
/*
iwconfig wlan0 key on -> flags = 0x6001 -> maybe it means auto
iwconfig wlan0 key off -> flags = 0x8800
iwconfig wlan0 key open -> flags = 0x2800
iwconfig wlan0 key open 1234567890 -> flags = 0x2000
iwconfig wlan0 key restricted -> flags = 0x4800
iwconfig wlan0 key open [3] 1234567890 -> flags = 0x2003
iwconfig wlan0 key restricted [2] 1234567890 -> flags = 0x4002
iwconfig wlan0 key open [3] -> flags = 0x2803
iwconfig wlan0 key restricted [2] -> flags = 0x4802
*/
#endif
static int rtw_wx_set_enc(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *keybuf)
@ -3357,66 +3268,12 @@ static int rtw_wx_get_nick(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
//struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
//struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
//struct security_priv *psecuritypriv = &padapter->securitypriv;
if(extra)
{
if(extra) {
wrqu->data.length = 14;
wrqu->data.flags = 1;
_rtw_memcpy(extra, "<WIFI@REALTEK>", 14);
}
//rtw_signal_process(pid, SIGUSR1); //for test
//dump debug info here
/*
u32 dot11AuthAlgrthm; // 802.11 auth, could be open, shared, and 8021x
u32 dot11PrivacyAlgrthm; // This specify the privacy for shared auth. algorithm.
u32 dot118021XGrpPrivacy; // This specify the privacy algthm. used for Grp key
u32 ndisauthtype;
u32 ndisencryptstatus;
*/
//DBG_871X("auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
// psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm,
// psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus);
//DBG_871X("enc_alg=0x%x\n", psecuritypriv->dot11PrivacyAlgrthm);
//DBG_871X("auth_type=0x%x\n", psecuritypriv->ndisauthtype);
//DBG_871X("enc_type=0x%x\n", psecuritypriv->ndisencryptstatus);
#if 0
DBG_871X("dbg(0x210)=0x%x\n", rtw_read32(padapter, 0x210));
DBG_871X("dbg(0x608)=0x%x\n", rtw_read32(padapter, 0x608));
DBG_871X("dbg(0x280)=0x%x\n", rtw_read32(padapter, 0x280));
DBG_871X("dbg(0x284)=0x%x\n", rtw_read32(padapter, 0x284));
DBG_871X("dbg(0x288)=0x%x\n", rtw_read32(padapter, 0x288));
DBG_871X("dbg(0x664)=0x%x\n", rtw_read32(padapter, 0x664));
DBG_871X("\n");
DBG_871X("dbg(0x430)=0x%x\n", rtw_read32(padapter, 0x430));
DBG_871X("dbg(0x438)=0x%x\n", rtw_read32(padapter, 0x438));
DBG_871X("dbg(0x440)=0x%x\n", rtw_read32(padapter, 0x440));
DBG_871X("dbg(0x458)=0x%x\n", rtw_read32(padapter, 0x458));
DBG_871X("dbg(0x484)=0x%x\n", rtw_read32(padapter, 0x484));
DBG_871X("dbg(0x488)=0x%x\n", rtw_read32(padapter, 0x488));
DBG_871X("dbg(0x444)=0x%x\n", rtw_read32(padapter, 0x444));
DBG_871X("dbg(0x448)=0x%x\n", rtw_read32(padapter, 0x448));
DBG_871X("dbg(0x44c)=0x%x\n", rtw_read32(padapter, 0x44c));
DBG_871X("dbg(0x450)=0x%x\n", rtw_read32(padapter, 0x450));
#endif
return 0;
}
static int rtw_wx_read32(struct net_device *dev,
@ -3576,15 +3433,9 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
extern int rtw_channel_plan;
u8 channel_plan_req = (u8) (*((int *)wrqu));
#if 0
rtw_channel_plan = (int)wrqu->data.pointer;
pregistrypriv->channel_plan = rtw_channel_plan;
pmlmepriv->ChannelPlan = pregistrypriv->channel_plan;
#endif
if( _SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1) ) {
if( _SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1) )
DBG_871X("%s set channel_plan = 0x%02X\n", __func__, pmlmepriv->ChannelPlan);
} else
else
return -EPERM;
return 0;
@ -3644,16 +3495,6 @@ typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info,
static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
#if 0
struct iw_point
{
void __user *pointer; /* Pointer to the data (in user space) */
__u16 length; /* number of fields or size in bytes */
__u16 flags; /* Optional params */
};
#endif
#ifdef CONFIG_DRVEXT_MODULE
u8 res;
struct drvext_handler *phandler;
@ -7081,17 +6922,6 @@ static int rtw_dbg_port(struct net_device *dev,
}
}
break;
#if 0
case 0x0d://dump cam
{
//u8 entry = (u8) extra_arg;
u8 entry=0;
//dump cam
for(entry=0;entry<32;entry++)
read_cam(padapter,entry);
}
break;
#endif
#ifdef DBG_CONFIG_ERROR_DETECT
case 0x0f:
{
@ -7336,7 +7166,6 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
break;
case IEEE_PARAM_DROP_UNENCRYPTED:
{
/* HACK:
*
* wpa_supplicant calls set_wpa_enabled when the driver
@ -7349,73 +7178,21 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
* be set.
*/
#if 0
struct ieee80211_security sec = {
.flags = SEC_ENABLED,
.enabled = value,
};
ieee->drop_unencrypted = value;
/* We only change SEC_LEVEL for open mode. Others
* are set by ipw_wpa_set_encryption.
*/
if (!value) {
sec.flags |= SEC_LEVEL;
sec.level = SEC_LEVEL_0;
}
else {
sec.flags |= SEC_LEVEL;
sec.level = SEC_LEVEL_1;
}
if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
#endif
break;
}
case IEEE_PARAM_PRIVACY_INVOKED:
//ieee->privacy_invoked=value;
break;
case IEEE_PARAM_AUTH_ALGS:
ret = wpa_set_auth_algs(dev, value);
break;
case IEEE_PARAM_IEEE_802_1X:
//ieee->ieee802_1x=value;
break;
case IEEE_PARAM_WPAX_SELECT:
// added for WPA2 mixed mode
//DBG_871X(KERN_WARNING "------------------------>wpax value = %x\n", value);
/*
spin_lock_irqsave(&ieee->wpax_suitlist_lock,flags);
ieee->wpax_type_set = 1;
ieee->wpax_type_notify = value;
spin_unlock_irqrestore(&ieee->wpax_suitlist_lock,flags);
*/
break;
default:
ret = -EOPNOTSUPP;
break;
}
return ret;
}
static int wpa_mlme(struct net_device *dev, u32 command, u32 reason)
@ -8188,42 +7965,15 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par
psta = rtw_get_stainfo(pstapriv, param_ex->sta_addr);
if(psta)
{
#if 0
struct {
u16 aid;
u16 capability;
int flags;
u32 sta_set;
u8 tx_supp_rates[16];
u32 tx_supp_rates_len;
struct rtw_ieee80211_ht_cap ht_cap;
u64 rx_pkts;
u64 rx_bytes;
u64 rx_drops;
u64 tx_pkts;
u64 tx_bytes;
u64 tx_drops;
} get_sta;
#endif
psta_data->aid = (u16)psta->aid;
psta_data->capability = psta->capability;
psta_data->flags = psta->flags;
/*
nonerp_set : BIT(0)
no_short_slot_time_set : BIT(1)
no_short_preamble_set : BIT(2)
no_ht_gf_set : BIT(3)
no_ht_set : BIT(4)
ht_20mhz_set : BIT(5)
*/
psta_data->sta_set =((psta->nonerp_set) |
(psta->no_short_slot_time_set <<1) |
(psta->no_short_preamble_set <<2) |
(psta->no_ht_gf_set <<3) |
(psta->no_ht_set <<4) |
(psta->ht_20mhz_set <<5));
(psta->no_short_slot_time_set <<1) |
(psta->no_short_preamble_set <<2) |
(psta->no_ht_gf_set <<3) |
(psta->no_ht_set <<4) |
(psta->ht_20mhz_set <<5));
psta_data->tx_supp_rates_len = psta->bssratelen;
_rtw_memcpy(psta_data->tx_supp_rates, psta->bssrateset, psta->bssratelen);
@ -10757,10 +10507,6 @@ static s32 createpseudoadhoc(struct adapter *padapter)
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
_exit_critical_bh(&pmlmepriv->lock, &irqL);
#if 0
err = rtw_createbss_cmd(padapter);
if (err == _FAIL) return _FAIL;
#else
{
struct wlan_network *pcur_network;
struct sta_info *psta;
@ -10779,11 +10525,6 @@ static s32 createpseudoadhoc(struct adapter *padapter)
pcur_network->join_res = 1;
pcur_network->aid = psta->aid = 1;
_rtw_memcpy(&pcur_network->network, pdev_network, get_WLAN_BSSID_EX_sz(pdev_network));
// set msr to WIFI_FW_ADHOC_STATE
#if 0
Set_NETYPE0_MSR(padapter, WIFI_FW_ADHOC_STATE);
#else
{
u8 val8;
@ -10792,9 +10533,7 @@ static s32 createpseudoadhoc(struct adapter *padapter)
val8 |= WIFI_FW_ADHOC_STATE & 0x3;
rtw_write8(padapter, MSR, val8);
}
#endif
}
#endif
return _SUCCESS;
}
@ -10948,11 +10687,6 @@ static void printdata(u8 *pbuf, u32 len)
for (; i < len, i++)
printk("%02X", pbuf+i);
#else // CONFIG_LITTLE_ENDIAN
#if 0
val = 0;
_rtw_memcpy(&val, pbuf + i, len - i);
printk("%8X", val);
#else
u8 str[9];
u8 n;
val = 0;
@ -10961,7 +10695,6 @@ static void printdata(u8 *pbuf, u32 len)
sprintf(str, "%08X", val);
n = (4 - n) * 2;
printk("%8s", str+n);
#endif
#endif // CONFIG_LITTLE_ENDIAN
}
printk("\n");

View file

@ -257,29 +257,12 @@ int _rtw_mstat_dump(char *buf, int len)
value_t[2][i] = ATOMIC_READ(&(rtw_mem_type_stat[i].alloc_cnt));
value_t[3][i] = ATOMIC_READ(&(rtw_mem_type_stat[i].alloc_err_cnt));
}
#if 0
for(i=0;i<mstat_ff_idx(MSTAT_FUNC_MAX);i++) {
value_f[0][i] = ATOMIC_READ(&(rtw_mem_func_stat[i].alloc));
value_f[1][i] = ATOMIC_READ(&(rtw_mem_func_stat[i].peak));
value_f[2][i] = ATOMIC_READ(&(rtw_mem_func_stat[i].alloc_cnt));
value_f[3][i] = ATOMIC_READ(&(rtw_mem_func_stat[i].alloc_err_cnt));
}
#endif
cnt += snprintf(buf+cnt, len-cnt, "===================== MSTAT =====================\n");
cnt += snprintf(buf+cnt, len-cnt, "%4s %10s %10s %10s %10s\n", "TAG", "alloc", "peak", "aloc_cnt", "err_cnt");
cnt += snprintf(buf+cnt, len-cnt, "-------------------------------------------------\n");
for(i=0;i<mstat_tf_idx(MSTAT_TYPE_MAX);i++) {
cnt += snprintf(buf+cnt, len-cnt, "%4s %10d %10d %10d %10d\n", MSTAT_TYPE_str[i], value_t[0][i], value_t[1][i], value_t[2][i], value_t[3][i]);
}
#if 0
cnt += snprintf(buf+cnt, len-cnt, "-------------------------------------------------\n");
for(i=0;i<mstat_ff_idx(MSTAT_FUNC_MAX);i++) {
cnt += snprintf(buf+cnt, len-cnt, "%4s %10d %10d %10d %10d\n", MSTAT_FUNC_str[i], value_f[0][i], value_f[1][i], value_f[2][i], value_f[3][i]);
}
#endif
return cnt;
}

View file

@ -447,22 +447,10 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
/* TBD: BTCOEXSCAN-STOP */
break;
case ANDROID_WIFI_CMD_BTCOEXMODE:
#if 0
uint mode = *(command + strlen(CMD_BTCOEXMODE) + 1) - '0';
if (mode == 1)
net_os_set_packet_filter(net, 0); /* DHCP starts */
else
net_os_set_packet_filter(net, 1); /* DHCP ends */
#ifdef WL_CFG80211
bytes_written = wl_cfg80211_set_btcoex_dhcp(net, command);
#endif
#endif
break;
case ANDROID_WIFI_CMD_SETSUSPENDOPT:
//bytes_written = wl_android_set_suspendopt(net, command, priv_cmd.total_len);
break;
case ANDROID_WIFI_CMD_SETBAND:
{
uint band = *(command + strlen("SETBAND") + 1) - '0';

View file

@ -302,88 +302,33 @@ _func_enter_;
pdev_desc = &pusbd->descriptor;
#if 0
DBG_871X("\n8712_usb_device_descriptor:\n");
DBG_871X("bLength=%x\n", pdev_desc->bLength);
DBG_871X("bDescriptorType=%x\n", pdev_desc->bDescriptorType);
DBG_871X("bcdUSB=%x\n", pdev_desc->bcdUSB);
DBG_871X("bDeviceClass=%x\n", pdev_desc->bDeviceClass);
DBG_871X("bDeviceSubClass=%x\n", pdev_desc->bDeviceSubClass);
DBG_871X("bDeviceProtocol=%x\n", pdev_desc->bDeviceProtocol);
DBG_871X("bMaxPacketSize0=%x\n", pdev_desc->bMaxPacketSize0);
DBG_871X("idVendor=%x\n", pdev_desc->idVendor);
DBG_871X("idProduct=%x\n", pdev_desc->idProduct);
DBG_871X("bcdDevice=%x\n", pdev_desc->bcdDevice);
DBG_871X("iManufacturer=%x\n", pdev_desc->iManufacturer);
DBG_871X("iProduct=%x\n", pdev_desc->iProduct);
DBG_871X("iSerialNumber=%x\n", pdev_desc->iSerialNumber);
DBG_871X("bNumConfigurations=%x\n", pdev_desc->bNumConfigurations);
#endif
phost_conf = pusbd->actconfig;
pconf_desc = &phost_conf->desc;
#if 0
DBG_871X("\n8712_usb_configuration_descriptor:\n");
DBG_871X("bLength=%x\n", pconf_desc->bLength);
DBG_871X("bDescriptorType=%x\n", pconf_desc->bDescriptorType);
DBG_871X("wTotalLength=%x\n", pconf_desc->wTotalLength);
DBG_871X("bNumInterfaces=%x\n", pconf_desc->bNumInterfaces);
DBG_871X("bConfigurationValue=%x\n", pconf_desc->bConfigurationValue);
DBG_871X("iConfiguration=%x\n", pconf_desc->iConfiguration);
DBG_871X("bmAttributes=%x\n", pconf_desc->bmAttributes);
DBG_871X("bMaxPower=%x\n", pconf_desc->bMaxPower);
#endif
//DBG_871X("\n/****** num of altsetting = (%d) ******/\n", pusb_interface->num_altsetting);
phost_iface = &usb_intf->altsetting[0];
piface_desc = &phost_iface->desc;
#if 0
DBG_871X("\n8712_usb_interface_descriptor:\n");
DBG_871X("bLength=%x\n", piface_desc->bLength);
DBG_871X("bDescriptorType=%x\n", piface_desc->bDescriptorType);
DBG_871X("bInterfaceNumber=%x\n", piface_desc->bInterfaceNumber);
DBG_871X("bAlternateSetting=%x\n", piface_desc->bAlternateSetting);
DBG_871X("bNumEndpoints=%x\n", piface_desc->bNumEndpoints);
DBG_871X("bInterfaceClass=%x\n", piface_desc->bInterfaceClass);
DBG_871X("bInterfaceSubClass=%x\n", piface_desc->bInterfaceSubClass);
DBG_871X("bInterfaceProtocol=%x\n", piface_desc->bInterfaceProtocol);
DBG_871X("iInterface=%x\n", piface_desc->iInterface);
#endif
pdvobjpriv->NumInterfaces = pconf_desc->bNumInterfaces;
pdvobjpriv->InterfaceNumber = piface_desc->bInterfaceNumber;
pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints;
//DBG_871X("\ndump usb_endpoint_descriptor:\n");
for (i = 0; i < pdvobjpriv->nr_endpoint; i++)
{
for (i = 0; i < pdvobjpriv->nr_endpoint; i++) {
phost_endp = phost_iface->endpoint + i;
if (phost_endp)
{
if (phost_endp) {
pendp_desc = &phost_endp->desc;
DBG_871X("\nusb_endpoint_descriptor(%d):\n", i);
DBG_871X("bLength=%x\n",pendp_desc->bLength);
DBG_871X("bDescriptorType=%x\n",pendp_desc->bDescriptorType);
DBG_871X("bEndpointAddress=%x\n",pendp_desc->bEndpointAddress);
//DBG_871X("bmAttributes=%x\n",pendp_desc->bmAttributes);
DBG_871X("wMaxPacketSize=%d\n",le16_to_cpu(pendp_desc->wMaxPacketSize));
DBG_871X("bInterval=%x\n",pendp_desc->bInterval);
//DBG_871X("bRefresh=%x\n",pendp_desc->bRefresh);
//DBG_871X("bSynchAddress=%x\n",pendp_desc->bSynchAddress);
if (RT_usb_endpoint_is_bulk_in(pendp_desc))
{
if (RT_usb_endpoint_is_bulk_in(pendp_desc)) {
DBG_871X("RT_usb_endpoint_is_bulk_in = %x\n", RT_usb_endpoint_num(pendp_desc));
pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc);
pdvobjpriv->RtNumInPipes++;
}
else if (RT_usb_endpoint_is_int_in(pendp_desc))
{
} else if (RT_usb_endpoint_is_int_in(pendp_desc)) {
DBG_871X("RT_usb_endpoint_is_int_in = %x, Interval = %x\n", RT_usb_endpoint_num(pendp_desc),pendp_desc->bInterval);
pdvobjpriv->RtInPipe[pdvobjpriv->RtNumInPipes] = RT_usb_endpoint_num(pendp_desc);
pdvobjpriv->RtNumInPipes++;

View file

@ -558,25 +558,6 @@ _func_enter_;
purb = pxmitbuf->pxmit_urb[0];
#if 0
if(pdvobj->ishighspeed)
{
if(cnt> 0 && cnt%512 == 0)
{
//DBG_8192C("ishighspeed, cnt=%d\n", cnt);
bwritezero = _TRUE;
}
}
else
{
if(cnt > 0 && cnt%64 == 0)
{
//DBG_8192C("cnt=%d\n", cnt);
bwritezero = _TRUE;
}
}
#endif
//translate DMA FIFO addr to pipehandle
pipe = ffaddr2pipehdl(pdvobj, addr);
@ -604,13 +585,6 @@ _func_enter_;
purb->transfer_flags |= URB_ZERO_PACKET;
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
#if 0
if (bwritezero)
{
purb->transfer_flags |= URB_ZERO_PACKET;
}
#endif
status = usb_submit_urb(purb, GFP_ATOMIC);
if (!status) {
#ifdef DBG_CONFIG_ERROR_DETECT