GTP WWAN should work even if MSA/MSB is not enabled

GTP WWAN should work even if MSA/MSB is not enabled in
capabilities. Removing wifi_nif we don't need it any
more.

Change-Id: I6736e5f4320d4c35bc5bbb8272b45e14f66988c3
CRs-Fixed: 1067691
This commit is contained in:
Harikrishnan Hariharan 2016-09-16 14:05:37 +05:30 committed by Gerrit - the friendly Code Review server
parent 3493ce50e4
commit 0ac11fcd84
2 changed files with 17 additions and 31 deletions

View file

@ -1248,17 +1248,8 @@ LocEngReqRelWifi::~LocEngReqRelWifi() {
}
void LocEngReqRelWifi::proc() const {
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
if (locEng->wifi_nif) {
WIFISubscriber s(locEng->wifi_nif, mSSID, mPassword, mSenderId);
if (mIsReq) {
locEng->wifi_nif->subscribeRsrc((Subscriber*)&s);
} else {
locEng->wifi_nif->unsubscribeRsrc((Subscriber*)&s);
}
} else {
locEng->adapter->atlOpenStatus(mSenderId, 0, NULL, -1, mType);
}
}
inline void LocEngReqRelWifi::locallog() const {
LOC_LOGV("%s - senderId: %d, ssid: %s, password: %s",
mIsReq ? "LocEngRequestWifi" : "LocEngReleaseWifi",
@ -2345,12 +2336,10 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call
EXIT_LOG(%s, VOID_RET);
return;
}
bool agpsCapable = ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) ||
(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB));
LocEngAdapter* adapter = loc_eng_data.adapter;
loc_eng_data.agps_status_cb = callbacks->status_cb;
if (agpsCapable && NULL != adapter) {
if (NULL != adapter) {
if (adapter->mSupportsAgpsRequests) {
adapter->sendMsg(new LocEngAgnssNifInit(&loc_eng_data));
}
@ -2373,13 +2362,14 @@ static void createAgnssNifs(loc_eng_data_s_type& locEng) {
bool agpsCapable = ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) ||
(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB));
LocEngAdapter* adapter = locEng.adapter;
if (agpsCapable && NULL != adapter && adapter->mSupportsAgpsRequests) {
if (NULL != adapter && adapter->mSupportsAgpsRequests) {
if (NULL == locEng.internet_nif) {
locEng.internet_nif= new AgpsStateMachine(servicerTypeAgps,
(void *)locEng.agps_status_cb,
AGPS_TYPE_WWAN_ANY,
false);
}
if (agpsCapable) {
if (NULL == locEng.agnss_nif) {
locEng.agnss_nif = new AgpsStateMachine(servicerTypeAgps,
(void *)locEng.agps_status_cb,
@ -2395,16 +2385,13 @@ static void createAgnssNifs(loc_eng_data_s_type& locEng) {
}
}
}
}
// must be called under msg handler context
static AgpsStateMachine*
getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) {
AgpsStateMachine* stateMachine;
switch (agpsType) {
case AGPS_TYPE_WIFI: {
stateMachine = locEng.wifi_nif;
break;
}
case AGPS_TYPE_INVALID:
case AGPS_TYPE_SUPL: {
stateMachine = locEng.agnss_nif;

View file

@ -105,7 +105,6 @@ typedef struct loc_eng_data_s
// AGPS state machines
AgpsStateMachine* agnss_nif;
AgpsStateMachine* internet_nif;
AgpsStateMachine* wifi_nif;
//State machine for Data Services
AgpsStateMachine* ds_nif;