summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-05-11 18:38:46 +0300
committerAki Niemi <aki.niemi@nokia.com>2010-05-17 13:52:13 +0300
commitd44444562b2b5b934bb049f11b5eb98db1eb9d2e (patch)
tree6469c2b84df4889c8eee7cf3749d989895338df7 /drivers
parent3e079877769d87589efbf0b96391e0435a107b91 (diff)
Make isimodem use linkstate directly
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isimodem/isimodem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isimodem/isimodem.c b/drivers/isimodem/isimodem.c
index 92a0320c..4085a55c 100644
--- a/drivers/isimodem/isimodem.c
+++ b/drivers/isimodem/isimodem.c
@@ -64,10 +64,10 @@ struct isi_data {
GIsiModem *idx;
GIsiClient *client;
GPhonetNetlink *link;
+ GPhonetLinkState linkstate;
unsigned interval;
int reported;
int mtc_state;
- int iface_up;
};
static void report_powered(struct isi_data *isi, ofono_bool_t powered)
@@ -131,7 +131,7 @@ static bool mtc_poll_query_cb(GIsiClient *client, const void *restrict data,
MTC_STATE_QUERY_REQ, 0x00, 0x00
};
- if (!isi->iface_up)
+ if (isi->linkstate != PN_LINK_UP)
return true;
isi->interval *= 2;
@@ -197,7 +197,7 @@ static void reachable_cb(GIsiClient *client, bool alive, uint16_t object,
if (!alive) {
DBG("MTC client: %s", strerror(-g_isi_client_error(client)));
- if (isi->iface_up)
+ if (isi->linkstate == PN_LINK_UP)
g_isi_request_make(client, msg, sizeof(msg),
isi->interval = MTC_TIMEOUT,
mtc_poll_query_cb, opaque);
@@ -227,7 +227,7 @@ static void phonet_status_cb(GIsiModem *idx,
st == PN_LINK_REMOVED ? "removed" :
st == PN_LINK_DOWN ? "down" : "up");
- isi->iface_up = st == PN_LINK_UP;
+ isi->linkstate = st;
if (st == PN_LINK_UP)
g_isi_verify(isi->client, reachable_cb, isi);