Skip to content

Commit e1a4db7

Browse files
authored
Merge pull request ARMmbed#2 from andreaslarssonublox/feature_wifi_ublox_andreas
wifi: ublox fixes to lwip and wifi
2 parents 1e7ba5f + 26eb5f1 commit e1a4db7

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

features/FEATURE_LWIP/lwip-interface/emac_stack_lwip.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,9 @@ uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *c
8080
return ((struct pbuf*)chain)->tot_len;
8181
}
8282

83+
void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem)
84+
{
85+
pbuf_ref((struct pbuf*)mem);
86+
}
87+
8388
#endif /* DEVICE_EMAC */

features/FEATURE_LWIP/lwip-interface/lwip_stack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ const char *mbed_lwip_get_netmask(char *buf, int buflen)
337337
#if LWIP_IPV4
338338
const ip4_addr_t *addr = netif_ip4_netmask(&lwip_netif);
339339
if (!ip4_addr_isany(addr)) {
340-
return inet_ntoa_r(addr, buf, buflen);
340+
return ip4addr_ntoa_r(addr, buf, buflen);
341341
} else {
342342
return NULL;
343343
}
@@ -351,7 +351,7 @@ char *mbed_lwip_get_gateway(char *buf, int buflen)
351351
#if LWIP_IPV4
352352
const ip4_addr_t *addr = netif_ip4_gw(&lwip_netif);
353353
if (!ip4_addr_isany(addr)) {
354-
return inet_ntoa_r(addr, buf, buflen);
354+
return ip4addr_ntoa_r(addr, buf, buflen);
355355
} else {
356356
return NULL;
357357
}

features/FEATURE_LWIP/lwip-interface/lwipopts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@
8181
#define DEFAULT_ACCEPTMBOX_SIZE 8
8282

8383
#ifdef LWIP_DEBUG
84-
#define TCPIP_THREAD_STACKSIZE 1024*2
84+
#define TCPIP_THREAD_STACKSIZE 1200*2
8585
#else
86-
#define TCPIP_THREAD_STACKSIZE 1024
86+
#define TCPIP_THREAD_STACKSIZE 1200
8787
#endif
8888

8989
#define TCPIP_THREAD_PRIO (osPriorityNormal)

features/netsocket/WiFiAccessPoint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class WiFiAccessPoint
2929
{
3030
/** WiFiAccessPoint lifetime
3131
*/
32+
public:
3233
WiFiAccessPoint();
3334
WiFiAccessPoint(nsapi_wifi_ap_t ap);
3435

features/netsocket/WiFiInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class WiFiInterface: public NetworkInterface
6969
*/
7070
virtual int connect(const char *ssid, const char *pass,
7171
nsapi_security_t security = NSAPI_SECURITY_NONE,
72-
uint8_t channel = 0);
72+
uint8_t channel = 0) = 0;
7373

7474
/** Start the interface
7575
*

features/netsocket/emac_stack_mem.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ emac_stack_mem_t *emac_stack_mem_chain_dequeue(emac_stack_t* stack, emac_stack_m
9696
*/
9797
uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *chain);
9898

99+
/**
100+
* Increases the reference counter for the memory
101+
*
102+
* @param stack Emac stack context
103+
* @param mem Memory structure
104+
*/
105+
void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem);
106+
99107
#endif /* DEVICE_EMAC */
100108

101109
#endif /* EMAC_MBED_STACK_MEM_h */

0 commit comments

Comments
 (0)