Commit e6ac6eb2 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: os_intfs.c: Various cosmetic cleanups

In addition skb->priorty is a u32, so make rtw_classify8021d return a
u32 to match.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb269884
......@@ -274,9 +274,9 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)
static const u16 rtw_1d_to_queue[8] = { 2, 3, 3, 2, 1, 1, 0, 0 };
/* Given a data frame determine the 802.1p/1d tag to use. */
static unsigned int rtw_classify8021d(struct sk_buff *skb)
static u32 rtw_classify8021d(struct sk_buff *skb)
{
unsigned int dscp;
u32 dscp;
/* skb->priority values from 256->263 are magic values to
* directly indicate a specific 802.1d priority. This is used
......@@ -433,7 +433,6 @@ int rtw_reset_drv_sw23a(struct rtw_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
int ret8 = _SUCCESS;
/* hal_priv */
rtl8723a_init_default_value(padapter);
......@@ -455,7 +454,7 @@ int rtw_reset_drv_sw23a(struct rtw_adapter *padapter)
padapter->mlmeextpriv.sitesurvey_res.state = SCAN_DISABLE;
rtw_set_signal_stat_timer(&padapter->recvpriv);
return ret8;
return _SUCCESS;
}
int rtw_init_drv_sw23a(struct rtw_adapter *padapter)
......@@ -464,7 +463,7 @@ int rtw_init_drv_sw23a(struct rtw_adapter *padapter)
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_init_drv_sw23a\n"));
if ((rtw_init_cmd_priv23a(&padapter->cmdpriv)) == _FAIL) {
if (rtw_init_cmd_priv23a(&padapter->cmdpriv) == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_,
("\n Can't init cmd_priv\n"));
ret8 = _FAIL;
......@@ -533,29 +532,30 @@ int rtw_init_drv_sw23a(struct rtw_adapter *padapter)
void rtw_cancel_all_timer23a(struct rtw_adapter *padapter)
{
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_cancel_all_timer23a\n"));
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("+rtw_cancel_all_timer23a\n"));
del_timer_sync(&padapter->mlmepriv.assoc_timer);
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("rtw_cancel_all_timer23a:cancel association timer complete!\n"));
("%s:cancel association timer complete!\n", __func__));
del_timer_sync(&padapter->mlmepriv.scan_to_timer);
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("rtw_cancel_all_timer23a:cancel scan_to_timer!\n"));
("%s:cancel scan_to_timer!\n", __func__));
del_timer_sync(&padapter->mlmepriv.dynamic_chk_timer);
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("rtw_cancel_all_timer23a:cancel dynamic_chk_timer!\n"));
("%s:cancel dynamic_chk_timer!\n", __func__));
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("rtw_cancel_all_timer23a:cancel DeInitSwLeds!\n"));
("%s:cancel DeInitSwLeds!\n", __func__));
del_timer_sync(&padapter->pwrctrlpriv.pwr_state_check_timer);
del_timer_sync(&padapter->mlmepriv.set_scan_deny_timer);
rtw_clear_scan_deny(padapter);
RT_TRACE(_module_os_intfs_c_, _drv_info_,
("rtw_cancel_all_timer23a:cancel set_scan_deny_timer!\n"));
("%s:cancel set_scan_deny_timer!\n", __func__));
del_timer_sync(&padapter->recvpriv.signal_stat_timer);
/* cancel dm timer */
......@@ -574,7 +574,8 @@ int rtw_free_drv_sw23a(struct rtw_adapter *padapter)
_rtw_free_xmit_priv23a(&padapter->xmitpriv);
_rtw_free_sta_priv23a(&padapter->stapriv);/* will free bcmc_stainfo here */
/* will free bcmc_stainfo here */
_rtw_free_sta_priv23a(&padapter->stapriv);
_rtw_free_recv_priv23a(&padapter->recvpriv);
......@@ -627,7 +628,11 @@ int rtw_drv_register_netdev(struct rtw_adapter *if1)
struct dvobj_priv *dvobj = if1->dvobj;
int i, status = _SUCCESS;
if (dvobj->iface_nums < IFACE_ID_MAX) {
if (dvobj->iface_nums >= IFACE_ID_MAX) {
status = _FAIL; /* -EINVAL */
goto exit;
}
for (i = 0; i < dvobj->iface_nums; i++) {
struct rtw_adapter *padapter = dvobj->padapters[i];
......@@ -640,13 +645,13 @@ int rtw_drv_register_netdev(struct rtw_adapter *if1)
name = if1->registrypriv.if2name;
else
name = "wlan%d";
status = _rtw_drv_register_netdev(padapter,
name);
status = _rtw_drv_register_netdev(padapter, name);
if (status != _SUCCESS)
break;
}
}
}
exit:
return status;
}
......@@ -840,8 +845,8 @@ static int netdev_close(struct net_device *pnetdev)
padapter->net_closed = true;
if (padapter->pwrctrlpriv.rf_pwrstate == rf_on) {
DBG_8723A("(2)871x_drv - drv_close, bup =%d, hw_init_completed =%d\n",
padapter->bup,
DBG_8723A("(2)871x_drv - drv_close, bup =%d, "
"hw_init_completed =%d\n", padapter->bup,
padapter->hw_init_completed);
/* s1. */
......
/******************************************************************************
*
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
******************************************************************************/
#define _OSDEP_SERVICE_C_
#include <osdep_service.h>
#include <drv_types.h>
#include <recv_osdep.h>
void _rtw_init_queue23a(struct rtw_queue *pqueue)
{
INIT_LIST_HEAD(&pqueue->queue);
spin_lock_init(&pqueue->lock);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment