Merge pull request #9101 from jarvte/fix_pppmode_wrong_stack

Cellular: Fix to use PPP stack in PPP mode
pull/9131/head
Cruz Monrreal 2018-12-14 10:13:52 -06:00 committed by GitHub
commit 6380d8826e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ QUECTEL_BC95_CellularContext::~QUECTEL_BC95_CellularContext()
{
}
#if !NSAPI_PPP_AVAILABLE
NetworkStack *QUECTEL_BC95_CellularContext::get_stack()
{
if (!_stack) {
@ -35,6 +36,7 @@ NetworkStack *QUECTEL_BC95_CellularContext::get_stack()
}
return _stack;
}
#endif // #if !NSAPI_PPP_AVAILABLE
bool QUECTEL_BC95_CellularContext::stack_type_supported(nsapi_ip_stack_t stack_type)
{

View File

@ -27,7 +27,9 @@ public:
virtual ~QUECTEL_BC95_CellularContext();
protected:
#if !NSAPI_PPP_AVAILABLE
virtual NetworkStack *get_stack();
#endif // #if !NSAPI_PPP_AVAILABLE
virtual bool stack_type_supported(nsapi_ip_stack_t stack_type);
};

View File

@ -34,6 +34,7 @@ using namespace events;
static const AT_CellularBase::SupportedFeature unsupported_features[] = {
AT_CellularBase::AT_CGSN_WITH_TYPE,
AT_CellularBase::AT_CGDATA,
AT_CellularBase::SUPPORTED_FEATURE_END_MARK
};

View File

@ -36,6 +36,7 @@ bool QUECTEL_BG96_CellularContext::stack_type_supported(nsapi_ip_stack_t stack_t
return false;
}
#if !NSAPI_PPP_AVAILABLE
NetworkStack *QUECTEL_BG96_CellularContext::get_stack()
{
if (!_stack) {
@ -43,6 +44,7 @@ NetworkStack *QUECTEL_BG96_CellularContext::get_stack()
}
return _stack;
}
#endif // #if !NSAPI_PPP_AVAILABLE
nsapi_error_t QUECTEL_BG96_CellularContext::do_user_authentication()
{

View File

@ -28,7 +28,9 @@ public:
protected:
virtual bool stack_type_supported(nsapi_ip_stack_t stack_type);
#if !NSAPI_PPP_AVAILABLE
virtual NetworkStack *get_stack();
#endif // #if !NSAPI_PPP_AVAILABLE
virtual nsapi_error_t do_user_authentication();
};