mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Fix a number of sparse warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
96ff2341a9
commit
bf88fed9a4
33 changed files with 340 additions and 318 deletions
|
@ -127,19 +127,14 @@ static void update_BCNTIM(_adapter *padapter)
|
|||
*dst_ie++ = BIT(0);/*bitmap ctrl */
|
||||
else
|
||||
*dst_ie++ = 0;
|
||||
|
||||
if (tim_ielen == 4) {
|
||||
u8 pvb = 0;
|
||||
|
||||
if (pstapriv->tim_bitmap & 0x00fe)
|
||||
pvb = (u8)tim_bitmap_le;
|
||||
else if (pstapriv->tim_bitmap & 0xff00)
|
||||
pvb = (u8)(tim_bitmap_le >> 8);
|
||||
if (pstapriv->tim_bitmap & 0xff00)
|
||||
pvb = le16_to_cpu(tim_bitmap_le) >> 8;
|
||||
else
|
||||
pvb = (u8)tim_bitmap_le;
|
||||
|
||||
pvb = le16_to_cpu(tim_bitmap_le);
|
||||
*dst_ie++ = pvb;
|
||||
|
||||
} else if (tim_ielen == 5) {
|
||||
_rtw_memcpy(dst_ie, &tim_bitmap_le, 2);
|
||||
dst_ie += 2;
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
#include <hal_data.h>
|
||||
|
||||
/* #define BR_EXT_DEBUG */
|
||||
|
||||
|
@ -808,7 +809,6 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||
/* forward unknow IP packet to upper TCP/IP */
|
||||
RTW_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
if ((*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac + 4)) == 0) {
|
||||
void netdev_br_init(struct net_device *netdev);
|
||||
RTW_INFO("Re-init netdev_br_init() due to br_mac==0!\n");
|
||||
netdev_br_init(priv->pnetdev);
|
||||
}
|
||||
|
|
|
@ -4403,9 +4403,9 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
|||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
|
||||
if (st->local_naddr == local_naddr
|
||||
&& st->local_port == local_port
|
||||
&& st->local_port == cpu_to_be16(local_port)
|
||||
&& st->remote_naddr == remote_naddr
|
||||
&& st->remote_port == remote_port)
|
||||
&& st->remote_port == cpu_to_be16(remote_port))
|
||||
break;
|
||||
|
||||
plist = get_next(plist);
|
||||
|
@ -4440,9 +4440,9 @@ unlock:
|
|||
goto exit;
|
||||
|
||||
st->local_naddr = local_naddr;
|
||||
st->local_port = local_port;
|
||||
st->local_port = cpu_to_be16(local_port);
|
||||
st->remote_naddr = remote_naddr;
|
||||
st->remote_port = remote_port;
|
||||
st->remote_port = cpu_to_be16(remote_port);
|
||||
st->set_time = rtw_get_current_time();
|
||||
st->status = ST_STATUS_CHECK;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
|
|||
|
||||
u8 maskfileBuffer[64];
|
||||
/*------------------------Define local variable------------------------------*/
|
||||
BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
||||
static BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
||||
{
|
||||
int r = Offset / 16;
|
||||
int c = (Offset % 16) / 2;
|
||||
|
@ -60,7 +60,7 @@ BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
|||
return (result > 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
BOOLEAN efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
||||
static BOOLEAN efuse_IsMasked(PADAPTER pAdapter, u16 Offset)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
|
||||
|
||||
|
@ -1436,7 +1436,7 @@ u8 EfusePgPacketWrite_BT(
|
|||
#define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
|
||||
VOID efuse_PreUpdateAction(
|
||||
static VOID efuse_PreUpdateAction(
|
||||
PADAPTER pAdapter,
|
||||
pu4Byte BackupRegs)
|
||||
{
|
||||
|
@ -1462,7 +1462,7 @@ VOID efuse_PreUpdateAction(
|
|||
#endif
|
||||
}
|
||||
|
||||
VOID efuse_PostUpdateAction(
|
||||
static VOID efuse_PostUpdateAction(
|
||||
PADAPTER pAdapter,
|
||||
pu4Byte BackupRegs)
|
||||
{
|
||||
|
@ -1860,7 +1860,7 @@ Efuse_PgPacketWrite(IN PADAPTER pAdapter,
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
||||
IN u8 offset,
|
||||
IN u8 word_en,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <linux/fs.h>
|
||||
#endif
|
||||
#include <drv_types.h>
|
||||
|
||||
#include <hal_data.h>
|
||||
|
||||
u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
|
||||
u16 RTW_WPA_VERSION = 1;
|
||||
|
@ -1361,7 +1361,6 @@ func_exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
extern char *rtw_initmac;
|
||||
/**
|
||||
* rtw_macaddr_cfg - Decide the mac address used
|
||||
* @out: buf to store mac address decided
|
||||
|
|
|
@ -80,28 +80,24 @@ u8 _rtw_read8(_adapter *adapter, u32 addr)
|
|||
|
||||
u16 _rtw_read16(_adapter *adapter, u32 addr)
|
||||
{
|
||||
__le16 r_val;
|
||||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
__le16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_read16 = pintfhdl->io_ops._read16;
|
||||
|
||||
r_val = _read16(pintfhdl, addr);
|
||||
return le16_to_cpu(r_val);
|
||||
return _read16(pintfhdl, addr);
|
||||
}
|
||||
|
||||
u32 _rtw_read32(_adapter *adapter, u32 addr)
|
||||
{
|
||||
__le32 r_val;
|
||||
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
__le32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_read32 = pintfhdl->io_ops._read32;
|
||||
|
||||
r_val = _read32(pintfhdl, addr);
|
||||
return rtw_le32_to_cpu(r_val);
|
||||
return _read32(pintfhdl, addr);
|
||||
}
|
||||
|
||||
int _rtw_write8(_adapter *adapter, u32 addr, u8 val)
|
||||
|
|
|
@ -49,7 +49,7 @@ inline u8 rtw_odm_get_force_igi_lb(_adapter *adapter)
|
|||
return hal_data->u1ForcedIgiLb;
|
||||
}
|
||||
|
||||
void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
||||
static void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
||||
{
|
||||
RTW_PRINT_SEL(sel, "ADAPTIVITY_VERSION "ADAPTIVITY_VERSION"\n");
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
|||
#define RTW_ADAPTIVITY_EN_DISABLE 0
|
||||
#define RTW_ADAPTIVITY_EN_ENABLE 1
|
||||
|
||||
void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
||||
static void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
||||
{
|
||||
struct registry_priv *regsty = &adapter->registrypriv;
|
||||
struct mlme_priv *mlme = &adapter->mlmepriv;
|
||||
|
@ -77,7 +77,7 @@ void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
|||
#define RTW_ADAPTIVITY_MODE_NORMAL 0
|
||||
#define RTW_ADAPTIVITY_MODE_CARRIER_SENSE 1
|
||||
|
||||
void rtw_odm_adaptivity_mode_msg(void *sel, _adapter *adapter)
|
||||
static void rtw_odm_adaptivity_mode_msg(void *sel, _adapter *adapter)
|
||||
{
|
||||
struct registry_priv *regsty = &adapter->registrypriv;
|
||||
|
||||
|
@ -94,7 +94,7 @@ void rtw_odm_adaptivity_mode_msg(void *sel, _adapter *adapter)
|
|||
#define RTW_ADAPTIVITY_DML_DISABLE 0
|
||||
#define RTW_ADAPTIVITY_DML_ENABLE 1
|
||||
|
||||
void rtw_odm_adaptivity_dml_msg(void *sel, _adapter *adapter)
|
||||
static void rtw_odm_adaptivity_dml_msg(void *sel, _adapter *adapter)
|
||||
{
|
||||
struct registry_priv *regsty = &adapter->registrypriv;
|
||||
|
||||
|
@ -108,7 +108,7 @@ void rtw_odm_adaptivity_dml_msg(void *sel, _adapter *adapter)
|
|||
_RTW_PRINT_SEL(sel, "INVALID\n");
|
||||
}
|
||||
|
||||
void rtw_odm_adaptivity_dc_backoff_msg(void *sel, _adapter *adapter)
|
||||
static void rtw_odm_adaptivity_dc_backoff_msg(void *sel, _adapter *adapter)
|
||||
{
|
||||
struct registry_priv *regsty = &adapter->registrypriv;
|
||||
|
||||
|
|
|
@ -2339,8 +2339,8 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
|
|||
_rtw_memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
|
||||
|
||||
if (!bsnaphdr) {
|
||||
len = htons(len);
|
||||
_rtw_memcpy(ptr + 12, &len, 2);
|
||||
be_tmp = htons(len);
|
||||
_rtw_memcpy(ptr + 12, &be_tmp, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ bool sreset_inprogress(_adapter *padapter)
|
|||
#endif
|
||||
}
|
||||
|
||||
void sreset_restore_security_station(_adapter *padapter)
|
||||
static void sreset_restore_security_station(_adapter *padapter)
|
||||
{
|
||||
u8 EntryId = 0;
|
||||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||
|
@ -158,7 +158,7 @@ void sreset_restore_security_station(_adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
void sreset_restore_network_station(_adapter *padapter)
|
||||
static void sreset_restore_network_station(_adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
@ -225,13 +225,13 @@ void sreset_restore_network_station(_adapter *padapter)
|
|||
|
||||
mlmeext_joinbss_event_callback(padapter, 1);
|
||||
/* restore Sequence No. */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_RESTORE_HW_SEQ, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_RESTORE_HW_SEQ, NULL);
|
||||
|
||||
sreset_restore_security_station(padapter);
|
||||
}
|
||||
|
||||
|
||||
void sreset_restore_network_status(_adapter *padapter)
|
||||
static void sreset_restore_network_status(_adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
|
|
@ -21,14 +21,15 @@
|
|||
|
||||
#include <drv_types.h>
|
||||
|
||||
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
static bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
{
|
||||
if (ntohs(*((u16 *)local_port)) == 5001 || ntohs(*((u16 *)remote_port)) == 5001)
|
||||
if (ntohs(*((__be16 *)local_port)) == 5001 ||
|
||||
ntohs(*((__be16 *)remote_port)) == 5001)
|
||||
return _TRUE;
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
struct st_register test_st_reg = {
|
||||
static struct st_register test_st_reg = {
|
||||
.s_proto = 0x06,
|
||||
.rule = test_st_match_rule,
|
||||
};
|
||||
|
@ -458,109 +459,103 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) {
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
psta = NULL;
|
||||
} else {
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
goto exit;
|
||||
}
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
||||
rtw_list_delete(&(psta->list));
|
||||
rtw_list_delete(&(psta->list));
|
||||
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
|
||||
tmp_aid = psta->aid;
|
||||
tmp_aid = psta->aid;
|
||||
|
||||
_rtw_init_stainfo(psta);
|
||||
_rtw_init_stainfo(psta);
|
||||
|
||||
psta->padapter = pstapriv->padapter;
|
||||
psta->padapter = pstapriv->padapter;
|
||||
|
||||
_rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
||||
_rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
||||
|
||||
index = wifi_mac_hash(hwaddr);
|
||||
index = wifi_mac_hash(hwaddr);
|
||||
|
||||
|
||||
if (index >= NUM_STA) {
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
}
|
||||
phash_list = &(pstapriv->sta_hash[index]);
|
||||
if (index >= NUM_STA) {
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
}
|
||||
phash_list = &(pstapriv->sta_hash[index]);
|
||||
|
||||
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
|
||||
rtw_list_insert_tail(&psta->hash_list, phash_list);
|
||||
rtw_list_insert_tail(&psta->hash_list, phash_list);
|
||||
|
||||
pstapriv->asoc_sta_count++;
|
||||
pstapriv->asoc_sta_count++;
|
||||
|
||||
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
|
||||
/* Commented by Albert 2009/08/13
|
||||
* For the SMC router, the sequence number of first packet of WPS handshake will be 0.
|
||||
* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable.
|
||||
* So, we initialize the tid_rxseq variable as the 0xffff. */
|
||||
/* Commented by Albert 2009/08/13
|
||||
* For the SMC router, the sequence number of first packet of WPS handshake will be 0.
|
||||
* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable.
|
||||
* So, we initialize the tid_rxseq variable as the 0xffff. */
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
_rtw_memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
|
||||
_rtw_memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
_rtw_memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
|
||||
_rtw_memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
|
||||
}
|
||||
|
||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
init_dot11w_expire_timer(pstapriv->padapter, psta);
|
||||
init_dot11w_expire_timer(pstapriv->padapter, psta);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_TDLS
|
||||
rtw_init_tdls_timer(pstapriv->padapter, psta);
|
||||
rtw_init_tdls_timer(pstapriv->padapter, psta);
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
/* for A-MPDU Rx reordering buffer control */
|
||||
for (i = 0; i < 16 ; i++) {
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
/* for A-MPDU Rx reordering buffer control */
|
||||
for (i = 0; i < 16 ; i++) {
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
RTW_INFO("DBG_RX_SEQ %s:%d IndicateSeq: %d\n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
RTW_INFO("DBG_RX_SEQ %s:%d IndicateSeq: %d\n", __FUNCTION__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b = 0xffff;
|
||||
/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
|
||||
preorder_ctrl->wsize_b = 64;/* 64; */
|
||||
preorder_ctrl->ampdu_size = RX_AMPDU_SIZE_INVALID;
|
||||
preorder_ctrl->wend_b = 0xffff;
|
||||
/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
|
||||
preorder_ctrl->wsize_b = 64;/* 64; */
|
||||
preorder_ctrl->ampdu_size = RX_AMPDU_SIZE_INVALID;
|
||||
|
||||
_rtw_init_queue(&preorder_ctrl->pending_recvframe_queue);
|
||||
|
||||
rtw_init_recv_timer(preorder_ctrl);
|
||||
}
|
||||
|
||||
|
||||
/* init for DM */
|
||||
psta->rssi_stat.undecorated_smoothed_pwdb = (-1);
|
||||
psta->rssi_stat.undecorated_smoothed_cck = (-1);
|
||||
#ifdef CONFIG_ATMEL_RC_PATCH
|
||||
psta->flag_atmel_rc = 0;
|
||||
#endif
|
||||
/* init for the sequence number of received management frame */
|
||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
psta->ra_rpt_linked = _FALSE;
|
||||
|
||||
rtw_alloc_macid(pstapriv->padapter, psta);
|
||||
_rtw_init_queue(&preorder_ctrl->pending_recvframe_queue);
|
||||
|
||||
rtw_init_recv_timer(preorder_ctrl);
|
||||
}
|
||||
|
||||
|
||||
/* init for DM */
|
||||
psta->rssi_stat.undecorated_smoothed_pwdb = (-1);
|
||||
psta->rssi_stat.undecorated_smoothed_cck = (-1);
|
||||
#ifdef CONFIG_ATMEL_RC_PATCH
|
||||
psta->flag_atmel_rc = 0;
|
||||
#endif
|
||||
/* init for the sequence number of received management frame */
|
||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
psta->ra_rpt_linked = _FALSE;
|
||||
|
||||
rtw_alloc_macid(pstapriv->padapter, psta);
|
||||
|
||||
exit:
|
||||
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
|
||||
|
||||
if (psta)
|
||||
rtw_mi_update_iface_status(&(pstapriv->padapter->mlmepriv), 0);
|
||||
|
||||
return psta;
|
||||
}
|
||||
|
||||
|
||||
/* using pstapriv->sta_hash_lock to protect */
|
||||
u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
||||
{
|
||||
|
|
|
@ -3707,7 +3707,7 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
|||
/* if (priv->dev->br_port &&
|
||||
* !memcmp(skb->data+MACADDRLEN, priv->br_mac, MACADDRLEN)) { */
|
||||
#if 1
|
||||
if (*((unsigned short *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
if (*((__be16 *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
is_vlan_tag = 1;
|
||||
vlan_hdr = *((unsigned short *)(skb->data + MACADDRLEN * 2 + 2));
|
||||
for (i = 0; i < 6; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue