mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove dead code inside #if 0 ... #endif
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3ad757d04a
commit
77e736c66a
64 changed files with 98 additions and 7692 deletions
|
@ -1397,25 +1397,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(¶ms, 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, ¶ms);
|
||||
|
||||
return key->key_len ? 0 : -ENOENT;
|
||||
#endif
|
||||
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
return 0;
|
||||
}
|
||||
|
@ -2079,35 +2060,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;
|
||||
}
|
||||
|
@ -2115,38 +2067,12 @@ static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
|||
static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_ibss_params *params)
|
||||
{
|
||||
#if 0
|
||||
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
|
||||
struct ieee80211_channel *chan = params->channel;
|
||||
|
||||
if (!test_bit(IWM_STATUS_READY, &iwm->status))
|
||||
return -EIO;
|
||||
|
||||
/* UMAC doesn't support creating or joining an IBSS network
|
||||
* with specified bssid. */
|
||||
if (params->bssid)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
iwm->channel = ieee80211_frequency_to_channel(chan->center_freq);
|
||||
iwm->umac_profile->ibss.band = chan->band;
|
||||
iwm->umac_profile->ibss.channel = iwm->channel;
|
||||
iwm->umac_profile->ssid.ssid_len = params->ssid_len;
|
||||
memcpy(iwm->umac_profile->ssid.ssid, params->ssid, params->ssid_len);
|
||||
|
||||
return iwm_send_mlme_profile(iwm);
|
||||
#endif
|
||||
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
return 0;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -2166,12 +2092,6 @@ static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, u32
|
|||
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPAPSK;
|
||||
}
|
||||
|
||||
/*
|
||||
if (wpa_version & NL80211_WPA_VERSION_2)
|
||||
{
|
||||
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPA2PSK;
|
||||
}
|
||||
*/
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -2876,40 +2796,12 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
|
|||
enum tx_power_setting type, int dbm)
|
||||
#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
||||
{
|
||||
#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;
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_get_txpower(struct wiphy *wiphy, int *dbm)
|
||||
{
|
||||
//_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
|
||||
DBG_8192C("%s\n", __func__);
|
||||
|
||||
*dbm = (12);
|
||||
|
@ -4351,22 +4243,6 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
|||
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))
|
||||
{
|
||||
_cancel_timer_ex( &pwdinfo->find_phase_timer );
|
||||
_cancel_timer_ex( &pwdinfo->restore_p2p_state_timer );
|
||||
_cancel_timer_ex( &pwdinfo->pre_tx_scan_timer);
|
||||
|
||||
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
|
||||
|
|
|
@ -1089,21 +1089,6 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
|||
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;
|
||||
|
@ -1756,29 +1741,9 @@ 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);
|
||||
|
||||
|
@ -1856,16 +1821,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;
|
||||
u16 reason;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
@ -2136,17 +2091,9 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
//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
|
||||
}
|
||||
//DBG_871X("len:%d\n", len);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2442,24 +2389,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"));
|
||||
|
||||
|
@ -2774,29 +2705,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)
|
||||
|
@ -3341,52 +3249,7 @@ static int rtw_wx_get_nick(struct net_device *dev,
|
|||
//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,
|
||||
|
@ -3546,12 +3409,6 @@ 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)) {
|
||||
DBG_871X("%s set channel_plan = 0x%02X\n", __func__, pmlmepriv->ChannelPlan);
|
||||
} else
|
||||
|
@ -3615,15 +3472,6 @@ 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;
|
||||
|
@ -6984,17 +6832,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:
|
||||
{
|
||||
|
@ -7251,26 +7088,6 @@ 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;
|
||||
|
||||
}
|
||||
|
@ -8089,23 +7906,6 @@ 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;
|
||||
|
@ -12008,10 +11808,6 @@ static s32 createpseudoadhoc(PADAPTER 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;
|
||||
|
@ -12032,9 +11828,6 @@ static s32 createpseudoadhoc(PADAPTER padapter)
|
|||
_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;
|
||||
|
||||
|
@ -12043,9 +11836,7 @@ static s32 createpseudoadhoc(PADAPTER padapter)
|
|||
val8 |= WIFI_FW_ADHOC_STATE & 0x3;
|
||||
rtw_write8(padapter, MSR, val8);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -12512,33 +12303,6 @@ static int rtw_test(
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8723A
|
||||
#if 0
|
||||
if (strcmp(pch, "poweron") == 0)
|
||||
{
|
||||
s32 ret;
|
||||
|
||||
ret = _InitPowerOn(padapter);
|
||||
DBG_871X("%s: power on %s\n", __func__, (_FAIL==ret) ? "FAIL!":"OK.");
|
||||
sprintf(extra, "Power ON %s", (_FAIL==ret) ? "FAIL!":"OK.");
|
||||
wrqu->data.length = strlen(extra) + 1;
|
||||
|
||||
rtw_mfree(pbuf, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(pch, "dlfw") == 0)
|
||||
{
|
||||
s32 ret;
|
||||
|
||||
ret = rtl8723a_FirmwareDownload(padapter);
|
||||
DBG_871X("%s: download FW %s\n", __func__, (_FAIL==ret) ? "FAIL!":"OK.");
|
||||
sprintf(extra, "download FW %s", (_FAIL==ret) ? "FAIL!":"OK.");
|
||||
wrqu->data.length = strlen(extra) + 1;
|
||||
|
||||
rtw_mfree(pbuf, len);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#define GET_BT_INFO(padapter) (&GET_HAL_DATA(padapter)->BtInfo)
|
||||
|
@ -12684,71 +12448,6 @@ static iw_handler rtw_handlers[] =
|
|||
NULL, /*---hole---*/
|
||||
};
|
||||
|
||||
#if 0
|
||||
//defined(CONFIG_MP_INCLUDED) && defined(CONFIG_MP_IWPRIV_SUPPORT)
|
||||
|
||||
static const struct iw_priv_args rtw_private_args[] =
|
||||
{
|
||||
{ SIOCIWFIRSTPRIV + 0x00, IW_PRIV_TYPE_CHAR | 1024, 0 , ""}, //set
|
||||
{ SIOCIWFIRSTPRIV + 0x01, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , ""},//get
|
||||
/* --- sub-ioctls definitions --- */
|
||||
{ MP_START , IW_PRIV_TYPE_CHAR | 1024, 0, "mp_start" }, //set
|
||||
{ MP_PHYPARA, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_phypara" },//get
|
||||
{ MP_STOP , IW_PRIV_TYPE_CHAR | 1024, 0, "mp_stop" }, //set
|
||||
{ MP_CHANNEL , IW_PRIV_TYPE_CHAR | 1024 , IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_channel" },//get
|
||||
{ MP_BANDWIDTH , IW_PRIV_TYPE_CHAR | 1024, 0, "mp_bandwidth"}, //set
|
||||
{ MP_RATE , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_rate" },//get
|
||||
{ MP_RESET_STATS , IW_PRIV_TYPE_CHAR | 1024, 0, "mp_reset_stats"},
|
||||
{ MP_QUERY , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , "mp_query"}, //get
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ READ_REG , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "read_reg" },
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_RATE , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_rate" },
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ READ_RF , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "read_rf" },
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_PSD , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_psd"},
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_DUMP, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_dump" },
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_TXPOWER , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_txpower"},
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_ANT_TX , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_ant_tx"},
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_ANT_RX , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_ant_rx"},
|
||||
{ WRITE_REG, IW_PRIV_TYPE_CHAR | 1024, 0,"write_reg"},//set
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "NULL" },
|
||||
{ WRITE_RF, IW_PRIV_TYPE_CHAR | 1024, 0,"write_rf"},//set
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "NULL" },
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_CTX , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_ctx"},
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_ARX , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_arx"},
|
||||
{ MP_NULL, IW_PRIV_TYPE_CHAR | 128, 0,"NULL"},//set
|
||||
{ MP_THER , IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_ther"},
|
||||
{ EFUSE_SET, IW_PRIV_TYPE_CHAR | 1024, 0, "efuse_set" },
|
||||
{ EFUSE_GET, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "efuse_get" },
|
||||
{ MP_PWRTRK , IW_PRIV_TYPE_CHAR | 1024, 0, "mp_pwrtrk"},
|
||||
{ MP_QueryDrvStats, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_drvquery" },
|
||||
{ MP_IOCTL, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_ioctl"}, // mp_ioctl
|
||||
{ MP_SetRFPathSwh, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_setrfpath" },
|
||||
|
||||
#ifdef CONFIG_RTL8723A
|
||||
{ MP_SetBT, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_setbt" },
|
||||
#endif
|
||||
|
||||
{ SIOCIWFIRSTPRIV + 0x02, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , "test"},//set
|
||||
};
|
||||
|
||||
|
||||
static iw_handler rtw_private_handler[] =
|
||||
{
|
||||
rtw_mp_set,
|
||||
rtw_mp_get,
|
||||
};
|
||||
|
||||
#else // not inlucde MP
|
||||
|
||||
static const struct iw_priv_args rtw_private_args[] = {
|
||||
{
|
||||
SIOCIWFIRSTPRIV + 0x0,
|
||||
|
@ -12809,11 +12508,6 @@ static const struct iw_priv_args rtw_private_args[] = {
|
|||
SIOCIWFIRSTPRIV + 0xD,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | IFNAMSIZ, "rfr"
|
||||
},
|
||||
#if 0
|
||||
{
|
||||
SIOCIWFIRSTPRIV + 0xE,0,0, "wowlan_ctrl"
|
||||
},
|
||||
#endif
|
||||
{
|
||||
SIOCIWFIRSTPRIV + 0x10,
|
||||
IW_PRIV_TYPE_CHAR | P2P_PRIVATE_IOCTL_SET_LEN, 0, "p2p_set"
|
||||
|
@ -12897,7 +12591,6 @@ static const struct iw_priv_args rtw_private_args[] = {
|
|||
{ MP_SetBT, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_setbt" },
|
||||
#endif
|
||||
{ CTA_TEST, IW_PRIV_TYPE_CHAR | 1024, 0, "cta_test"},
|
||||
#endif
|
||||
};
|
||||
|
||||
static iw_handler rtw_private_handler[] =
|
||||
|
|
|
@ -547,22 +547,7 @@ int _rtw_memcmp(void *dst, void *src, u32 sz)
|
|||
|
||||
void _rtw_memset(void *pbuf, int c, u32 sz)
|
||||
{
|
||||
|
||||
#if defined (PLATFORM_LINUX)|| defined (PLATFORM_FREEBSD)
|
||||
|
||||
memset(pbuf, c, sz);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#if 0
|
||||
NdisZeroMemory(pbuf, sz);
|
||||
if (c != 0) memset(pbuf, c, sz);
|
||||
#else
|
||||
NdisFillMemory(pbuf, sz, c);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
@ -1181,14 +1166,6 @@ void rtw_usleep_os(int us)
|
|||
#ifdef DBG_DELAY_OS
|
||||
void _rtw_mdelay_os(int ms, const char *func, const int line)
|
||||
{
|
||||
#if 0
|
||||
if (ms>10)
|
||||
DBG_871X("%s:%d %s(%d)\n", func, line, __func__, ms);
|
||||
rtw_msleep_os(ms);
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
DBG_871X("%s:%d %s(%d)\n", func, line, __func__, ms);
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
|
@ -1205,16 +1182,6 @@ void _rtw_mdelay_os(int ms, const char *func, const int line)
|
|||
}
|
||||
void _rtw_udelay_os(int us, const char *func, const int line)
|
||||
{
|
||||
|
||||
#if 0
|
||||
if (us > 1000) {
|
||||
DBG_871X("%s:%d %s(%d)\n", func, line, __func__, us);
|
||||
rtw_usleep_os(us);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
DBG_871X("%s:%d %s(%d)\n", func, line, __func__, us);
|
||||
|
||||
|
||||
|
|
|
@ -440,44 +440,24 @@ 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(CMD_SETBAND) + 1) - '0';
|
||||
//bytes_written = wldev_set_band(net, band);
|
||||
break;
|
||||
case ANDROID_WIFI_CMD_GETBAND:
|
||||
//bytes_written = wl_android_get_band(net, command, priv_cmd.total_len);
|
||||
break;
|
||||
|
||||
case ANDROID_WIFI_CMD_COUNTRY:
|
||||
bytes_written = rtw_android_set_country(net, command, priv_cmd.total_len);
|
||||
break;
|
||||
|
||||
#ifdef PNO_SUPPORT
|
||||
case ANDROID_WIFI_CMD_PNOSSIDCLR_SET:
|
||||
//bytes_written = dhd_dev_pno_reset(net);
|
||||
break;
|
||||
case ANDROID_WIFI_CMD_PNOSETUP_SET:
|
||||
//bytes_written = wl_android_set_pno_setup(net, command, priv_cmd.total_len);
|
||||
break;
|
||||
case ANDROID_WIFI_CMD_PNOENABLE_SET:
|
||||
//uint pfn_enabled = *(command + strlen(CMD_PNOENABLE_SET) + 1) - '0';
|
||||
//bytes_written = dhd_dev_pno_enable(net, pfn_enabled);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -513,68 +513,18 @@ _func_enter_;
|
|||
pdvobjpriv->RtNumInPipes = 0;
|
||||
pdvobjpriv->RtNumOutPipes = 0;
|
||||
|
||||
//padapter->EepromAddressSize = 6;
|
||||
//pdvobjpriv->nr_endpoint = 6;
|
||||
|
||||
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++)
|
||||
{
|
||||
phost_endp = phost_iface->endpoint + i;
|
||||
|
@ -586,14 +536,10 @@ _func_enter_;
|
|||
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++;
|
||||
|
|
|
@ -515,25 +515,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);
|
||||
|
||||
|
@ -544,7 +525,6 @@ _func_enter_;
|
|||
purb->transfer_flags &= (~URB_NO_INTERRUPT);
|
||||
} else {
|
||||
purb->transfer_flags |= URB_NO_INTERRUPT;
|
||||
//DBG_8192C("URB_NO_INTERRUPT ");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -561,13 +541,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue