Hi Bastian
Thanks for your response!
>you can configure this via uci:
>option macaddr ...
>if you want to write to mtd0, you must modify e.g.:
>/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.8.13/drivers/mtd/tplinkpart.c
>and comment/remove the line:
>parts[0].mask_flags = MTD_WRITEABLE;
>recompile and you can do:
>mtd write /tmp/myuboot.bin u-boot
I have removed MTD_WRITEABLE for u-boot partition in tplinkpart.c, and write
modified uboot image to /dev/mtd0,
and modify "option macaddr" in /etc/config/wireless.
After re-poweron device, wlan0 can enter promiscuous mode, but after 2 seconds,
wlan0 enter disabled state:
Jan 1 00:00:50 OpenWrt kern.info kernel: [ 50.350000] device wlan0 entered
promiscuous mode
Jan 1 00:00:50 OpenWrt kern.info kernel: [ 50.400000] br-lan: port 2(wlan0)
entered forwarding state
Jan 1 00:00:50 OpenWrt kern.info kernel: [ 50.410000] br-lan: port 2(wlan0)
entered forwarding state
Jan 1 00:00:53 OpenWrt kern.info kernel: [ 53.610000] device wlan0 left
promiscuous mode
Jan 1 00:00:53 OpenWrt kern.info kernel: [ 53.610000] br-lan: port 2(wlan0)
entered disabled state
If any suggestion? Thanks!
At 2013-07-05 23:21:53,jinzhcheng <[email protected]> wrote:
Dear Sir
I try to modify mach-tl-wr703n.c:
static void __init tl_wr703n_setup(void)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
printk("%s\n", __func__);
// set mac test, will be set same in /etc/config/wireless
*mac = 0x84;
*(mac+1) = 0x5d;
*(mac+2) = 0xd8;
*(mac+3) = 0x0;
*(mac+4) = 0x31;
*(mac+5) = 0x88;
/* disable PHY_SWAP and PHY_ADDR_SWAP bits *
... ...
but i can't modify the content of 0x1f01fc00 which is in uboot partition region
and I try to write /dev/mtd0 in userspace, but it failed too.
If any methods to modify mac?
Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20130706/52367edd/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
------------------------------
End of openwrt-devel Digest, Vol 91, Issue 9
********************************************_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel