Add support for conditionally setting the ip_alignement flag AX_RX_CTL_IPE in AX_RX_CTL and make sure that AX_RX_CTL_DROPCRCERR is also set to be consistent with the initial configuration in ax88179_reset() Signed-off-by: Birger Koblitz --- drivers/net/usb/ax88179_178a.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index 001faa66efb29df1e09fa3fdc7aa582ab254baca..12fc20e5f76e6906c5d61f5b0d15b9fcb5b60210 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -1329,10 +1329,14 @@ static int ax179a_vlan_rx_add_vid(struct net_device *net, __be16 proto, u16 vid) static void ax88179_set_multicast(struct net_device *net) { struct usbnet *dev = netdev_priv(net); - struct ax88179_data *data = dev->driver_priv; u8 *m_filter = ((u8 *)dev->data); + struct ax88179_data *data; + + data = dev->driver_priv; - data->rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_IPE); + data->rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_DROPCRCERR); + if (data->ip_align) + data->rxctl |= AX_RX_CTL_IPE; if (net->flags & IFF_PROMISC) { data->rxctl |= AX_RX_CTL_PRO; -- 2.47.3