mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +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);
|
||||
|
|
|
@ -1629,35 +1629,6 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
|
||||
_func_enter_;
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
|
||||
ret = -EINVAL;
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
{
|
||||
|
@ -1810,15 +1781,6 @@ _func_enter_;
|
|||
#ifdef DBG_IOCTL
|
||||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
|
@ -1884,47 +1846,11 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
}
|
||||
#endif
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
indicate_wx_scan_complete_event(padapter);
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
indicate_wx_scan_complete_event(padapter);
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Mareded by Albert 20101103
|
||||
// For the DMP WiFi Display project, the driver won't to scan because
|
||||
// the pmlmepriv->scan_interval is always equal to 3.
|
||||
// So, the wpa_supplicant won't find out the WPS SoftAP.
|
||||
|
||||
/*
|
||||
if (pmlmepriv->scan_interval>10)
|
||||
pmlmepriv->scan_interval = 0;
|
||||
|
||||
if (pmlmepriv->scan_interval > 0)
|
||||
{
|
||||
DBG_88E("scan done\n");
|
||||
ret = 0;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
*/
|
||||
#ifdef CONFIG_P2P
|
||||
if (pwdinfo->p2p_state != P2P_STATE_NONE)
|
||||
{
|
||||
|
@ -2067,10 +1993,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
u32 cnt=0;
|
||||
u32 wait_for_surveydone;
|
||||
sint wait_status;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
//struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
#endif
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif //CONFIG_P2P
|
||||
|
@ -2083,15 +2005,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
|
@ -2118,37 +2031,12 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
}
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pmlmepriv->scanning_via_buddy_intf == true)
|
||||
{
|
||||
pmlmepriv->scanning_via_buddy_intf = false;//reset
|
||||
|
||||
// change pointers to buddy interface
|
||||
padapter = pbuddy_adapter;
|
||||
pmlmepriv = pbuddy_mlmepriv;
|
||||
queue = &(pbuddy_mlmepriv->scanned_queue);
|
||||
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
*/
|
||||
|
||||
wait_status = _FW_UNDER_SURVEY
|
||||
#ifndef CONFIG_ANDROID
|
||||
|_FW_UNDER_LINKING
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
while (dc_check_fwstate(padapter, wait_status)== true)
|
||||
{
|
||||
rtw_msleep_os(30);
|
||||
cnt++;
|
||||
if (cnt > wait_for_surveydone)
|
||||
break;
|
||||
}
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
while (check_fwstate(pmlmepriv, wait_status) == true)
|
||||
{
|
||||
rtw_msleep_os(30);
|
||||
|
@ -2234,36 +2122,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("set ssid, but buddy_intf is under scanning or linking\n");
|
||||
|
||||
ret = -EINVAL;
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
||||
("+rtw_wx_set_essid: fw_state=0x%08x\n", get_fwstate(pmlmepriv)));
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
|
@ -3916,33 +3774,7 @@ static int rtw_wext_p2p_enable(struct net_device *dev,
|
|||
pwdinfo->operating_channel = pwdinfo->listen_channel;
|
||||
ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
bwmode = HT_CHANNEL_WIDTH_20;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
//struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_interval);
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
pwdinfo->operating_channel = pbuddy_mlmeext->cur_channel;
|
||||
// How about the ch_offset and bwmode ??
|
||||
}
|
||||
else
|
||||
{
|
||||
pwdinfo->operating_channel = pwdinfo->listen_channel;
|
||||
}
|
||||
|
||||
channel = pbuddy_mlmeext->cur_channel;
|
||||
ch_offset = pbuddy_mlmeext->cur_ch_offset;
|
||||
bwmode = pbuddy_mlmeext->cur_bwmode;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
} else {
|
||||
pwdinfo->operating_channel = pmlmeext->cur_channel;
|
||||
|
||||
channel = pwdinfo->operating_channel;
|
||||
|
@ -3955,7 +3787,6 @@ static int rtw_wext_p2p_enable(struct net_device *dev,
|
|||
|
||||
exit:
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int rtw_p2p_set_go_nego_ssid(struct net_device *dev,
|
||||
|
@ -4186,12 +4017,6 @@ static int rtw_p2p_get_status(struct net_device *dev,
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct iw_point *pdata = &wrqu->data;
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif
|
||||
|
||||
if (padapter->bShowGetP2PState)
|
||||
{
|
||||
|
@ -4911,11 +4736,6 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
uint uintPeerChannel = 0;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
// Commented by Albert 20110304
|
||||
// The input data contains two informations.
|
||||
|
@ -4967,13 +4787,6 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
|
||||
if (uintPeerChannel)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
_rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
|
||||
_rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
||||
|
||||
|
@ -4991,31 +4804,9 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
DBG_88E("[%s] Start PreTx Procedure!\n", __func__);
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_GO_NEGO_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_GO_NEGO_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_GO_NEGO_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5047,11 +4838,6 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
@ -5183,13 +4969,6 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
|
||||
if (uintPeerChannel)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
// Store the GO's bssid
|
||||
for (jj = 0, kk = 18; jj < ETH_ALEN; jj++, kk += 3)
|
||||
{
|
||||
|
@ -5205,38 +4984,11 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_TX_INVITE_REQ);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#else
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_INVITE_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5269,11 +5021,6 @@ static int rtw_p2p_set_persistent(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
@ -5336,10 +5083,6 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
uint uintPeerChannel = 0;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
||||
// Commented by Albert 20120512
|
||||
|
@ -5590,11 +5333,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
u8 *p2pie;
|
||||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
#endif // CONFIG_WFD
|
||||
|
@ -5752,12 +5490,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
{
|
||||
|
||||
DBG_88E("[%s] peer channel: %d!\n", __func__, uintPeerChannel);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
_rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN);
|
||||
_rtw_memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN);
|
||||
pwdinfo->tx_prov_disc_info.peer_channel_num[0] = (u16) uintPeerChannel;
|
||||
|
@ -5775,37 +5507,11 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
pwdinfo->tx_prov_disc_info.ssid.SsidLength= P2P_WILDCARD_SSID_LEN;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#else
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_PROVISION_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6112,11 +5818,6 @@ static int rtw_rereg_nd_name(struct net_device *dev,
|
|||
|
||||
if (rereg_priv->old_ifname[0] == 0) {
|
||||
char *reg_ifname;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary)
|
||||
reg_ifname = padapter->registrypriv.ifname;
|
||||
else
|
||||
#endif
|
||||
reg_ifname = padapter->registrypriv.if2name;
|
||||
|
||||
strncpy(rereg_priv->old_ifname, reg_ifname, IFNAMSIZ);
|
||||
|
|
|
@ -156,10 +156,6 @@ static int rtw_hw_wps_pbc = 1;
|
|||
int rtw_mc2u_disable = 0;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
int rtw_dmsp = 0;
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
static int rtw_80211d = 0;
|
||||
#endif
|
||||
|
@ -244,10 +240,6 @@ MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
|
|||
module_param(rtw_mc2u_disable, int, 0644);
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
module_param(rtw_dmsp, int, 0644);
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
module_param(rtw_80211d, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_80211d, "Enable 802.11d mechanism");
|
||||
|
@ -757,10 +749,6 @@ _func_enter_;
|
|||
registry_par->fw_iol = rtw_fw_iol;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
registry_par->dmsp= (u8)rtw_dmsp;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
registry_par->enable80211d = (u8)rtw_80211d;
|
||||
#endif
|
||||
|
@ -1002,17 +990,11 @@ u32 rtw_start_drv_threads(_adapter *padapter)
|
|||
_status = _FAIL;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary == true)
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
||||
if (IS_ERR(padapter->cmdThread))
|
||||
_status = _FAIL;
|
||||
else
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
|
||||
}
|
||||
|
||||
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
||||
if (IS_ERR(padapter->cmdThread))
|
||||
_status = _FAIL;
|
||||
else
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
padapter->evtThread = kthread_run(event_thread, padapter, "RTW_EVENT_THREAD");
|
||||
|
@ -1028,15 +1010,10 @@ void rtw_stop_drv_threads (_adapter *padapter)
|
|||
{
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_stop_drv_threads\n"));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary == true)
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
//Below is to termindate rtw_cmd_thread & event_thread...
|
||||
_rtw_up_sema(&padapter->cmdpriv.cmd_queue_sema);
|
||||
if (padapter->cmdThread)
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
|
||||
}
|
||||
//Below is to termindate rtw_cmd_thread & event_thread...
|
||||
_rtw_up_sema(&padapter->cmdpriv.cmd_queue_sema);
|
||||
if (padapter->cmdThread)
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
_rtw_up_sema(&padapter->evtpriv.evt_notify);
|
||||
|
@ -1335,9 +1312,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
|
|||
_cancel_timer_ex( &pwdinfo->find_phase_timer );
|
||||
_cancel_timer_ex( &pwdinfo->restore_p2p_state_timer );
|
||||
_cancel_timer_ex( &pwdinfo->pre_tx_scan_timer);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_cancel_timer_ex( &pwdinfo->ap_p2p_switch_timer );
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||
}
|
||||
}
|
||||
|
@ -1395,332 +1369,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
int _netdev_if2_open(struct net_device *pnetdev)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
_adapter *primary_padapter = padapter->pbuddy_adapter;
|
||||
|
||||
DBG_88E("+88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
||||
|
||||
if (primary_padapter->bup == false || primary_padapter->hw_init_completed == false)
|
||||
_netdev_open(primary_padapter->pnetdev);
|
||||
|
||||
if (padapter->bup == false && primary_padapter->bup == true &&
|
||||
primary_padapter->hw_init_completed == true) {
|
||||
int i;
|
||||
|
||||
padapter->bDriverStopped = false;
|
||||
padapter->bSurpriseRemoved = false;
|
||||
padapter->bCardDisableWOHSM = false;
|
||||
|
||||
rtw_hal_clone_data(padapter, primary_padapter);
|
||||
|
||||
padapter->bFWReady = primary_padapter->bFWReady;
|
||||
|
||||
if (rtw_start_drv_threads(padapter) == _FAIL)
|
||||
goto netdev_if2_open_error;
|
||||
|
||||
if (padapter->intf_start)
|
||||
padapter->intf_start(padapter);
|
||||
|
||||
padapter->hw_init_completed = true;
|
||||
|
||||
padapter->dir_dev = NULL;
|
||||
rtw_proc_init_one(pnetdev);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_cfg80211_init_wiphy(padapter);
|
||||
#endif
|
||||
|
||||
padapter->bup = true;
|
||||
}
|
||||
padapter->net_closed = false;
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
if (!rtw_netif_queue_stopped(pnetdev))
|
||||
rtw_netif_start_queue(pnetdev);
|
||||
else
|
||||
rtw_netif_wake_queue(pnetdev);
|
||||
|
||||
DBG_88E("-88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
||||
return 0;
|
||||
|
||||
netdev_if2_open_error:
|
||||
|
||||
padapter->bup = false;
|
||||
|
||||
netif_carrier_off(pnetdev);
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int netdev_if2_open(struct net_device *pnetdev)
|
||||
{
|
||||
int ret;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
|
||||
_enter_critical_mutex(padapter->hw_init_mutex, NULL);
|
||||
ret = _netdev_if2_open(pnetdev);
|
||||
_exit_critical_mutex(padapter->hw_init_mutex, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int netdev_if2_close(struct net_device *pnetdev)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
|
||||
padapter->net_closed = true;
|
||||
|
||||
if (pnetdev) {
|
||||
if (!rtw_netif_queue_stopped(pnetdev))
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_scan_abort(padapter);
|
||||
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||
static const struct net_device_ops rtw_netdev_if2_ops = {
|
||||
.ndo_open = netdev_if2_open,
|
||||
.ndo_stop = netdev_if2_close,
|
||||
.ndo_start_xmit = rtw_xmit_entry,
|
||||
.ndo_set_mac_address = rtw_net_set_mac_address,
|
||||
.ndo_get_stats = rtw_net_get_stats,
|
||||
.ndo_do_ioctl = rtw_ioctl,
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||
.ndo_select_queue = rtw_select_queue,
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
_adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name,
|
||||
void (*set_intf_ops)(struct _io_ops *pops))
|
||||
{
|
||||
int res = _FAIL;
|
||||
struct net_device *pnetdev;
|
||||
_adapter *padapter = NULL;
|
||||
struct dvobj_priv *pdvobjpriv;
|
||||
u8 mac[ETH_ALEN];
|
||||
|
||||
/****** init netdev ******/
|
||||
pnetdev = rtw_init_netdev(NULL);
|
||||
if (!pnetdev)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||
DBG_88E("register rtw_netdev_if2_ops to netdev_ops\n");
|
||||
pnetdev->netdev_ops = &rtw_netdev_if2_ops;
|
||||
#else
|
||||
pnetdev->open = netdev_if2_open;
|
||||
pnetdev->stop = netdev_if2_close;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NO_WIRELESS_HANDLERS
|
||||
pnetdev->wireless_handlers = NULL;
|
||||
#endif
|
||||
|
||||
/****** init adapter ******/
|
||||
padapter = rtw_netdev_priv(pnetdev);
|
||||
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter));
|
||||
padapter->ph2c_fwcmd_mutex = primary_padapter->ph2c_fwcmd_mutex;
|
||||
padapter->psetch_mutex = primary_padapter->psetch_mutex;
|
||||
padapter->psetbw_mutex = primary_padapter->psetbw_mutex;
|
||||
padapter->hw_init_mutex = primary_padapter->hw_init_mutex;
|
||||
|
||||
padapter->bup = false;
|
||||
padapter->net_closed = true;
|
||||
padapter->hw_init_completed = false;
|
||||
|
||||
|
||||
//set adapter_type/iface type
|
||||
padapter->isprimary = false;
|
||||
padapter->adapter_type = SECONDARY_ADAPTER;
|
||||
padapter->pbuddy_adapter = primary_padapter;
|
||||
#ifndef CONFIG_HWPORT_SWAP //Port0 -> Pri , Port1 -> Sec
|
||||
padapter->iface_type = IFACE_PORT1;
|
||||
#else
|
||||
padapter->iface_type = IFACE_PORT0;
|
||||
#endif //CONFIG_HWPORT_SWAP
|
||||
padapter->pnetdev = pnetdev;
|
||||
|
||||
/****** setup dvobj ******/
|
||||
pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
pdvobjpriv->if2 = padapter;
|
||||
|
||||
SET_NETDEV_DEV(pnetdev, dvobj_to_dev(pdvobjpriv));
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_alloc(padapter, dvobj_to_dev(pdvobjpriv));
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
//set interface_type/chip_type/HardwareType
|
||||
padapter->interface_type = primary_padapter->interface_type;
|
||||
padapter->chip_type = primary_padapter->chip_type;
|
||||
padapter->HardwareType = primary_padapter->HardwareType;
|
||||
|
||||
//step 2. hook HalFunc, allocate HalData
|
||||
hal_set_hal_ops(padapter);
|
||||
|
||||
padapter->HalFunc.inirp_init = NULL;
|
||||
padapter->HalFunc.inirp_deinit = NULL;
|
||||
|
||||
padapter->intf_start = primary_padapter->intf_start;
|
||||
padapter->intf_stop = primary_padapter->intf_stop;
|
||||
|
||||
//step init_io_priv
|
||||
if ((rtw_init_io_priv(padapter, set_intf_ops)) == _FAIL) {
|
||||
RT_TRACE(_module_hci_intfs_c_,_drv_always_,("\n Can't init io_reqs\n"));
|
||||
}
|
||||
|
||||
pr_info("rtl8188eu - Driver version "DRIVERVERSION"\n");
|
||||
//step read_chip_version
|
||||
rtw_hal_read_chip_version(padapter);
|
||||
|
||||
//step usb endpoint mapping
|
||||
rtw_hal_chip_configure(padapter);
|
||||
|
||||
//init drv data
|
||||
if (rtw_init_drv_sw(padapter)!= _SUCCESS)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
// alloc dev name after got efuse data.
|
||||
if (name == NULL)
|
||||
name = padapter->registrypriv.if2name;
|
||||
|
||||
rtw_init_netdev_name(pnetdev, name);
|
||||
//get mac address from primary_padapter
|
||||
_rtw_memcpy(mac, primary_padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||
|
||||
if (((mac[0]==0xff) &&(mac[1]==0xff) && (mac[2]==0xff) &&
|
||||
(mac[3]==0xff) && (mac[4]==0xff) &&(mac[5]==0xff)) ||
|
||||
((mac[0]==0x0) && (mac[1]==0x0) && (mac[2]==0x0) &&
|
||||
(mac[3]==0x0) && (mac[4]==0x0) &&(mac[5]==0x0))) {
|
||||
mac[0] = 0x00;
|
||||
mac[1] = 0xe0;
|
||||
mac[2] = 0x4c;
|
||||
mac[3] = 0x87;
|
||||
mac[4] = 0x11;
|
||||
mac[5] = 0x22;
|
||||
} else {
|
||||
//If the BIT1 is 0, the address is universally administered.
|
||||
//If it is 1, the address is locally administered
|
||||
mac[0] |= BIT(1); // locally administered
|
||||
}
|
||||
|
||||
_rtw_memcpy(padapter->eeprompriv.mac_addr, mac, ETH_ALEN);
|
||||
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
||||
|
||||
_rtw_memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
|
||||
|
||||
pr_info("MAC Address (if2) = %pM\n", mac);
|
||||
|
||||
primary_padapter->pbuddy_adapter = padapter;
|
||||
|
||||
//prepare concurrent shared data buffer
|
||||
if (!primary_padapter->pcodatapriv) {
|
||||
struct co_data_priv *pcodatapriv;
|
||||
|
||||
pcodatapriv = (struct co_data_priv*)rtw_zvmalloc(sizeof(struct co_data_priv));
|
||||
|
||||
primary_padapter->pcodatapriv = pcodatapriv;
|
||||
padapter->pcodatapriv = pcodatapriv;
|
||||
|
||||
//concurrent shared data init.
|
||||
pcodatapriv->co_ch = rtw_channel;
|
||||
pcodatapriv->co_bw = HT_CHANNEL_WIDTH_20;
|
||||
pcodatapriv->co_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
}
|
||||
|
||||
padapter->dir_dev = NULL;
|
||||
/* Tell the network stack we exist */
|
||||
if (register_netdev(pnetdev) != 0)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
res = _SUCCESS;
|
||||
|
||||
return padapter;
|
||||
|
||||
error_rtw_drv_if2_init:
|
||||
|
||||
rtw_free_drv_sw(padapter);
|
||||
|
||||
if (pnetdev)
|
||||
rtw_free_netdev(pnetdev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void rtw_drv_if2_free(_adapter *if2)
|
||||
{
|
||||
_adapter *padapter = if2;
|
||||
struct net_device *pnetdev = NULL;
|
||||
|
||||
if (padapter == NULL)
|
||||
return;
|
||||
|
||||
pnetdev = padapter->pnetdev;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_free(padapter->rtw_wdev);
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
/* free concurrent shared data buffer */
|
||||
if (padapter->pcodatapriv) {
|
||||
rtw_vmfree((u8*)padapter->pcodatapriv, sizeof(struct co_data_priv));
|
||||
padapter->pcodatapriv = NULL;
|
||||
}
|
||||
|
||||
rtw_free_drv_sw(padapter);
|
||||
|
||||
rtw_free_netdev(pnetdev);
|
||||
}
|
||||
|
||||
void rtw_drv_if2_stop(_adapter *if2)
|
||||
{
|
||||
_adapter *padapter = if2;
|
||||
struct net_device *pnetdev = NULL;
|
||||
|
||||
if (padapter == NULL)
|
||||
return;
|
||||
|
||||
pnetdev = padapter->pnetdev;
|
||||
|
||||
if (pnetdev) {
|
||||
unregister_netdev(pnetdev); //will call netdev_close()
|
||||
rtw_proc_remove_one(pnetdev);
|
||||
}
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
|
||||
if (padapter->bup == true) {
|
||||
padapter->bDriverStopped = true;
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
if (padapter->xmitpriv.ack_tx)
|
||||
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP);
|
||||
#endif
|
||||
|
||||
if (padapter->intf_stop)
|
||||
padapter->intf_stop(padapter);
|
||||
|
||||
rtw_stop_drv_threads(padapter);
|
||||
|
||||
padapter->bup = false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_unregister(padapter->rtw_wdev);
|
||||
#endif
|
||||
|
||||
if (padapter->pbuddy_adapter)
|
||||
padapter->pbuddy_adapter->pcodatapriv = NULL;
|
||||
}
|
||||
#endif //end of CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
void netdev_br_init(struct net_device *netdev)
|
||||
{
|
||||
|
@ -1843,14 +1491,6 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
netdev_open_normal_process:
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
_adapter *sec_adapter = padapter->pbuddy_adapter;
|
||||
if (sec_adapter && (sec_adapter->bup == false || sec_adapter->hw_init_completed == false))
|
||||
_netdev_if2_open(sec_adapter->pnetdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("-88eu_drv - dev_open\n"));
|
||||
DBG_88E("-88eu_drv - drv_open, bup=%d\n", padapter->bup);
|
||||
|
||||
|
|
|
@ -135,12 +135,6 @@ struct rtw_usb_drv {
|
|||
int drv_registered;
|
||||
|
||||
_mutex hw_init_mutex;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//global variable
|
||||
_mutex h2c_fwcmd_mutex;
|
||||
_mutex setch_mutex;
|
||||
_mutex setbw_mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct usb_device_id rtl8188e_usb_id_tbl[] ={
|
||||
|
@ -1055,24 +1049,7 @@ static _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
|||
|
||||
padapter->bDriverStopped=true;
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//set adapter_type/iface type for primary padapter
|
||||
padapter->isprimary = true;
|
||||
padapter->adapter_type = PRIMARY_ADAPTER;
|
||||
#ifndef CONFIG_HWPORT_SWAP
|
||||
padapter->iface_type = IFACE_PORT0;
|
||||
#else
|
||||
padapter->iface_type = IFACE_PORT1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//set global variable to primary adapter
|
||||
padapter->ph2c_fwcmd_mutex = &usb_drv->h2c_fwcmd_mutex;
|
||||
padapter->psetch_mutex = &usb_drv->setch_mutex;
|
||||
padapter->psetbw_mutex = &usb_drv->setbw_mutex;
|
||||
#endif
|
||||
|
||||
#ifndef RTW_DVOBJ_CHIP_HW_TYPE
|
||||
//step 1-1., decide the chip_type via vid/pid
|
||||
|
@ -1427,12 +1404,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
|
|||
goto free_dvobj;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ((if2 = rtw_drv_if2_init(if1, NULL, usb_set_intf_ops)) == NULL) {
|
||||
goto free_if1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
rtw_sw_export=if1;
|
||||
#endif
|
||||
|
@ -1495,16 +1466,8 @@ _func_enter_;
|
|||
|
||||
LeaveAllPowerSaveMode(padapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_drv_if2_stop(dvobj->if2);
|
||||
#endif
|
||||
|
||||
rtw_usb_if1_deinit(padapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_drv_if2_free(dvobj->if2);
|
||||
#endif
|
||||
|
||||
usb_dvobj_deinit(pusb_intf);
|
||||
|
||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-dev_remove()\n"));
|
||||
|
@ -1537,12 +1500,6 @@ static int __init rtw_drv_entry(void)
|
|||
rtw_suspend_lock_init();
|
||||
|
||||
_rtw_mutex_init(&usb_drv->hw_init_mutex);
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//init global variable
|
||||
_rtw_mutex_init(&usb_drv->h2c_fwcmd_mutex);
|
||||
_rtw_mutex_init(&usb_drv->setch_mutex);
|
||||
_rtw_mutex_init(&usb_drv->setbw_mutex);
|
||||
#endif
|
||||
|
||||
usb_drv->drv_registered = true;
|
||||
return usb_register(&usb_drv->usbdrv);
|
||||
|
@ -1559,11 +1516,6 @@ static void __exit rtw_drv_halt(void)
|
|||
usb_deregister(&usb_drv->usbdrv);
|
||||
|
||||
_rtw_mutex_free(&usb_drv->hw_init_mutex);
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
_rtw_mutex_free(&usb_drv->h2c_fwcmd_mutex);
|
||||
_rtw_mutex_free(&usb_drv->setch_mutex);
|
||||
_rtw_mutex_free(&usb_drv->setbw_mutex);
|
||||
#endif
|
||||
DBG_88E("-rtw_drv_halt\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue