AGPS config inject can be configured out
a parameter can be added to gps.conf so as to prevent carrier dependent AGPS configs to be injected to modem. This is mainly for test purposes. Change-Id: Ia053bf523329fe7c1abf0696b9bffcc6a7d56a53 CRs-Fixed: 998059
This commit is contained in:
parent
17e8653d96
commit
54794a45e6
3 changed files with 35 additions and 5 deletions
|
@ -59,6 +59,7 @@ typedef struct loc_gps_cfg_s
|
|||
uint32_t GPS_LOCK;
|
||||
uint32_t A_GLONASS_POS_PROTOCOL_SELECT;
|
||||
uint32_t AGPS_CERT_WRITABLE_MASK;
|
||||
uint32_t AGPS_CONFIG_INJECT;
|
||||
uint32_t LPPE_CP_TECHNOLOGY;
|
||||
uint32_t LPPE_UP_TECHNOLOGY;
|
||||
} loc_gps_cfg_s_type;
|
||||
|
|
15
etc/gps.conf
15
etc/gps.conf
|
@ -123,3 +123,18 @@ LPPE_CP_TECHNOLOGY = 0
|
|||
# 0x1: DBH for LPPe UP
|
||||
# 0x2: WLAN AP Measurements for LPPe UP
|
||||
LPPE_UP_TECHNOLOGY = 0
|
||||
|
||||
##################################################
|
||||
# AGPS_CONFIG_INJECT
|
||||
##################################################
|
||||
# enable/disable injection of AGPS configurations:
|
||||
# SUPL_VER
|
||||
# SUPL_HOST
|
||||
# SUPL_PORT
|
||||
# C2K_HOST
|
||||
# C2K_PORT
|
||||
# LPP_PROFILE
|
||||
# A_GLONASS_POS_PROTOCOL_SELECT
|
||||
# 0: disable
|
||||
# 1: enable
|
||||
AGPS_CONFIG_INJECT = 1
|
||||
|
|
|
@ -100,6 +100,7 @@ static const loc_param_s_type gps_conf_table[] =
|
|||
{"XTRA_SERVER_2", &gps_conf.XTRA_SERVER_2, NULL, 's'},
|
||||
{"XTRA_SERVER_3", &gps_conf.XTRA_SERVER_3, NULL, 's'},
|
||||
{"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL", &gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL, NULL, 'n'},
|
||||
{"AGPS_CONFIG_INJECT", &gps_conf.AGPS_CONFIG_INJECT, NULL, 'n'},
|
||||
};
|
||||
|
||||
static const loc_param_s_type sap_conf_table[] =
|
||||
|
@ -176,6 +177,9 @@ static void loc_default_parameters(void)
|
|||
|
||||
/* None of the 10 slots for agps certificates are writable by default */
|
||||
gps_conf.AGPS_CERT_WRITABLE_MASK = 0;
|
||||
|
||||
/* inject supl config to modem with config values from config.xml or gps.conf, default 1 */
|
||||
gps_conf.AGPS_CONFIG_INJECT = 1;
|
||||
}
|
||||
|
||||
// 2nd half of init(), singled out for
|
||||
|
@ -403,7 +407,9 @@ struct LocEngSetServerIpv4 : public LocMsg {
|
|||
locallog();
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
mAdapter->setServer(mNlAddr, mPort, mServerType);
|
||||
if (gps_conf.AGPS_CONFIG_INJECT) {
|
||||
mAdapter->setServer(mNlAddr, mPort, mServerType);
|
||||
}
|
||||
}
|
||||
inline void locallog() const {
|
||||
LOC_LOGV("LocEngSetServerIpv4 - addr: %x, port: %d, type: %s",
|
||||
|
@ -434,7 +440,9 @@ struct LocEngSetServerUrl : public LocMsg {
|
|||
delete[] mUrl;
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
mAdapter->setServer(mUrl, mLen);
|
||||
if (gps_conf.AGPS_CONFIG_INJECT) {
|
||||
mAdapter->setServer(mUrl, mLen);
|
||||
}
|
||||
}
|
||||
inline void locallog() const {
|
||||
LOC_LOGV("LocEngSetServerUrl - url: %s", mUrl);
|
||||
|
@ -455,7 +463,9 @@ struct LocEngAGlonassProtocol : public LocMsg {
|
|||
locallog();
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
mAdapter->setAGLONASSProtocol(mAGlonassProtocl);
|
||||
if (gps_conf.AGPS_CONFIG_INJECT) {
|
||||
mAdapter->setAGLONASSProtocol(mAGlonassProtocl);
|
||||
}
|
||||
}
|
||||
inline void locallog() const {
|
||||
LOC_LOGV("A-GLONASS protocol: 0x%lx", mAGlonassProtocl);
|
||||
|
@ -499,7 +509,9 @@ struct LocEngSuplVer : public LocMsg {
|
|||
locallog();
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
mAdapter->setSUPLVersion(mSuplVer);
|
||||
if (gps_conf.AGPS_CONFIG_INJECT) {
|
||||
mAdapter->setSUPLVersion(mSuplVer);
|
||||
}
|
||||
}
|
||||
inline void locallog() const {
|
||||
LOC_LOGV("SUPL Version: %d", mSuplVer);
|
||||
|
@ -563,7 +575,9 @@ struct LocEngLppConfig : public LocMsg {
|
|||
locallog();
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
mAdapter->setLPPConfig(mLppConfig);
|
||||
if (gps_conf.AGPS_CONFIG_INJECT) {
|
||||
mAdapter->setLPPConfig(mLppConfig);
|
||||
}
|
||||
}
|
||||
inline void locallog() const {
|
||||
LOC_LOGV("LocEngLppConfig - profile: %d", mLppConfig);
|
||||
|
|
Loading…
Reference in a new issue