net: stmmac: Fix sparse warning
The VID is converted to le16 so the variable must be __le16 type.
Reported-by: kbuild test robot <lkp@intel.com>
Fixes: c7ab0b8088
("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
29711306ce
commit
a24cae7012
@ -733,7 +733,7 @@ static void dwmac4_set_mac_loopback(void __iomem *ioaddr, bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void dwmac4_update_vlan_hash(struct mac_device_info *hw, u32 hash,
|
static void dwmac4_update_vlan_hash(struct mac_device_info *hw, u32 hash,
|
||||||
u16 perfect_match, bool is_double)
|
__le16 perfect_match, bool is_double)
|
||||||
{
|
{
|
||||||
void __iomem *ioaddr = hw->pcsr;
|
void __iomem *ioaddr = hw->pcsr;
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ static int dwxgmac2_rss_configure(struct mac_device_info *hw,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void dwxgmac2_update_vlan_hash(struct mac_device_info *hw, u32 hash,
|
static void dwxgmac2_update_vlan_hash(struct mac_device_info *hw, u32 hash,
|
||||||
u16 perfect_match, bool is_double)
|
__le16 perfect_match, bool is_double)
|
||||||
{
|
{
|
||||||
void __iomem *ioaddr = hw->pcsr;
|
void __iomem *ioaddr = hw->pcsr;
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ struct stmmac_ops {
|
|||||||
struct stmmac_rss *cfg, u32 num_rxq);
|
struct stmmac_rss *cfg, u32 num_rxq);
|
||||||
/* VLAN */
|
/* VLAN */
|
||||||
void (*update_vlan_hash)(struct mac_device_info *hw, u32 hash,
|
void (*update_vlan_hash)(struct mac_device_info *hw, u32 hash,
|
||||||
u16 perfect_match, bool is_double);
|
__le16 perfect_match, bool is_double);
|
||||||
void (*enable_vlan)(struct mac_device_info *hw, u32 type);
|
void (*enable_vlan)(struct mac_device_info *hw, u32 type);
|
||||||
/* TX Timestamp */
|
/* TX Timestamp */
|
||||||
int (*get_mac_tx_timestamp)(struct mac_device_info *hw, u64 *ts);
|
int (*get_mac_tx_timestamp)(struct mac_device_info *hw, u64 *ts);
|
||||||
|
@ -4214,6 +4214,7 @@ static u32 stmmac_vid_crc32_le(__le16 vid_le)
|
|||||||
static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
|
static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
|
||||||
{
|
{
|
||||||
u32 crc, hash = 0;
|
u32 crc, hash = 0;
|
||||||
|
__le16 pmatch = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
u16 vid = 0;
|
u16 vid = 0;
|
||||||
|
|
||||||
@ -4228,11 +4229,11 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
|
|||||||
if (count > 2) /* VID = 0 always passes filter */
|
if (count > 2) /* VID = 0 always passes filter */
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
vid = cpu_to_le16(vid);
|
pmatch = cpu_to_le16(vid);
|
||||||
hash = 0;
|
hash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stmmac_update_vlan_hash(priv, priv->hw, hash, vid, is_double);
|
return stmmac_update_vlan_hash(priv, priv->hw, hash, pmatch, is_double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid)
|
static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid)
|
||||||
|
Loading…
Reference in New Issue
Block a user