@@ -1093,6 +1093,28 @@ static void brcmf_scan_params_v2_to_v1(struct brcmf_scan_params_v2_le *params_v2
10931093 & params_v2_le -> channel_list [0 ], params_size );
10941094}
10951095
1096+ static u32 brcmf_nl80211_scan_flags_to_scan_flags (u32 nl80211_flags )
1097+ {
1098+ u32 scan_flags = 0 ;
1099+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_SPAN ) {
1100+ scan_flags |= BRCMF_SCANFLAGS_LOW_SPAN ;
1101+ brcmf_dbg (SCAN , "requested low span scan\n" );
1102+ }
1103+ if (nl80211_flags & NL80211_SCAN_FLAG_HIGH_ACCURACY ) {
1104+ scan_flags |= BRCMF_SCANFLAGS_HIGH_ACCURACY ;
1105+ brcmf_dbg (SCAN , "requested high accuracy scan\n" );
1106+ }
1107+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_POWER ) {
1108+ scan_flags |= BRCMF_SCANFLAGS_LOW_POWER ;
1109+ brcmf_dbg (SCAN , "requested low power scan\n" );
1110+ }
1111+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_PRIORITY ) {
1112+ scan_flags |= BRCMF_SCANFLAGS_LOW_PRIO ;
1113+ brcmf_dbg (SCAN , "requested low priority scan\n" );
1114+ }
1115+ return scan_flags ;
1116+ }
1117+
10961118static void brcmf_escan_prep (struct brcmf_cfg80211_info * cfg ,
10971119 struct brcmf_if * ifp ,
10981120 struct brcmf_scan_params_v2_le * params_le ,
@@ -1106,6 +1128,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11061128 char * ptr ;
11071129 int length ;
11081130 struct brcmf_ssid_le ssid_le ;
1131+ u32 scan_type = BRCMF_SCANTYPE_ACTIVE ;
11091132
11101133 eth_broadcast_addr (params_le -> bssid );
11111134
@@ -1118,7 +1141,6 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11181141
11191142 params_le -> bss_type = DOT11_BSSTYPE_ANY ;
11201143 params_le -> ssid_type = 0 ;
1121- params_le -> scan_type = cpu_to_le32 (BRCMF_SCANTYPE_ACTIVE );
11221144 params_le -> channel_num = 0 ;
11231145 params_le -> nprobes = cpu_to_le32 (-1 );
11241146 params_le -> active_time = cpu_to_le32 (-1 );
@@ -1178,9 +1200,17 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11781200 }
11791201 } else {
11801202 brcmf_dbg (SCAN , "Performing passive scan\n" );
1181- params_le -> scan_type = cpu_to_le32 ( BRCMF_SCANTYPE_PASSIVE ) ;
1203+ scan_type = BRCMF_SCANTYPE_PASSIVE ;
11821204 }
1205+ scan_type |= brcmf_nl80211_scan_flags_to_scan_flags (request -> flags );
1206+ params_le -> scan_type = cpu_to_le32 (scan_type );
11831207 params_le -> length = cpu_to_le16 (length );
1208+
1209+ /* Include RNR results if requested */
1210+ if (request -> flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ ) {
1211+ params_le -> ssid_type |= BRCMF_SCANSSID_INC_RNR ;
1212+ }
1213+
11841214 /* Adding mask to channel numbers */
11851215 params_le -> channel_num =
11861216 cpu_to_le32 ((n_ssids << BRCMF_SCAN_PARAMS_NSSID_SHIFT ) |
@@ -7857,6 +7887,16 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
78577887 wiphy_ext_feature_set (wiphy ,
78587888 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP );
78597889 }
7890+ if (brcmf_feat_is_enabled (ifp , BRCMF_FEAT_SAE )) {
7891+ wiphy -> features |= NL80211_FEATURE_SAE ;
7892+ }
7893+
7894+ /* High accuracy and low power scans are always supported. */
7895+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN );
7896+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_LOW_POWER_SCAN );
7897+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_LOW_SPAN_SCAN );
7898+ wiphy -> features |= NL80211_FEATURE_LOW_PRIORITY_SCAN ;
7899+
78607900 wiphy -> mgmt_stypes = brcmf_txrx_stypes ;
78617901 wiphy -> max_remain_on_channel_duration = 5000 ;
78627902 if (brcmf_feat_is_enabled (ifp , BRCMF_FEAT_PNO )) {
0 commit comments