MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / wifi_debug_set_mode

Function wifi_debug_set_mode

components/drivers/wlan/dev_wlan_cmd.c:690–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690static int wifi_debug_set_mode(int argc, char *argv[])
691{
692 rt_wlan_mode_t mode;
693
694 if (argc != 3)
695 return -1;
696
697 if (rt_strcmp("sta", argv[1]) == 0)
698 {
699 mode = RT_WLAN_STATION;
700 }
701 else if (rt_strcmp("ap", argv[1]) == 0)
702 {
703 mode = RT_WLAN_AP;
704 }
705 else if (rt_strcmp("none", argv[1]) == 0)
706 {
707 mode = RT_WLAN_NONE;
708 }
709 else
710 return -1;
711
712 rt_wlan_set_mode(argv[2], mode);
713 return 0;
714}
715
716static int wifi_debug_set_prot(int argc, char *argv[])
717{

Callers

nothing calls this directly

Calls 2

rt_strcmpFunction · 0.85
rt_wlan_set_modeFunction · 0.85

Tested by

no test coverage detected