mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Remove dead code associated with CONFIG_CONCURRENT snd CONFIG_DUALMAC_CONCURRENT
These two configuration parameters are only associated with the RTL8192DU device, and can be removed here. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e79535e153
commit
7c593a903d
30 changed files with 103 additions and 4328 deletions
|
@ -1524,27 +1524,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
extern int netdev_open(struct net_device *pnetdev);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
extern int netdev_if2_open(struct net_device *pnetdev);
|
||||
#endif
|
||||
|
||||
/*
|
||||
enum nl80211_iftype {
|
||||
NL80211_IFTYPE_UNSPECIFIED,
|
||||
NL80211_IFTYPE_ADHOC, //1
|
||||
NL80211_IFTYPE_STATION, //2
|
||||
NL80211_IFTYPE_AP, //3
|
||||
NL80211_IFTYPE_AP_VLAN,
|
||||
NL80211_IFTYPE_WDS,
|
||||
NL80211_IFTYPE_MONITOR, //6
|
||||
NL80211_IFTYPE_MESH_POINT,
|
||||
NL80211_IFTYPE_P2P_CLIENT, //8
|
||||
NL80211_IFTYPE_P2P_GO, //9
|
||||
//keep last
|
||||
NUM_NL80211_IFTYPES,
|
||||
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
||||
};
|
||||
*/
|
||||
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
enum nl80211_iftype type, u32 *flags,
|
||||
|
@ -1561,23 +1541,10 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
int ret = 0;
|
||||
u8 change = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!padapter->isprimary)
|
||||
{
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_if2_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_if2_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
|
@ -1867,23 +1834,11 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
struct cfg80211_ssid *ssids = request->ssids;
|
||||
int social_channel = 0, j = 0;
|
||||
bool need_indicate_scan_done = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = NULL;
|
||||
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
|
@ -1962,15 +1917,6 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
DBG_88E("%s, bBusyTraffic == true at buddy_intf\n", __func__);
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state);
|
||||
|
@ -1978,24 +1924,6 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter,
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == true)
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||
{
|
||||
DBG_88E("scanning_via_buddy_intf\n");
|
||||
pmlmepriv->scanning_via_buddy_intf = true;
|
||||
}
|
||||
|
||||
DBG_88E("buddy_intf's mlme state:0x%x\n", pbuddy_mlmepriv->fw_state);
|
||||
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
|
@ -2480,17 +2408,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == true) {
|
||||
DBG_88E("%s, but buddy_intf is under linking\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == true) {
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!sme->ssid || !sme->ssid_len)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
|
@ -4067,10 +3984,6 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
|
||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
|
@ -4087,14 +4000,8 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
pcfg80211_wdinfo->remain_on_ch_cookie= *cookie;
|
||||
|
||||
rtw_scan_abort(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
//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))
|
||||
{
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
|
||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||
}
|
||||
|
@ -4113,83 +4020,26 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
if (duration < 400)
|
||||
duration = duration*3;//extend from exper.
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED) &&
|
||||
(duration<pwdinfo->ext_listen_interval))
|
||||
{
|
||||
duration = duration + pwdinfo->ext_listen_interval;
|
||||
}
|
||||
#endif
|
||||
|
||||
pcfg80211_wdinfo->restore_channel = pmlmeext->cur_channel;
|
||||
|
||||
if (rtw_ch_set_search_ch(pmlmeext->channel_set, remain_ch) >= 0) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
if (remain_ch != pbuddy_mlmeext->cur_channel)
|
||||
{
|
||||
if (ATOMIC_READ(&pwdev_priv->switch_ch_to)==1 ||
|
||||
(remain_ch != pmlmeext->cur_channel))
|
||||
{
|
||||
DBG_88E("%s, issue nulldata pwrbit=1\n", __func__);
|
||||
issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500);
|
||||
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 0);
|
||||
|
||||
DBG_88E("%s, set switch ch timer, duration=%d\n", __func__, duration-pwdinfo->ext_listen_interval);
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, duration-pwdinfo->ext_listen_interval);
|
||||
}
|
||||
}
|
||||
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
if (remain_ch != pmlmeext->cur_channel )
|
||||
{
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
} else {
|
||||
DBG_88E("%s remain_ch:%u not in channel plan!!!!\n", __func__, remain_ch);
|
||||
}
|
||||
|
||||
|
||||
//call this after other things have been done
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (ATOMIC_READ(&pwdev_priv->ro_ch_to)==1 ||
|
||||
(remain_ch != pmlmeext->cur_channel))
|
||||
{
|
||||
u8 co_channel = 0xff;
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 0);
|
||||
#endif
|
||||
if (ready_on_channel == true) {
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
pmlmeext->cur_channel = remain_ch;
|
||||
|
||||
if (ready_on_channel == true)
|
||||
{
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
pmlmeext->cur_channel = remain_ch;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
co_channel = rtw_get_oper_ch(padapter);
|
||||
|
||||
if (co_channel !=remain_ch)
|
||||
#endif
|
||||
set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
DBG_88E("%s, set ro ch timer, duration=%d\n", __func__, duration);
|
||||
_set_timer( &pcfg80211_wdinfo->remain_on_ch_timer, duration);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#endif
|
||||
|
||||
DBG_88E("%s, set ro ch timer, duration=%d\n", __func__, duration);
|
||||
_set_timer( &pcfg80211_wdinfo->remain_on_ch_timer, duration);
|
||||
|
||||
cfg80211_ready_on_channel(ndev, *cookie, channel, channel_type, duration, GFP_KERNEL);
|
||||
|
||||
|
@ -4217,9 +4067,6 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
|||
if (pcfg80211_wdinfo->is_ro_ch == true) {
|
||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
|
@ -4260,52 +4107,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
rtw_set_scan_deny(padapter, 1000);
|
||||
|
||||
rtw_scan_abort(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (padapter->cfg80211_wdinfo.is_ro_ch == true) {
|
||||
//DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
//_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
//padapter->cfg80211_wdinfo.is_ro_ch = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
DBG_88E("%s, extend ro ch time\n", __func__);
|
||||
_set_timer( &padapter->cfg80211_wdinfo.remain_on_ch_timer, pwdinfo->ext_listen_period);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED )) {
|
||||
u8 co_channel=0xff;
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
co_channel = rtw_get_oper_ch(padapter);
|
||||
|
||||
if (tx_ch != pbuddy_mlmeext->cur_channel) {
|
||||
if (ATOMIC_READ(&pwdev_priv->switch_ch_to)==1) {
|
||||
DBG_88E("%s, issue nulldata pwrbit=1\n", __func__);
|
||||
issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500);
|
||||
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 0);
|
||||
|
||||
//DBG_88E("%s, set switch ch timer, period=%d\n", __func__, pwdinfo->ext_listen_period);
|
||||
//_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period);
|
||||
}
|
||||
|
||||
DBG_88E("%s, set switch ch timer, period=%d\n", __func__, pwdinfo->ext_listen_period);
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period);
|
||||
}
|
||||
|
||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED ))
|
||||
pmlmeext->cur_channel = tx_ch;
|
||||
|
||||
if (tx_ch != co_channel)
|
||||
set_channel_bwmode(padapter, tx_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
//if (tx_ch != pmlmeext->cur_channel) {
|
||||
if (tx_ch != rtw_get_oper_ch(padapter)) {
|
||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED ))
|
||||
pmlmeext->cur_channel = tx_ch;
|
||||
|
@ -4315,7 +4117,6 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
//starting alloc mgmt frame to dump it
|
||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||
{
|
||||
//ret = -ENOMEM;
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -5084,13 +4885,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct device *dev)
|
|||
else
|
||||
pwdev_priv->power_mgmt = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
|
||||
wdev->netdev = pnetdev;
|
||||
//wdev->iftype = NL80211_IFTYPE_STATION;
|
||||
wdev->iftype = NL80211_IFTYPE_MONITOR; // for rtw_setopmode_cmd() in cfg80211_rtw_change_iface()
|
||||
|
||||
rtw_cfg80211_preinit_wiphy(padapter, wdev->wiphy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue