@@ -168,7 +168,6 @@ NET_MGMT_REGISTER_REQUEST_HANDLER(NET_REQUEST_WIFI_AP_DISABLE, wifi_ap_disable);
168
168
static int wifi_iface_status (uint32_t mgmt_request , struct net_if * iface ,
169
169
void * data , size_t len )
170
170
{
171
- int ret ;
172
171
const struct device * dev = net_if_get_device (iface );
173
172
struct net_wifi_mgmt_offload * off_api =
174
173
(struct net_wifi_mgmt_offload * ) dev -> api ;
@@ -182,13 +181,7 @@ static int wifi_iface_status(uint32_t mgmt_request, struct net_if *iface,
182
181
return - EINVAL ;
183
182
}
184
183
185
- ret = off_api -> iface_status (dev , status );
186
-
187
- if (ret ) {
188
- return ret ;
189
- }
190
-
191
- return 0 ;
184
+ return off_api -> iface_status (dev , status );
192
185
}
193
186
NET_MGMT_REGISTER_REQUEST_HANDLER (NET_REQUEST_WIFI_IFACE_STATUS , wifi_iface_status );
194
187
@@ -204,7 +197,6 @@ void wifi_mgmt_raise_iface_status_event(struct net_if *iface,
204
197
static int wifi_iface_stats (uint32_t mgmt_request , struct net_if * iface ,
205
198
void * data , size_t len )
206
199
{
207
- int ret ;
208
200
const struct device * dev = net_if_get_device (iface );
209
201
struct net_wifi_mgmt_offload * off_api =
210
202
(struct net_wifi_mgmt_offload * ) dev -> api ;
@@ -218,13 +210,7 @@ static int wifi_iface_stats(uint32_t mgmt_request, struct net_if *iface,
218
210
return - EINVAL ;
219
211
}
220
212
221
- ret = off_api -> get_stats (dev , stats );
222
-
223
- if (ret ) {
224
- return ret ;
225
- }
226
-
227
- return 0 ;
213
+ return off_api -> get_stats (dev , stats );
228
214
}
229
215
NET_MGMT_REGISTER_REQUEST_HANDLER (NET_REQUEST_STATS_GET_WIFI , wifi_iface_stats );
230
216
#endif /* CONFIG_NET_STATISTICS_WIFI */
0 commit comments