calypso: Provide hangup_all and hangup_active
authorDenis Kenzior <denkenz@gmail.com>
Fri, 24 Sep 2010 02:02:40 +0000 (21:02 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 24 Sep 2010 02:55:58 +0000 (21:55 -0500)
On Calypso, ATH hangs up all calls except waiting calls and CHUP hangs
up only active calls, but not held or waiting.

drivers/calypsomodem/voicecall.c

index 05bae89..a669cb7 100644 (file)
@@ -119,12 +119,18 @@ static void calypso_answer(struct ofono_voicecall *vc,
        calypso_template(vc, "ATA", cb, data);
 }
 
-static void calypso_hangup(struct ofono_voicecall *vc,
+static void calypso_ath(struct ofono_voicecall *vc,
                                ofono_voicecall_cb_t cb, void *data)
 {
        calypso_template(vc, "ATH", cb, data);
 }
 
+static void calypso_chup(struct ofono_voicecall *vc,
+                               ofono_voicecall_cb_t cb, void *data)
+{
+       calypso_template(vc, "AT+CHUP", cb, data);
+}
+
 static void calypso_hold_all_active(struct ofono_voicecall *vc,
                                        ofono_voicecall_cb_t cb, void *data)
 {
@@ -409,7 +415,8 @@ static struct ofono_voicecall_driver driver = {
        .remove                 = calypso_voicecall_remove,
        .dial                   = calypso_dial,
        .answer                 = calypso_answer,
-       .hangup_active          = calypso_hangup,
+       .hangup_all             = calypso_ath,
+       .hangup_active          = calypso_chup,
        .hold_all_active        = calypso_hold_all_active,
        .release_all_held       = calypso_release_all_held,
        .set_udub               = calypso_set_udub,