rtl8188eu: Update for driver to build on kernel 4.19

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-10-18 20:33:29 -05:00
parent f62909c0c1
commit 9d1d96c95d
23 changed files with 435 additions and 687 deletions

View file

@ -3898,23 +3898,22 @@ out:
return ret;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
static struct wireless_dev *
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
static struct net_device *
#else
static int
#endif
cfg80211_rtw_add_virtual_intf(
struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0))
cfg80211_rtw_add_virtual_intf(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
const char *name,
#else
#else
char *name,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
unsigned char name_assign_type,
#endif
#endif
enum nl80211_iftype type,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
u32 *flags,

View file

@ -58,9 +58,17 @@ void Linkdown_workitem_callback(struct work_struct *work)
/*
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void sitesurvey_ctrl_handler(void *FunctionContext)
#else
void sitesurvey_ctrl_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
_adapter *adapter = from_timer(adapter, t, sitesurveyctrl.sitesurvey_ctrl_timer);
#endif
_sitesurvey_ctrl_handler(adapter);
@ -68,63 +76,110 @@ void sitesurvey_ctrl_handler(void *FunctionContext)
}
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void rtw_join_timeout_handler(void *FunctionContext)
#else
void rtw_join_timeout_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
_adapter *adapter = from_timer(adapter, t, mlmepriv.assoc_timer);
#endif
_rtw_join_timeout_handler(adapter);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _rtw_scan_timeout_handler(void *FunctionContext)
#else
void _rtw_scan_timeout_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
_adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
#endif
rtw_scan_timeout_handler(adapter);
}
void _dynamic_check_timer_handlder(void *FunctionContext)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _dynamic_check_timer_handler (void *FunctionContext)
#else
void _dynamic_check_timer_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct dvobj_priv *pdvobj = (struct dvobj_priv *)FunctionContext;
#else
struct dvobj_priv *pdvobj = from_timer(pdvobj, t, dynamic_chk_timer);
#endif
_adapter *adapter = dvobj_get_primary_adapter(pdvobj);
#if (MP_DRIVER == 1)
if (adapter->registrypriv.mp_mode == 1 && adapter->mppriv.mp_dm == 0) { /* for MP ODM dynamic Tx power tracking */
/* RTW_INFO("_dynamic_check_timer_handlder mp_dm =0 return\n"); */
/* RTW_INFO("_dynamic_check_timer_handler mp_dm =0 return\n"); */
_set_timer(&pdvobj->dynamic_chk_timer, 2000);
return;
}
#endif
rtw_dynamic_check_timer_handlder(adapter);
rtw_dynamic_check_timer_handler(adapter);
_set_timer(&pdvobj->dynamic_chk_timer, 2000);
}
#ifdef CONFIG_SET_SCAN_DENY_TIMER
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _rtw_set_scan_deny_timer_hdl(void *FunctionContext)
#else
void _rtw_set_scan_deny_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *adapter = (_adapter *)FunctionContext;
#else
_adapter *adapter = from_timer(adapter, t, mlmepriv.set_scan_deny_timer);
#endif
rtw_set_scan_deny_timer_hdl(adapter);
}
#endif
void rtw_init_mlme_timer(_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter);
/* _init_timer(&(pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer), padapter->pnetdev, sitesurvey_ctrl_handler, padapter); */
_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&pmlmepriv->assoc_timer, padapter->pnetdev, rtw_join_timeout_handler, padapter);
/* _init_timer(&pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer, padapter->pnetdev, sitesurvey_ctrl_handler, padapter); */
_init_timer(&pmlmepriv->scan_to_timer, padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
#ifdef CONFIG_DFS_MASTER
_init_timer(&(pmlmepriv->dfs_master_timer), padapter->pnetdev, rtw_dfs_master_timer_hdl, padapter);
_init_timer(&pmlmepriv->dfs_master_timer, padapter->pnetdev, rtw_dfs_master_timer_hdl, padapter);
#endif
#ifdef CONFIG_SET_SCAN_DENY_TIMER
_init_timer(&(pmlmepriv->set_scan_deny_timer), padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter);
_init_timer(&pmlmepriv->set_scan_deny_timer, padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter);
#endif
#else
timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0);
/* timer_setup(&pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer, sitesurvey_ctrl_handler, 0); */
timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0);
#ifdef CONFIG_DFS_MASTER
timer_setup(&pmlmepriv->dfs_master_timer, rtw_dfs_master_timer_hdl, 0);
#endif
#ifdef CONFIG_SET_SCAN_DENY_TIMER
timer_setup(&pmlmepriv->set_scan_deny_timer, _rtw_set_scan_deny_timer_hdl, 0);
#endif
#endif
#ifdef RTK_DMP_PLATFORM
_init_workitem(&(pmlmepriv->Linkup_workitem), Linkup_workitem_callback, padapter);
_init_workitem(&(pmlmepriv->Linkdown_workitem), Linkdown_workitem_callback, padapter);
@ -300,53 +355,108 @@ void rtw_report_sec_ie(_adapter *adapter, u8 authmode, u8 *sec_ie)
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _survey_timer_hdl(void *FunctionContext)
#else
void _survey_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.survey_timer);
#endif
survey_timer_hdl(padapter);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _link_timer_hdl(void *FunctionContext)
#else
void _link_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.link_timer);
#endif
link_timer_hdl(padapter);
}
#ifdef CONFIG_RTW_80211R
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _ft_link_timer_hdl(void *FunctionContext)
#else
void _ft_link_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
_adapter *padapter = from_timer(ipadapter, t, ft_link_timer);
#endif
ft_link_timer_hdl(padapter);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _ft_roam_timer_hdl(void *FunctionContext)
#else
void _ft_roam_timer_hdl(struct timer_list *t);
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
_adapter *padapter = from_timer(adapter, t, ft_roam_timer);
#endif
ft_roam_timer_hdl(padapter);
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _addba_timer_hdl(void *FunctionContext)
#else
void _addba_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct sta_info *psta = (struct sta_info *)FunctionContext;
#else
struct sta_info *psta = from_timer(psta, t, addba_retry_timer);
#endif
addba_timer_hdl(psta);
}
#ifdef CONFIG_IEEE80211W
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _sa_query_timer_hdl(void *FunctionContext)
#else
void _sa_query_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct sta_info *psta = (struct sta_info *)FunctionContext;
#else
struct sta_info *psta = from_timer(psta, t, dot11w_expire_timer);
#endif
sa_query_timer_hdl(psta);
}
void init_dot11w_expire_timer(_adapter *padapter, struct sta_info *psta)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&psta->dot11w_expire_timer, padapter->pnetdev, _sa_query_timer_hdl, psta);
#else
timer_setip(&psta->dot11w_expire_timer, _sa_query_timer_hdl, 0);
#endif
}
#endif /* CONFIG_IEEE80211W */
@ -354,20 +464,42 @@ void init_dot11w_expire_timer(_adapter *padapter, struct sta_info *psta)
void init_addba_retry_timer(_adapter *padapter, struct sta_info *psta)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta);
#else
timer_setup(&psta->addba_retry_timer, _addba_timer_hdl, 0);
#endif
}
/*
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _reauth_timer_hdl(void *FunctionContext)
#else
void _reauth_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
#else
_adapter *padapter = from_timer(adapter, t, reauth_timer);
#endif
reauth_timer_hdl(padapter);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _reassoc_timer_hdl(void *FunctionContext)
#else
void _reassoc_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_adapter *padapter = (_adapter *)FunctionContext;
reassoc_timer_hdl(padapter);
#else
_adapter *padapter = from_timer(adapter, t, reassoc_timer);
#endif
` reassoc_timer_hdl(padapter);
}
*/
@ -375,6 +507,7 @@ void init_mlme_ext_timer(_adapter *padapter)
{
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, _survey_timer_hdl, padapter);
_init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter);
#ifdef CONFIG_RTW_80211R
@ -386,6 +519,19 @@ void init_mlme_ext_timer(_adapter *padapter)
/* _init_timer(&pmlmeext->reauth_timer, padapter->pnetdev, _reauth_timer_hdl, padapter); */
/* _init_timer(&pmlmeext->reassoc_timer, padapter->pnetdev, _reassoc_timer_hdl, padapter); */
#else
timer_setup(&pmlmeext->survey_timer, _survey_timer_hdl, 0);
timer_setup(&pmlmeext->link_timer, _link_timer_hdl, 0);
#ifdef CONFIG_RTW_80211R
timer_setup(&pmlmeext->ft_link_timer, _ft_link_timer_hdl, 0);
timer_setup(&pmlmeext->ft_roam_timer, _ft_roam_timer_hdl, 0);
#endif
/* timer_setup(&pmlmeext->ADDBA_timer, _addba_timer_hdl, 0); */
/* timer_setup(&pmlmeext->reauth_timer, _reauth_timer_hdl, 0); */
/* timer_setup(&pmlmeext->reassoc_timer, _reassoc_timer_hdl, 0); */
#endif
}
#ifdef CONFIG_AP_MODE

View file

@ -84,7 +84,7 @@ module_param(rtw_usb_rxagg_mode, int, 0644);
#ifdef RTW_LOG_LEVEL
uint rtw_drv_log_level = (uint)RTW_LOG_LEVEL; /* from Makefile */
#else
uint rtw_drv_log_level = _DRV_ERR_;
uint rtw_drv_log_level = _DRV_INFO_;
#endif
module_param(rtw_drv_log_level, uint, 0644);
MODULE_PARM_DESC(rtw_drv_log_level, "set log level when insert driver module, default log level is _DRV_INFO_ = 4");
@ -1015,20 +1015,6 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
#if 0
if (rtw_is_hw_init_completed(padapter)) {
rtw_ps_deny(padapter, PS_DENY_IOCTL);
LeaveAllPowerSaveModeDirect(padapter); /* leave PS mode for guaranteeing to access hw register successfully */
#ifdef CONFIG_MI_WITH_MBSSID_CAM
rtw_hal_change_macaddr_mbid(padapter, sa->sa_data);
#else
rtw_hal_set_hwreg(padapter, HW_VAR_MAC_ADDR, sa->sa_data); /* set mac addr to mac register */
#endif
rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL);
}
#else
rtw_ps_deny(padapter, PS_DENY_IOCTL);
LeaveAllPowerSaveModeDirect(padapter); /* leave PS mode for guaranteeing to access hw register successfully */
#ifdef CONFIG_MI_WITH_MBSSID_CAM
@ -1037,7 +1023,6 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
rtw_hal_set_hwreg(padapter, HW_VAR_MAC_ADDR, sa->sa_data); /* set mac addr to mac register */
#endif
rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL);
#endif
RTW_INFO(FUNC_ADPT_FMT": Set Mac Addr to "MAC_FMT" Successfully\n"
, FUNC_ADPT_ARG(padapter), MAC_ARG(sa->sa_data));
@ -1100,11 +1085,12 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
, void *accel_priv
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
, select_queue_fallback_t fallback
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
,struct net_device *sb_dev
,select_queue_fallback_t fallback
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
,void *unused
,select_queue_fallback_t fallback
#endif
)
{
@ -1245,7 +1231,7 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
#ifdef CONFIG_EASY_REPLACEMENT
struct net_device *TargetNetdev = NULL;
_adapter *TargetAdapter = NULL;
_adapter *TargetAdapter = NULL;
struct net *devnet = NULL;
if (padapter->bDongle == 1) {
@ -1786,17 +1772,26 @@ u8 rtw_init_default_value(_adapter *padapter)
}
#ifdef CONFIG_SWTIMER_BASED_TXBCN
void _tx_beacon_timer_handlder(void *FunctionContext)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _tx_beacon_timer_handler(void *FunctionContext)
#else
void _tx_beacon_timer_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct dvobj_priv *pdvobj = (struct dvobj_priv *)FunctionContext;
#else
struct dvobj_priv *pdvobj = from_timer(pdvobj, t, txbcn_timer);
#endif
tx_beacon_timer_handlder(pdvobj);
tx_beacon_timer_handler(pdvobj);
}
#endif
struct dvobj_priv *devobj_init(void)
{
struct dvobj_priv *pdvobj = NULL;
_adapter *adapter;
pdvobj = (struct dvobj_priv *)rtw_zmalloc(sizeof(*pdvobj));
if (pdvobj == NULL)
@ -1835,11 +1830,19 @@ struct dvobj_priv *devobj_init(void)
pdvobj->inter_bcn_space = DEFAULT_BCN_INTERVAL; /* default value is equal to the default beacon_interval (100ms) */
_rtw_init_queue(&pdvobj->ap_if_q);
#ifdef CONFIG_SWTIMER_BASED_TXBCN
_init_timer(&(pdvobj->txbcn_timer), NULL, _tx_beacon_timer_handlder, pdvobj);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&pdvobj->txbcn_timer, NULL, _tx_beacon_timer_handler, pdvobj);
#else
timer_setup(&pdvobj->txbcn_timer, _tx_beacon_timer_handler, 0);
#endif
#endif
#endif
_init_timer(&(pdvobj->dynamic_chk_timer), NULL, _dynamic_check_timer_handlder, pdvobj);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&pdvobj->dynamic_chk_timer, NULL, _dynamic_check_timer_handler, pdvobj);
#else
timer_setup(&pdvobj->dynamic_chk_timer, _dynamic_check_timer_handler, 0);
#endif
#ifdef CONFIG_MCC_MODE
_rtw_mutex_init(&(pdvobj->mcc_objpriv.mcc_mutex));
@ -1983,13 +1986,9 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
u8 rtw_init_drv_sw(_adapter *padapter)
{
u8 ret8 = _SUCCESS;
_rtw_init_listhead(&padapter->list);
ret8 = rtw_init_default_value(padapter);
if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
@ -3495,7 +3494,7 @@ int rtw_gw_addr_query(_adapter *padapter)
}
#endif
void rtw_dev_unload(PADAPTER padapter)
void rtw_dev_unload(_adapter *padapter)
{
struct net_device *pnetdev = (struct net_device *)padapter->pnetdev;
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
@ -4217,7 +4216,6 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
rtw_mi_start_drv_threads(padapter);
#if 1
if (rtw_mi_check_status(padapter, MI_LINKED)) {
ch = rtw_mi_get_union_chan(padapter);
bw = rtw_mi_get_union_bw(padapter);
@ -4225,13 +4223,6 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
RTW_INFO(FUNC_ADPT_FMT" back to linked/linking union - ch:%u, bw:%u, offset:%u\n", FUNC_ADPT_ARG(padapter), ch, bw, offset);
set_channel_bwmode(padapter, ch, offset, bw);
}
#else
if (rtw_mi_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
RTW_INFO(FUNC_ADPT_FMT" back to linked/linking union - ch:%u, bw:%u, offset:%u\n", FUNC_ADPT_ARG(padapter), ch, bw, offset);
set_channel_bwmode(padapter, ch, offset, bw);
rtw_mi_update_union_chan_inf(padapter, ch, offset, bw);
}
#endif
/*FOR ONE AP - TODO :Multi-AP*/
{

View file

@ -869,10 +869,18 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
#endif
}
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
#else
void _rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
#else
struct recv_reorder_ctrl *preorder_ctrl = from_timer(preorder_ctrl, t, reordering_ctrl_timer);
#endif
rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
}
@ -880,6 +888,10 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
{
_adapter *padapter = preorder_ctrl->padapter;
_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
_init_timer(&preorder_ctrl->reordering_ctrl_timer, padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
#else
timer_setup(&preorder_ctrl->reordering_ctrl_timer, _rtw_reordering_ctrl_timeout_handler, 0);
#endif
}

View file

@ -463,68 +463,18 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf, const s
pdvobjpriv->RtNumInPipes = 0;
pdvobjpriv->RtNumOutPipes = 0;
/* padapter->EepromAddressSize = 6; */
/* pdvobjpriv->nr_endpoint = 6; */
pdev_desc = &pusbd->descriptor;
#if 0
RTW_INFO("\n8712_usb_device_descriptor:\n");
RTW_INFO("bLength=%x\n", pdev_desc->bLength);
RTW_INFO("bDescriptorType=%x\n", pdev_desc->bDescriptorType);
RTW_INFO("bcdUSB=%x\n", pdev_desc->bcdUSB);
RTW_INFO("bDeviceClass=%x\n", pdev_desc->bDeviceClass);
RTW_INFO("bDeviceSubClass=%x\n", pdev_desc->bDeviceSubClass);
RTW_INFO("bDeviceProtocol=%x\n", pdev_desc->bDeviceProtocol);
RTW_INFO("bMaxPacketSize0=%x\n", pdev_desc->bMaxPacketSize0);
RTW_INFO("idVendor=%x\n", pdev_desc->idVendor);
RTW_INFO("idProduct=%x\n", pdev_desc->idProduct);
RTW_INFO("bcdDevice=%x\n", pdev_desc->bcdDevice);
RTW_INFO("iManufacturer=%x\n", pdev_desc->iManufacturer);
RTW_INFO("iProduct=%x\n", pdev_desc->iProduct);
RTW_INFO("iSerialNumber=%x\n", pdev_desc->iSerialNumber);
RTW_INFO("bNumConfigurations=%x\n", pdev_desc->bNumConfigurations);
#endif
phost_conf = pusbd->actconfig;
pconf_desc = &phost_conf->desc;
#if 0
RTW_INFO("\n8712_usb_configuration_descriptor:\n");
RTW_INFO("bLength=%x\n", pconf_desc->bLength);
RTW_INFO("bDescriptorType=%x\n", pconf_desc->bDescriptorType);
RTW_INFO("wTotalLength=%x\n", pconf_desc->wTotalLength);
RTW_INFO("bNumInterfaces=%x\n", pconf_desc->bNumInterfaces);
RTW_INFO("bConfigurationValue=%x\n", pconf_desc->bConfigurationValue);
RTW_INFO("iConfiguration=%x\n", pconf_desc->iConfiguration);
RTW_INFO("bmAttributes=%x\n", pconf_desc->bmAttributes);
RTW_INFO("bMaxPower=%x\n", pconf_desc->bMaxPower);
#endif
/* RTW_INFO("\n***** num of altsetting = (%d) *****\n", pusb_interface->num_altsetting); */
phost_iface = &usb_intf->altsetting[0];
piface_desc = &phost_iface->desc;
#if 0
RTW_INFO("\n8712_usb_interface_descriptor:\n");
RTW_INFO("bLength=%x\n", piface_desc->bLength);
RTW_INFO("bDescriptorType=%x\n", piface_desc->bDescriptorType);
RTW_INFO("bInterfaceNumber=%x\n", piface_desc->bInterfaceNumber);
RTW_INFO("bAlternateSetting=%x\n", piface_desc->bAlternateSetting);
RTW_INFO("bNumEndpoints=%x\n", piface_desc->bNumEndpoints);
RTW_INFO("bInterfaceClass=%x\n", piface_desc->bInterfaceClass);
RTW_INFO("bInterfaceSubClass=%x\n", piface_desc->bInterfaceSubClass);
RTW_INFO("bInterfaceProtocol=%x\n", piface_desc->bInterfaceProtocol);
RTW_INFO("iInterface=%x\n", piface_desc->iInterface);
#endif
pdvobjpriv->NumInterfaces = pconf_desc->bNumInterfaces;
pdvobjpriv->InterfaceNumber = piface_desc->bInterfaceNumber;
pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints;
/* RTW_INFO("\ndump usb_endpoint_descriptor:\n"); */
for (i = 0; i < pdvobjpriv->nr_endpoint; i++) {
phost_endp = phost_iface->endpoint + i;
if (phost_endp) {
@ -534,11 +484,8 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf, const s
RTW_INFO("bLength=%x\n", pendp_desc->bLength);
RTW_INFO("bDescriptorType=%x\n", pendp_desc->bDescriptorType);
RTW_INFO("bEndpointAddress=%x\n", pendp_desc->bEndpointAddress);
/* RTW_INFO("bmAttributes=%x\n",pendp_desc->bmAttributes); */
RTW_INFO("wMaxPacketSize=%d\n", le16_to_cpu(pendp_desc->wMaxPacketSize));
RTW_INFO("bInterval=%x\n", pendp_desc->bInterval);
/* RTW_INFO("bRefresh=%x\n",pendp_desc->bRefresh); */
/* RTW_INFO("bSynchAddress=%x\n",pendp_desc->bSynchAddress); */
if (RT_usb_endpoint_is_bulk_in(pendp_desc)) {
RTW_INFO("RT_usb_endpoint_is_bulk_in = %x\n", RT_usb_endpoint_num(pendp_desc));

View file

@ -1066,13 +1066,6 @@ void rtw_list_insert_tail(_list *plist, _list *phead)
}
void rtw_init_timer(struct timer_list *ptimer, void *padapter, void *pfunc)
{
_adapter *adapter = (_adapter *)padapter;
_init_timer(ptimer, adapter->pnetdev, pfunc, adapter);
}
/*
Caller must check if the list is empty before calling rtw_list_delete
@ -1980,7 +1973,11 @@ static int readFile(struct file *fp, char *buf, int len)
while (sum < len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
#else
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
#endif
#else
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
#endif