Changeset 15141
- Timestamp:
- 09/10/10 12:44:15 (3 years ago)
- File:
-
- 1 edited
-
src/router/services/sysinit/sysinit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/services/sysinit/sysinit.c
r15126 r15141 298 298 nvram_set("ath1_wpa_psk", wpapsk); 299 299 } 300 #endif 301 300 struct ifreq ifr; 301 int s; 302 303 if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW))) { 304 char eabuf[32]; 305 306 strncpy(ifr.ifr_name, "wifi0", IFNAMSIZ); 307 ioctl(s, SIOCGIFHWADDR, &ifr); 308 close(s); 309 unsigned char *edata = 310 (unsigned char *)ifr.ifr_hwaddr.sa_data; 311 sprintf(eabuf, "BUFFALO-%02X%02X%02X", edata[3] & 0xff, 312 edata[4] & 0xff, edata[5] & 0xff); 313 nvram_set("ath0_ssid", eabuf); 314 } 315 if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW))) { 316 char eabuf[32]; 317 318 strncpy(ifr.ifr_name, "wifi1", IFNAMSIZ); 319 ioctl(s, SIOCGIFHWADDR, &ifr); 320 close(s); 321 unsigned char *edata = 322 (unsigned char *)ifr.ifr_hwaddr.sa_data; 323 sprintf(eabuf, "BUFFALO-%02X%02X%02X", edata[3] & 0xff, 324 edata[4] & 0xff, edata[5] & 0xff); 325 nvram_set("ath1_ssid", eabuf); 326 } 327 #else 302 328 struct ifreq ifr; 303 329 int s; … … 316 342 edata[4] & 0xff, edata[5] & 0xff); 317 343 nvram_set("ath0_ssid", eabuf); 318 #ifdef HAVE_WZRHPAG300NH 319 nvram_set("ath1_ssid", eabuf); 320 #endif 321 } 344 } 345 #endif 322 346 323 347 char *region = getUEnv("region");
Note: See TracChangeset
for help on using the changeset viewer.
