[wireless][wapi] add extend api for private needs
Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
parent
002e31c56d
commit
c5541bfb56
@ -963,6 +963,16 @@ int wapi_set_pta_prio(int sock, FAR const char *ifname,
|
||||
int wapi_get_pta_prio(int sock, FAR const char *ifname,
|
||||
enum wapi_pta_prio_e *pta_prio);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: wapi_extend_params
|
||||
*
|
||||
* Description:
|
||||
* wapi extension interface for privatization method.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int wapi_extend_params(int sock, int cmd, FAR struct iwreq *wrq);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1628,3 +1628,34 @@ int wapi_get_pta_prio(int sock, FAR const char *ifname,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: wapi_extend_params
|
||||
*
|
||||
* Description:
|
||||
* wapi extension interface for privatization method.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int wapi_extend_params(int sock, int cmd, FAR struct iwreq *wrq)
|
||||
{
|
||||
int ret;
|
||||
|
||||
WAPI_VALIDATE_PTR(wrq);
|
||||
|
||||
if (cmd < SIOCIWFIRSTPRIV || cmd > SIOCIWLASTPRIV)
|
||||
{
|
||||
wlerr("extend ioctl cmd invalid");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = ioctl(sock, cmd, (unsigned long)((uintptr_t)wrq));
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
wlerr("extend ioctl(%d): %d", cmd, errcode);
|
||||
ret = -errcode;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user