Merge branch 'stmmac-fixes'
Jose Abreu says: ==================== net: stmmac: Fixes for -net Fixes for -net. More info in commit logs. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -448,7 +448,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
|
|||||||
value |= GMAC_PACKET_FILTER_HPF;
|
value |= GMAC_PACKET_FILTER_HPF;
|
||||||
|
|
||||||
/* Handle multiple unicast addresses */
|
/* Handle multiple unicast addresses */
|
||||||
if (netdev_uc_count(dev) > GMAC_MAX_PERFECT_ADDRESSES) {
|
if (netdev_uc_count(dev) > hw->unicast_filter_entries) {
|
||||||
/* Switch to promiscuous mode if more than 128 addrs
|
/* Switch to promiscuous mode if more than 128 addrs
|
||||||
* are required
|
* are required
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -487,8 +487,8 @@ static int stmmac_filter_check(struct stmmac_priv *priv)
|
|||||||
|
|
||||||
static int stmmac_test_hfilt(struct stmmac_priv *priv)
|
static int stmmac_test_hfilt(struct stmmac_priv *priv)
|
||||||
{
|
{
|
||||||
unsigned char gd_addr[ETH_ALEN] = {0x01, 0x00, 0xcc, 0xcc, 0xdd, 0xdd};
|
unsigned char gd_addr[ETH_ALEN] = {0x01, 0xee, 0xdd, 0xcc, 0xbb, 0xaa};
|
||||||
unsigned char bd_addr[ETH_ALEN] = {0x09, 0x00, 0xaa, 0xaa, 0xbb, 0xbb};
|
unsigned char bd_addr[ETH_ALEN] = {0x01, 0x01, 0x02, 0x03, 0x04, 0x05};
|
||||||
struct stmmac_packet_attrs attr = { };
|
struct stmmac_packet_attrs attr = { };
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -496,6 +496,9 @@ static int stmmac_test_hfilt(struct stmmac_priv *priv)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
if (netdev_mc_count(priv->dev) >= priv->hw->multicast_filter_bins)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
ret = dev_mc_add(priv->dev, gd_addr);
|
ret = dev_mc_add(priv->dev, gd_addr);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -573,6 +576,8 @@ static int stmmac_test_mcfilt(struct stmmac_priv *priv)
|
|||||||
|
|
||||||
if (stmmac_filter_check(priv))
|
if (stmmac_filter_check(priv))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
if (!priv->hw->multicast_filter_bins)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
/* Remove all MC addresses */
|
/* Remove all MC addresses */
|
||||||
__dev_mc_unsync(priv->dev, NULL);
|
__dev_mc_unsync(priv->dev, NULL);
|
||||||
@@ -611,6 +616,8 @@ static int stmmac_test_ucfilt(struct stmmac_priv *priv)
|
|||||||
|
|
||||||
if (stmmac_filter_check(priv))
|
if (stmmac_filter_check(priv))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
if (!priv->hw->multicast_filter_bins)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
/* Remove all UC addresses */
|
/* Remove all UC addresses */
|
||||||
__dev_uc_unsync(priv->dev, NULL);
|
__dev_uc_unsync(priv->dev, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user