diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2012-05-29 10:11:04 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2012-05-29 10:11:04 -0300 |
commit | 8e411a93315bd86d41af71783a10ec5bf717ee33 (patch) | |
tree | e9a47c1112a961e5a912438992091ef7c849a656 /recipes-kernel | |
parent | 84a99ba6d653f7b9742929bc8c4e473b4b2d1701 (diff) | |
download | meta-fsl-arm-8e411a93315bd86d41af71783a10ec5bf717ee33.tar.gz |
linux-imx (2.6.35.3): smsc95xx: generate random MAC address once
The smsc95xx driver currently generates a new random MAC address
every time the interface is brought up. This makes it impossible to
override using the standard `ifconfig hw ether` approach.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/linux/linux-imx-2.6.35.3/smsc95xx-randomize-mac-once.patch | 51 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-imx_2.6.35.3.bb | 3 |
2 files changed, 53 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-imx-2.6.35.3/smsc95xx-randomize-mac-once.patch b/recipes-kernel/linux/linux-imx-2.6.35.3/smsc95xx-randomize-mac-once.patch new file mode 100644 index 0000000..18a5a7e --- /dev/null +++ b/recipes-kernel/linux/linux-imx-2.6.35.3/smsc95xx-randomize-mac-once.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | smsc95xx: generate random MAC address once, not every ifup | ||
2 | |||
3 | The smsc95xx driver currently generates a new random MAC address | ||
4 | every time the interface is brought up. This makes it impossible to | ||
5 | override using the standard `ifconfig hw ether` approach. | ||
6 | |||
7 | Past patches tried to make the MAC address a module parameter or | ||
8 | base it off the die ID, but it seems to me much simpler (and | ||
9 | hopefully less controversial) to stick with the current random | ||
10 | generation scheme, but allow the user to change the address. | ||
11 | |||
12 | This patch does exactly that - it moves the random address | ||
13 | generation from smsc95xx_reset() into smsc95xx_bind(), so that it is | ||
14 | done once on module load, not on every ifup. The user can then | ||
15 | override this using the standard mechanisms. | ||
16 | |||
17 | Applies against 2.6.35 and linux-2.6 head. | ||
18 | |||
19 | Upstream-Status: Backport [2.6.36] | ||
20 | |||
21 | Signed-off-by: Bernard Blackham <b-omap@largestprime.net> | ||
22 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
23 | --- | ||
24 | drivers/net/usb/smsc95xx.c | 4 ++-- | ||
25 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c | ||
28 | index 12a3c88..65cb1ab 100644 | ||
29 | --- a/drivers/net/usb/smsc95xx.c | ||
30 | +++ b/drivers/net/usb/smsc95xx.c | ||
31 | @@ -805,8 +805,6 @@ static int smsc95xx_reset(struct usbnet *dev) | ||
32 | return ret; | ||
33 | } | ||
34 | |||
35 | - smsc95xx_init_mac_address(dev); | ||
36 | - | ||
37 | ret = smsc95xx_set_mac_address(dev); | ||
38 | if (ret < 0) | ||
39 | return ret; | ||
40 | @@ -1047,6 +1045,8 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) | ||
41 | pdata->use_tx_csum = DEFAULT_TX_CSUM_ENABLE; | ||
42 | pdata->use_rx_csum = DEFAULT_RX_CSUM_ENABLE; | ||
43 | |||
44 | + smsc95xx_init_mac_address(dev); | ||
45 | + | ||
46 | /* Init all registers */ | ||
47 | ret = smsc95xx_reset(dev); | ||
48 | |||
49 | -- | ||
50 | 1.7.7.6 | ||
51 | |||
diff --git a/recipes-kernel/linux/linux-imx_2.6.35.3.bb b/recipes-kernel/linux/linux-imx_2.6.35.3.bb index 6c8822f..6a0ccd3 100644 --- a/recipes-kernel/linux/linux-imx_2.6.35.3.bb +++ b/recipes-kernel/linux/linux-imx_2.6.35.3.bb | |||
@@ -4,7 +4,7 @@ | |||
4 | DESCRIPTION = "Linux kernel for imx platforms" | 4 | DESCRIPTION = "Linux kernel for imx platforms" |
5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
7 | PR = "r18" | 7 | PR = "r19" |
8 | 8 | ||
9 | inherit kernel | 9 | inherit kernel |
10 | COMPATIBLE_MACHINE = "(mxs|mx5)" | 10 | COMPATIBLE_MACHINE = "(mxs|mx5)" |
@@ -31,6 +31,7 @@ SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;tag=rel_imx_2.6.35_11.0 | |||
31 | file://mx28-removecpufreq.patch \ | 31 | file://mx28-removecpufreq.patch \ |
32 | file://mxs-duart-use-ttyAMA-for-device-name.patch \ | 32 | file://mxs-duart-use-ttyAMA-for-device-name.patch \ |
33 | file://w1-fix-support-multiple-master.patch \ | 33 | file://w1-fix-support-multiple-master.patch \ |
34 | file://smsc95xx-randomize-mac-once.patch \ | ||
34 | file://0001-mx53_loco-add-USR-led-support.patch \ | 35 | file://0001-mx53_loco-add-USR-led-support.patch \ |
35 | file://001_Add_accept4_syscall.patch \ | 36 | file://001_Add_accept4_syscall.patch \ |
36 | file://002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch \ | 37 | file://002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch \ |