mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
add SIOCSIWESSID
SVN-Revision: 579
This commit is contained in:
parent
46259ab4a2
commit
6652225166
@ -81,7 +81,7 @@ static int wlcompat_ioctl_getiwrange(struct net_device *dev,
|
|||||||
range->max_pmt = 65535 * 1000;
|
range->max_pmt = 65535 * 1000;
|
||||||
|
|
||||||
range->txpower_capa = IW_TXPOW_MWATT;
|
range->txpower_capa = IW_TXPOW_MWATT;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +119,17 @@ static int wlcompat_ioctl(struct net_device *dev,
|
|||||||
memcpy(extra,ssid.SSID,ssid.SSID_len + 1);
|
memcpy(extra,ssid.SSID,ssid.SSID_len + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SIOCSIWESSID:
|
||||||
|
{
|
||||||
|
wlc_ssid_t ssid;
|
||||||
|
memset(&ssid, 0, sizeof(ssid));
|
||||||
|
ssid.SSID_len = strlen(extra);
|
||||||
|
if (ssid.SSID_len > WLC_ESSID_MAX_SIZE)
|
||||||
|
ssid.SSID_len = WLC_ESSID_MAX_SIZE;
|
||||||
|
memcpy(ssid.SSID, extra, ssid.SSID_len);
|
||||||
|
wl_ioctl(dev, WLC_SET_SSID, &ssid, sizeof(ssid));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case SIOCGIWRTS:
|
case SIOCGIWRTS:
|
||||||
{
|
{
|
||||||
wl_ioctl(dev,WLC_GET_RTS,&(wrqu->rts.value),sizeof(int));
|
wl_ioctl(dev,WLC_GET_RTS,&(wrqu->rts.value),sizeof(int));
|
||||||
@ -148,6 +159,11 @@ static int wlcompat_ioctl(struct net_device *dev,
|
|||||||
err = wlcompat_ioctl_getiwrange(dev, extra);
|
err = wlcompat_ioctl_getiwrange(dev, extra);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
err = -EINVAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
@ -180,7 +196,7 @@ static const iw_handler wlcompat_handler[] = {
|
|||||||
NULL, /* SIOCGIWAPLIST */
|
NULL, /* SIOCGIWAPLIST */
|
||||||
NULL, /* -- hole -- */
|
NULL, /* -- hole -- */
|
||||||
NULL, /* -- hole -- */
|
NULL, /* -- hole -- */
|
||||||
NULL, /* SIOCSIWESSID */
|
wlcompat_ioctl, /* SIOCSIWESSID */
|
||||||
wlcompat_ioctl, /* SIOCGIWESSID */
|
wlcompat_ioctl, /* SIOCGIWESSID */
|
||||||
NULL, /* SIOCSIWNICKN */
|
NULL, /* SIOCSIWNICKN */
|
||||||
NULL, /* SIOCGIWNICKN */
|
NULL, /* SIOCGIWNICKN */
|
||||||
|
Loading…
Reference in New Issue
Block a user