mirror of git://git.sysmocom.de/ofono
stedriver: remove unsupported CAIF socket ioctls
This commit is contained in:
parent
2c9a2b8a99
commit
5a935a43fd
|
@ -173,26 +173,7 @@ static struct conn_info *conn_info_create(unsigned int device,
|
||||||
*/
|
*/
|
||||||
static gboolean caif_if_create(const char *interface, unsigned int connid)
|
static gboolean caif_if_create(const char *interface, unsigned int connid)
|
||||||
{
|
{
|
||||||
int s;
|
return FALSE;
|
||||||
static struct ifcaif_param param;
|
|
||||||
static struct ifreq ifr;
|
|
||||||
|
|
||||||
param.ipv4_connid = connid;
|
|
||||||
ifr.ifr_data = (void *) ¶m;
|
|
||||||
strcpy(ifr.ifr_name, interface);
|
|
||||||
|
|
||||||
s = socket(AF_CAIF, SOCK_SEQPACKET, CAIFPROTO_AT);
|
|
||||||
if (s < 0) {
|
|
||||||
DBG("Failed to create socket for CAIF interface");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ioctl(s, SIOCCAIFNETNEW, &ifr) < 0) {
|
|
||||||
DBG("Failed to create IP interface for CAIF");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -200,32 +181,7 @@ static gboolean caif_if_create(const char *interface, unsigned int connid)
|
||||||
*/
|
*/
|
||||||
static gboolean caif_if_remove(const char *interface, unsigned int connid)
|
static gboolean caif_if_remove(const char *interface, unsigned int connid)
|
||||||
{
|
{
|
||||||
int s;
|
return FALSE;
|
||||||
static struct ifcaif_param param;
|
|
||||||
static struct ifreq ifr;
|
|
||||||
|
|
||||||
param.ipv4_connid = connid;
|
|
||||||
ifr.ifr_data = (void *) ¶m;
|
|
||||||
strcpy(ifr.ifr_name, interface);
|
|
||||||
|
|
||||||
s = socket(AF_CAIF, SOCK_SEQPACKET, CAIFPROTO_AT);
|
|
||||||
if (s < 0) {
|
|
||||||
DBG("Failed to create socket for CAIF interface");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ioctl(s, SIOCGIFINDEX, &ifr) != 0) {
|
|
||||||
DBG("Did not find interface (%s) to remove",
|
|
||||||
interface);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ioctl(s, SIOCCAIFNETREMOVE, &ifr) < 0) {
|
|
||||||
DBG("Failed to remove IP interface for CAIF");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ste_eppsd_down_cb(gboolean ok, GAtResult *result,
|
static void ste_eppsd_down_cb(gboolean ok, GAtResult *result,
|
||||||
|
|
Loading…
Reference in New Issue