Skip to content

Commit 5b84171

Browse files
committed
treewide: Align networking code with net_mgmt API change
The net_mgmt event representation changed from 32-bit to 64-bit value, therefore update all net_mgmt callbacks to align with this change. Signed-off-by: Robert Lubos <[email protected]>
1 parent 7e8932e commit 5b84171

File tree

42 files changed

+71
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+71
-71
lines changed

applications/serial_lte_modem/src/slm_ppp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static void ppp_work_fn(struct k_work *work)
568568
}
569569

570570
static void ppp_net_mgmt_event_handler(struct net_mgmt_event_callback *cb,
571-
uint32_t mgmt_event, struct net_if *iface)
571+
uint64_t mgmt_event, struct net_if *iface)
572572
{
573573
switch (mgmt_event) {
574574
case NET_EVENT_PPP_PHASE_RUNNING:

lib/location/scan_wifi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void scan_wifi_done_handle(struct net_mgmt_event_callback *cb)
172172

173173
void scan_wifi_net_mgmt_event_handler(
174174
struct net_mgmt_event_callback *cb,
175-
uint32_t mgmt_event,
175+
uint64_t mgmt_event,
176176
struct net_if *iface)
177177
{
178178
ARG_UNUSED(iface);

modules/wfa-qt/src/wpas_events.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ static void handle_wpa_supp_ready(struct net_mgmt_event_callback *cb)
4040
}
4141

4242
static void wpa_supp_event_handler(struct net_mgmt_event_callback *cb,
43-
uint32_t mgmt_event, struct net_if *iface)
43+
uint64_t mgmt_event, struct net_if *iface)
4444
{
4545
/* TODO: Handle other events */
4646
switch (mgmt_event) {
4747
case NET_EVENT_SUPPLICANT_READY:
4848
handle_wpa_supp_ready(cb);
4949
break;
5050
default:
51-
LOG_DBG("Unhandled event (%d)", mgmt_event);
51+
LOG_DBG("Unhandled event (%llu)", mgmt_event);
5252
break;
5353
}
5454
}

samples/cellular/modem_shell/src/ppp/ppp_ctrl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static void ppp_ctrl_restart_worker(struct k_work *work_item)
178178
static struct net_mgmt_event_callback ppp_ctrl_net_if_mgmt_event_ppp_cb;
179179

180180
static void ppp_ctrl_net_if_mgmt_event_handler(struct net_mgmt_event_callback *cb,
181-
uint32_t mgmt_event,
181+
uint64_t mgmt_event,
182182
struct net_if *iface)
183183
{
184184
if (net_if_l2(iface) != &NET_L2_GET_NAME(PPP)) {
@@ -200,7 +200,7 @@ static void ppp_ctrl_net_if_mgmt_event_handler(struct net_mgmt_event_callback *c
200200
static struct net_mgmt_event_callback ppp_ctrl_net_mgmt_event_ppp_cb;
201201

202202
static void ppp_ctrl_net_mgmt_event_handler(struct net_mgmt_event_callback *cb,
203-
uint32_t mgmt_event,
203+
uint64_t mgmt_event,
204204
struct net_if *iface)
205205
{
206206
switch (mgmt_event) {
@@ -231,7 +231,7 @@ static void ppp_ctrl_net_mgmt_event_handler(struct net_mgmt_event_callback *cb,
231231
static struct net_mgmt_event_callback ipv4_level_net_mgmt_event_cb;
232232
static void
233233
ppp_ctrl_net_mgmt_event_ipv4_levelhandler(struct net_mgmt_event_callback *cb,
234-
uint32_t mgmt_event,
234+
uint64_t mgmt_event,
235235
struct net_if *iface)
236236
{
237237
if (iface != ppp_iface_global) {
@@ -248,7 +248,7 @@ ppp_ctrl_net_mgmt_event_ipv4_levelhandler(struct net_mgmt_event_callback *cb,
248248
static struct net_mgmt_event_callback ipv6_level_net_mgmt_event_cb;
249249
static void
250250
ppp_ctrl_net_mgmt_event_ipv6_levelhandler(struct net_mgmt_event_callback *cb,
251-
uint32_t mgmt_event,
251+
uint64_t mgmt_event,
252252
struct net_if *iface)
253253
{
254254
if (iface != ppp_iface_global) {

samples/cellular/nrf_cloud_multi_service/src/cloud_connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static bool connect_cloud(void)
312312
*/
313313
static struct net_mgmt_event_callback l4_callback;
314314
static void l4_event_handler(struct net_mgmt_event_callback *cb,
315-
uint32_t event, struct net_if *iface)
315+
uint64_t event, struct net_if *iface)
316316
{
317317
if (event == NET_EVENT_L4_CONNECTED) {
318318
LOG_INF("Network connectivity gained!");

samples/cellular/nrf_cloud_multi_service/src/provisioning_support.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static K_WORK_DEFINE(start_provisioning_work, start_provisioning_work_fn);
171171
static struct net_mgmt_event_callback l4_callback;
172172

173173
static void l4_event_handler(struct net_mgmt_event_callback *cb,
174-
uint32_t event, struct net_if *iface)
174+
uint64_t event, struct net_if *iface)
175175
{
176176
if (event == NET_EVENT_L4_CONNECTED) {
177177
/* Mark network as up. */

samples/cellular/nrf_cloud_rest_cell_location/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ int init(void)
548548

549549
/* Callback to track network connectivity */
550550
static struct net_mgmt_event_callback l4_callback;
551-
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint32_t event,
551+
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint64_t event,
552552
struct net_if *iface)
553553
{
554554
if ((event & CONN_LAYER_EVENT_MASK) != event) {
@@ -570,7 +570,7 @@ static void l4_event_handler(struct net_mgmt_event_callback *cb, uint32_t event,
570570
/* Callback to track connectivity layer events */
571571
static struct net_mgmt_event_callback conn_cb;
572572
static void connectivity_event_handler(struct net_mgmt_event_callback *cb,
573-
uint32_t event,
573+
uint64_t event,
574574
struct net_if *iface)
575575
{
576576
if (event == NET_EVENT_CONN_IF_FATAL_ERROR) {

samples/cellular/nrf_cloud_rest_device_message/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static int setup(void)
367367

368368
/* Callback to track network connectivity */
369369
static struct net_mgmt_event_callback l4_callback;
370-
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint32_t event,
370+
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint64_t event,
371371
struct net_if *iface)
372372
{
373373
if ((event & EVENT_MASK) != event) {

samples/cellular/nrf_cloud_rest_fota/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static void sample_reboot(enum nrf_cloud_fota_reboot_status status)
416416

417417
/* Callback to track network connectivity */
418418
static struct net_mgmt_event_callback l4_callback;
419-
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint32_t event,
419+
static void l4_event_handler(struct net_mgmt_event_callback *cb, uint64_t event,
420420
struct net_if *iface)
421421
{
422422
if ((event & EVENT_MASK) != event) {

samples/cellular/nrf_provisioning/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static struct nrf_provisioning_dm_change dmode = { .cb = device_mode_cb, .user_d
136136
/* Callback to track network connectivity */
137137
static struct net_mgmt_event_callback l4_callback;
138138
static void l4_event_handler(struct net_mgmt_event_callback *cb,
139-
uint32_t event, struct net_if *iface)
139+
uint64_t event, struct net_if *iface)
140140
{
141141
if ((event & EVENT_MASK) != event) {
142142
return;

0 commit comments

Comments
 (0)