Bug 34552

Summary: sis190 problem with changed MAC address
Product: Drivers Reporter: klement2
Component: NetworkAssignee: Francois Romieu (romieu)
Status: RESOLVED CODE_FIX    
Severity: high CC: romieu
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: ALL Subsystem:
Regression: No Bisected commit-id:
Attachments: patch that will do it (tested)
more safe version of the patch Signed-off-by: Klement Fish <klement2@azet.sk>

Description klement2 2011-05-05 06:34:40 UTC
Hi,

I had no luck to obtain DHCP response when I changed the MAC address of eth0, which is created by sis190 module:

ifconfig eth0 down
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
ifconfig eth0 up

<- this was ok, MAC is ok (ISP requires it), but dhclient eth0 no luck

The problem seems to be the check of MAC address in the hardware for Rx packets, sis190.c, function sis190_init_rxfilter().

static const struct net_device_ops sis190_netdev_ops = {
...
.ndo_set_mac_address    = eth_mac_addr,
...

but eth_mac_addr() does not call sis190_init_rxfilter() to change the MAC address check in the hardware. Probably it would be better to create a function like .ndo_set_mac_address = si190_set_mac_address, which would call both eth_mac_addr and sis190_init_rxfilter.

As a workaround I set eth0 to promiscuous mode, but that's not very cool :)

ifconfig eth0 promisc
Comment 1 klement2 2011-07-09 19:50:45 UTC
Created attachment 65112 [details]
patch that will do it (tested)
Comment 2 klement2 2011-07-26 14:54:26 UTC
Created attachment 66722 [details]
more safe version of the patch
Signed-off-by: Klement Fish <klement2@azet.sk>
Comment 3 Francois Romieu 2011-07-26 17:36:01 UTC
Your patch looks good but I need a Signed-off-by with your first / family name.

Thanks.

-- 
Ueimor
Comment 4 Francois Romieu 2011-07-29 07:28:41 UTC
The patch is included in davem's net branch as
fe66101f14813b77d84f6450d51772a2af2b81a1

It should be included in the first post 3.0.0 -rc.

Thanks.

-- 
Ueimor