Bug 34552 - sis190 problem with changed MAC address
Summary: sis190 problem with changed MAC address
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 06:34 UTC by klement2
Modified: 2016-12-15 20:19 UTC (History)
1 user (show)

See Also:
Kernel Version: ALL
Subsystem:
Regression: No
Bisected commit-id:


Attachments
patch that will do it (tested) (806 bytes, patch)
2011-07-09 19:50 UTC, klement2
Details | Diff
more safe version of the patch Signed-off-by: Klement Fish <klement2@azet.sk> (822 bytes, patch)
2011-07-26 14:54 UTC, klement2
Details | Diff

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

Note You need to log in before you can comment on or make changes to this bug.