ppp: using RX ACCM = 0 by default

Some modems such as Quectel EC200T do not honor the default value for
the Async-Control-Character-Map (ACCM) configuration option defined in
RFC 1548 6.2 as 0xffffffff. This patch suggests to use RX ACCM = 0 for
Ofono by default as pppd does for instance. This will reduce PPP data
overhead as well.
Sergei Golubtsov 2 years ago committed by Denis Kenzior
parent 41967b92f3
commit c8ed7162d5

@ -806,6 +806,11 @@ void g_at_ppp_set_server_info(GAtPPP *ppp, const char *remote,
ipcp_set_server_info(ppp->ipcp, r, d1, d2);
void g_at_ppp_set_accm(GAtPPP *ppp, guint32 accm)
lcp_set_accm(ppp->lcp, accm);
void g_at_ppp_set_acfc_enabled(GAtPPP *ppp, gboolean enabled)
lcp_set_acfc_enabled(ppp->lcp, enabled);

@ -88,6 +88,7 @@ void g_at_ppp_set_recording(GAtPPP *ppp, const char *filename);
void g_at_ppp_set_server_info(GAtPPP *ppp, const char *remote_ip,
const char *dns1, const char *dns2);
void g_at_ppp_set_accm(GAtPPP *ppp, guint32 accm);
void g_at_ppp_set_acfc_enabled(GAtPPP *ppp, gboolean enabled);
void g_at_ppp_set_pfc_enabled(GAtPPP *ppp, gboolean enabled);

@ -90,6 +90,7 @@ static inline void __put_unaligned_short(void *p, guint16 val)
struct pppcp_data *lcp_new(GAtPPP *ppp, gboolean dormant);
void lcp_free(struct pppcp_data *lcp);
void lcp_protocol_reject(struct pppcp_data *lcp, guint8 *packet, gsize len);
void lcp_set_accm(struct pppcp_data *pppcp, guint32 accm);
void lcp_set_acfc_enabled(struct pppcp_data *pppcp, gboolean enabled);
void lcp_set_pfc_enabled(struct pppcp_data *pppcp, gboolean enabled);

@ -121,7 +121,9 @@ static void lcp_generate_config_options(struct lcp_data *lcp)
static void lcp_reset_config_options(struct lcp_data *lcp)
/* Using the default ACCM */
/* Using RX ACCM = 0 instead of the default ACCM */
lcp->accm = 0;
lcp->req_options |= REQ_OPTION_ACCM;
@ -398,6 +400,17 @@ struct pppcp_data *lcp_new(GAtPPP *ppp, gboolean is_server)
return pppcp;
void lcp_set_accm(struct pppcp_data *pppcp, guint32 accm)
struct lcp_data *lcp = pppcp_get_data(pppcp);
lcp->accm = accm;
lcp->req_options |= REQ_OPTION_ACCM;
pppcp_set_local_options(pppcp, lcp->options, lcp->options_len);
void lcp_set_acfc_enabled(struct pppcp_data *pppcp, gboolean enabled)
struct lcp_data *lcp = pppcp_get_data(pppcp);