Skip to content

Commit

Permalink
Merge pull request ARMmbed#2 from andreaslarssonublox/feature_wifi_ub…
Browse files Browse the repository at this point in the history
…lox_andreas

wifi: ublox fixes to lwip and wifi
  • Loading branch information
0xc0170 authored Oct 4, 2016
2 parents 1e7ba5f + 26eb5f1 commit e1a4db7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions features/FEATURE_LWIP/lwip-interface/emac_stack_lwip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *c
return ((struct pbuf*)chain)->tot_len;
}

void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem)
{
pbuf_ref((struct pbuf*)mem);
}

#endif /* DEVICE_EMAC */
4 changes: 2 additions & 2 deletions features/FEATURE_LWIP/lwip-interface/lwip_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const char *mbed_lwip_get_netmask(char *buf, int buflen)
#if LWIP_IPV4
const ip4_addr_t *addr = netif_ip4_netmask(&lwip_netif);
if (!ip4_addr_isany(addr)) {
return inet_ntoa_r(addr, buf, buflen);
return ip4addr_ntoa_r(addr, buf, buflen);
} else {
return NULL;
}
Expand All @@ -351,7 +351,7 @@ char *mbed_lwip_get_gateway(char *buf, int buflen)
#if LWIP_IPV4
const ip4_addr_t *addr = netif_ip4_gw(&lwip_netif);
if (!ip4_addr_isany(addr)) {
return inet_ntoa_r(addr, buf, buflen);
return ip4addr_ntoa_r(addr, buf, buflen);
} else {
return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions features/FEATURE_LWIP/lwip-interface/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@
#define DEFAULT_ACCEPTMBOX_SIZE 8

#ifdef LWIP_DEBUG
#define TCPIP_THREAD_STACKSIZE 1024*2
#define TCPIP_THREAD_STACKSIZE 1200*2
#else
#define TCPIP_THREAD_STACKSIZE 1024
#define TCPIP_THREAD_STACKSIZE 1200
#endif

#define TCPIP_THREAD_PRIO (osPriorityNormal)
Expand Down
1 change: 1 addition & 0 deletions features/netsocket/WiFiAccessPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class WiFiAccessPoint
{
/** WiFiAccessPoint lifetime
*/
public:
WiFiAccessPoint();
WiFiAccessPoint(nsapi_wifi_ap_t ap);

Expand Down
2 changes: 1 addition & 1 deletion features/netsocket/WiFiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class WiFiInterface: public NetworkInterface
*/
virtual int connect(const char *ssid, const char *pass,
nsapi_security_t security = NSAPI_SECURITY_NONE,
uint8_t channel = 0);
uint8_t channel = 0) = 0;

/** Start the interface
*
Expand Down
8 changes: 8 additions & 0 deletions features/netsocket/emac_stack_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ emac_stack_mem_t *emac_stack_mem_chain_dequeue(emac_stack_t* stack, emac_stack_m
*/
uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *chain);

/**
* Increases the reference counter for the memory
*
* @param stack Emac stack context
* @param mem Memory structure
*/
void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem);

#endif /* DEVICE_EMAC */

#endif /* EMAC_MBED_STACK_MEM_h */

0 comments on commit e1a4db7

Please sign in to comment.