@@ -504,20 +504,6 @@ static int siwx91x_status(const struct device *dev, struct wifi_iface_status *st
504
504
memcpy (status -> bssid , wlan_info .bssid , WIFI_MAC_ADDR_LEN );
505
505
status -> wpa3_ent_type = WIFI_WPA3_ENTERPRISE_NA ;
506
506
507
- ret = sl_si91x_get_join_configuration (interface , & join_config );
508
- if (ret != SL_STATUS_OK ) {
509
- LOG_ERR ("Failed to get join configuration: 0x%x" , ret );
510
- return - EINVAL ;
511
- }
512
-
513
- if (join_config & SL_SI91X_JOIN_FEAT_MFP_CAPABLE_REQUIRED ) {
514
- status -> mfp = WIFI_MFP_REQUIRED ;
515
- } else if (join_config & SL_SI91X_JOIN_FEAT_MFP_CAPABLE_ONLY ) {
516
- status -> mfp = WIFI_MFP_OPTIONAL ;
517
- } else {
518
- status -> mfp = WIFI_MFP_DISABLE ;
519
- }
520
-
521
507
if (interface & SL_WIFI_2_4GHZ_INTERFACE ) {
522
508
status -> band = WIFI_FREQ_BAND_2_4_GHZ ;
523
509
}
@@ -529,6 +515,27 @@ static int siwx91x_status(const struct device *dev, struct wifi_iface_status *st
529
515
status -> iface_mode = WIFI_MODE_INFRA ;
530
516
status -> channel = wlan_info .channel_number ;
531
517
status -> twt_capable = true;
518
+
519
+ ret = sl_si91x_get_join_configuration (interface , & join_config );
520
+ if (ret != SL_STATUS_OK ) {
521
+ LOG_ERR ("Failed to get join configuration: 0x%x" , ret );
522
+ return - EINVAL ;
523
+ }
524
+
525
+ if (wlan_info .sec_type == SL_WIFI_WPA3 ) {
526
+ status -> mfp = WIFI_MFP_REQUIRED ;
527
+ } else if (wlan_info .sec_type == SL_WIFI_WPA3_TRANSITION ) {
528
+ status -> mfp = WIFI_MFP_OPTIONAL ;
529
+ } else if (wlan_info .sec_type == SL_WIFI_WPA2 ) {
530
+ if (join_config & SL_SI91X_JOIN_FEAT_MFP_CAPABLE_REQUIRED ) {
531
+ status -> mfp = WIFI_MFP_REQUIRED ;
532
+ } else {
533
+ status -> mfp = WIFI_MFP_OPTIONAL ;
534
+ }
535
+ } else {
536
+ status -> mfp = WIFI_MFP_DISABLE ;
537
+ }
538
+
532
539
ret = sl_wifi_get_signal_strength (SL_WIFI_CLIENT_INTERFACE , & rssi );
533
540
if (ret ) {
534
541
LOG_ERR ("Failed to get signal strength: 0x%x" , ret );
@@ -553,10 +560,10 @@ static int siwx91x_status(const struct device *dev, struct wifi_iface_status *st
553
560
LOG_ERR ("Failed to get the AP configuration: 0x%x" , ret );
554
561
return - EINVAL ;
555
562
}
556
-
557
563
status -> twt_capable = false;
558
564
status -> link_mode = WIFI_4 ;
559
565
status -> iface_mode = WIFI_MODE_AP ;
566
+ status -> mfp = WIFI_MFP_DISABLE ;
560
567
status -> channel = sl_ap_cfg .channel .channel ;
561
568
status -> beacon_interval = sl_ap_cfg .beacon_interval ;
562
569
status -> dtim_period = sl_ap_cfg .dtim_beacon_count ;
0 commit comments