@@ -125,9 +125,7 @@ void handle_wifi_connect_result(struct net_mgmt_event_callback *cb)
125125 if (status -> status ) {
126126 LOG_ERR ("Wi-Fi Connection request failed (%d)" , status -> status );
127127 } else {
128- #ifdef CONFIG_DEBUG_PRINT_WIFI_CONN_INFO
129128 LOG_INF ("Connected" );
130- #endif
131129 wifi_context .connected = true;
132130 }
133131
@@ -156,9 +154,7 @@ void print_dhcp_ip(struct net_mgmt_event_callback *cb)
156154
157155 net_addr_ntop (AF_INET , addr , dhcp_info , sizeof (dhcp_info ));
158156
159- #ifdef CONFIG_DEBUG_PRINT_WIFI_DHCP_INFO
160157 LOG_INF ("IP address: %s" , dhcp_info );
161- #endif
162158 k_sem_give (& wait_for_next );
163159}
164160
@@ -171,9 +167,7 @@ int cmd_wifi_scan(void)
171167 LOG_ERR ("Scan request failed" );
172168 return - ENOEXEC ;
173169 }
174- #ifdef CONFIG_DEBUG_PRINT_WIFI_SCAN_INFO
175170 LOG_INF ("Scan requested" );
176- #endif
177171 return 0 ;
178172}
179173
@@ -254,9 +248,7 @@ void wifi_disconnection(void)
254248 int ret = 0 ;
255249
256250 /* Wi-Fi disconnection */
257- #ifdef CONFIG_DEBUG_PRINT_WIFI_CONN_INFO
258251 LOG_INF ("Disconnecting Wi-Fi" );
259- #endif
260252 ret = wifi_disconnect ();
261253 if (ret != 0 ) {
262254 LOG_INF ("Wi-Fi Disconnect failed" );
@@ -268,19 +260,15 @@ int wifi_wait_for_next_event(const char *event_name, int timeout)
268260{
269261 int wait_result ;
270262
271- #ifdef CONFIG_DEBUG_PRINT_WIFI_CONN_INFO
272263 if (event_name ) {
273264 LOG_INF ("Waiting for %s" , event_name );
274265 }
275- #endif
276266 wait_result = k_sem_take (& wait_for_next , K_SECONDS (timeout ));
277267 if (wait_result ) {
278268 LOG_ERR ("Timeout waiting for %s -> %d" , event_name , wait_result );
279269 return -1 ;
280270 }
281- #ifdef CONFIG_DEBUG_PRINT_WIFI_CONN_INFO
282271 LOG_INF ("Got %s" , event_name );
283- #endif
284272 k_sem_reset (& wait_for_next );
285273
286274 return 0 ;
0 commit comments