Skip to content

Commit 972bcfc

Browse files
authored
Merge pull request #167 from tmobile/Make-stable-release-of-tmo_shell-on-DevEdge
Make stable release of tmo_shell on DevEdge
2 parents a5598af + 048a655 commit 972bcfc

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

Diff for: samples/tmo_shell/src/tmo_ble_demo.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ static struct bt_data ibeacon_custom[2] = {
752752

753753
#if CONFIG_WIFI
754754

755+
/* DaR TODO Removed What now?
755756
static struct net_mgmt_event_callback ble_demo_mgmt_cb;
756757
757758
static void ble_sample_wifi_mgmt_event_handler(struct net_mgmt_event_callback *cb,
@@ -765,7 +766,7 @@ static void ble_sample_wifi_mgmt_event_handler(struct net_mgmt_event_callback *c
765766
ssid_len = res->ssid_length;
766767
rssi = res->rssi;
767768
}
768-
}
769+
} */
769770

770771
void ble_wifi_status_retrieve(void *a, void *b, void *c)
771772
{
@@ -774,9 +775,9 @@ void ble_wifi_status_retrieve(void *a, void *b, void *c)
774775
ARG_UNUSED(c);
775776
while (1) {
776777
k_sem_take(&wifi_status_refresh_sem, K_FOREVER);
777-
struct net_if *iface = net_if_get_by_index(2); //Hardcoded for now
778+
/* struct net_if *iface = net_if_get_by_index(2); Hardcoded for now */
778779

779-
net_mgmt(NET_REQUEST_WIFI_STATUS, iface, NULL, 0);
780+
/* net_mgmt(NET_REQUEST_WIFI_STATUS, iface, NULL, 0); DaR TODO ? */
780781
}
781782
}
782783

@@ -933,12 +934,12 @@ static int tmo_ble_demo_init()
933934
}
934935
}
935936

936-
#ifdef CONFIG_WIFI
937+
#if 0 /* DaR TODO def CONFIG_WIFI */
937938
net_mgmt_init_event_callback(&ble_demo_mgmt_cb,
938939
ble_sample_wifi_mgmt_event_handler,
939940
NET_EVENT_WIFI_STATUS_RESULT);
940941

941-
net_mgmt_add_event_callback(&ble_demo_mgmt_cb);
942+
net_mgmt_add_event_callback(&ble_demo_mgmt_cb);
942943
#endif
943944
setup_buttons();
944945

Diff for: samples/tmo_shell/src/tmo_http_request.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ int tmo_http_download(int devid, char url[], char filename[], char *auth_key)
385385
req.response = response_cb_download;
386386
req.recv_buf = mxfer_buf;
387387
req.recv_buf_len = 4096;
388-
req.packet_timeout = 10000;
388+
/* req.packet_timeout = 10000; DaR TODO Where is this */
389389

390390
ret = tmo_offload_init(devid);
391391
if (ret != 0) {

Diff for: samples/tmo_shell/src/tmo_wifi.c

+9-6
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,15 @@ static void handle_wifi_disconnect_result(struct net_mgmt_event_callback *cb)
178178

179179
bool status_requested = false;
180180

181+
/* DaR TODO Unused
181182
static void handle_wifi_status_result(struct net_mgmt_event_callback *cb)
182183
{
183184
if (!status_requested) {
184185
return;
185186
} else {
186187
status_requested = false;
187188
}
189+
188190
const struct wifi_status_result *entry =
189191
(const struct wifi_status_result *)cb->info;
190192
@@ -195,7 +197,7 @@ static void handle_wifi_status_result(struct net_mgmt_event_callback *cb)
195197
"\n%-4s | %-12s | %-32s %-5s | %-4s | %-4s | %-5s | %-15s | %s\n",
196198
"Mode", "State", "SSID", "(len)", "Chan", "RSSI", "Sec", "IPv4", "IPv6");
197199
bool has_ip6 = entry->ip6.s6_addr32[0] || entry->ip6.s6_addr32[1]
198-
|| entry->ip6.s6_addr32[2] || entry->ip6.s6_addr32[3];
200+
|| entry->ip6.s6_addr32[2] || entry->ip6.s6_addr32[3];
199201
print(context.shell, SHELL_NORMAL, "%-4s | %-12s | %-32s %-5u | %-4u | %-4d | %-5s | %-15s | %s\n",
200202
(entry->ap_mode ? " AP" : " ST"),
201203
(entry->connected ? "Connected" : "Disconnected"),
@@ -207,8 +209,8 @@ static void handle_wifi_status_result(struct net_mgmt_event_callback *cb)
207209
sizeof(ip4_string_buf)) : ""),
208210
((has_ip6) ?
209211
net_addr_ntop(AF_INET6, &entry->ip6, ip6_string_buf,
210-
sizeof(ip6_string_buf)) : ""));
211-
}
212+
sizeof(ip6_string_buf)) : ""));
213+
} */
212214

213215
static void wifi_mgmt_event_handler(struct net_mgmt_event_callback *cb,
214216
uint32_t mgmt_event, struct net_if *iface)
@@ -226,9 +228,10 @@ static void wifi_mgmt_event_handler(struct net_mgmt_event_callback *cb,
226228
case NET_EVENT_WIFI_DISCONNECT_RESULT:
227229
handle_wifi_disconnect_result(cb);
228230
break;
231+
/* DaR TODO
229232
case NET_EVENT_WIFI_STATUS_RESULT:
230233
handle_wifi_status_result(cb);
231-
break;
234+
break; */
232235
default:
233236
break;
234237
}
@@ -447,12 +450,12 @@ int cmd_wifi_status(const struct shell *shell, size_t argc, char *argv[])
447450
#endif
448451

449452
context.shell = shell;
450-
453+
/* DaR TODO Remove Now what?
451454
if (net_mgmt(NET_REQUEST_WIFI_STATUS, iface, NULL, 0)) {
452455
shell_fprintf(shell, SHELL_WARNING, "Status request failed\n");
453456
454457
return -ENOEXEC;
455-
}
458+
} */
456459
return 0;
457460
}
458461

0 commit comments

Comments
 (0)