mirror of git://git.sysmocom.de/ofono
Add quirk for Qualcomm issues with setting CBS topic ranges
This commit is contained in:
parent
88d083c4fd
commit
a774d9ed49
|
@ -38,6 +38,7 @@
|
|||
#include "gatresult.h"
|
||||
|
||||
#include "atmodem.h"
|
||||
#include "vendor.h"
|
||||
|
||||
static const char *none_prefix[] = { NULL };
|
||||
static const char *cscb_prefix[] = { "+CSCB:", NULL };
|
||||
|
@ -45,6 +46,7 @@ static const char *cscb_prefix[] = { "+CSCB:", NULL };
|
|||
struct cbs_data {
|
||||
GAtChat *chat;
|
||||
gboolean cscb_mode_1;
|
||||
unsigned int vendor;
|
||||
};
|
||||
|
||||
static void at_cbm_notify(GAtResult *result, gpointer user_data)
|
||||
|
@ -113,6 +115,17 @@ static void at_cbs_set_topics(struct ofono_cbs *cbs, const char *topics,
|
|||
if (!cbd)
|
||||
goto error;
|
||||
|
||||
/* For the Qualcomm based devices it is required to clear
|
||||
* the list of topics first. Otherwise setting the new
|
||||
* topic ranges will fail.
|
||||
*
|
||||
* In addition only AT+CSCB=1 seems to work. Providing
|
||||
* a topic range for clearing makes AT+CSBC=0,... fail.
|
||||
*/
|
||||
if (data->vendor == OFONO_VENDOR_QUALCOMM_MSM)
|
||||
g_at_chat_send(data->chat, "AT+CSCB=1", none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
buf = g_strdup_printf("AT+CSCB=0,\"%s\"", topics);
|
||||
|
||||
id = g_at_chat_send(data->chat, buf, none_prefix,
|
||||
|
@ -225,6 +238,7 @@ static int at_cbs_probe(struct ofono_cbs *cbs, unsigned int vendor,
|
|||
|
||||
data = g_new0(struct cbs_data, 1);
|
||||
data->chat = chat;
|
||||
data->vendor = vendor;
|
||||
|
||||
ofono_cbs_set_data(cbs, data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue