@@ -1089,6 +1089,28 @@ static void brcmf_scan_params_v2_to_v1(struct brcmf_scan_params_v2_le *params_v2
10891089 & params_v2_le -> channel_list [0 ], params_size );
10901090}
10911091
1092+ static u32 brcmf_nl80211_scan_flags_to_scan_flags (u32 nl80211_flags )
1093+ {
1094+ u32 scan_flags = 0 ;
1095+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_SPAN ) {
1096+ scan_flags |= BRCMF_SCANFLAGS_LOW_SPAN ;
1097+ brcmf_dbg (SCAN , "requested low span scan\n" );
1098+ }
1099+ if (nl80211_flags & NL80211_SCAN_FLAG_HIGH_ACCURACY ) {
1100+ scan_flags |= BRCMF_SCANFLAGS_HIGH_ACCURACY ;
1101+ brcmf_dbg (SCAN , "requested high accuracy scan\n" );
1102+ }
1103+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_POWER ) {
1104+ scan_flags |= BRCMF_SCANFLAGS_LOW_POWER ;
1105+ brcmf_dbg (SCAN , "requested low power scan\n" );
1106+ }
1107+ if (nl80211_flags & NL80211_SCAN_FLAG_LOW_PRIORITY ) {
1108+ scan_flags |= BRCMF_SCANFLAGS_LOW_PRIO ;
1109+ brcmf_dbg (SCAN , "requested low priority scan\n" );
1110+ }
1111+ return scan_flags ;
1112+ }
1113+
10921114static void brcmf_escan_prep (struct brcmf_cfg80211_info * cfg ,
10931115 struct brcmf_if * ifp ,
10941116 struct brcmf_scan_params_v2_le * params_le ,
@@ -1102,6 +1124,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11021124 char * ptr ;
11031125 int length ;
11041126 struct brcmf_ssid_le ssid_le ;
1127+ u32 scan_type = BRCMF_SCANTYPE_ACTIVE ;
11051128
11061129 eth_broadcast_addr (params_le -> bssid );
11071130
@@ -1114,7 +1137,6 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11141137
11151138 params_le -> bss_type = DOT11_BSSTYPE_ANY ;
11161139 params_le -> ssid_type = 0 ;
1117- params_le -> scan_type = cpu_to_le32 (BRCMF_SCANTYPE_ACTIVE );
11181140 params_le -> channel_num = 0 ;
11191141 params_le -> nprobes = cpu_to_le32 (-1 );
11201142 params_le -> active_time = cpu_to_le32 (-1 );
@@ -1174,9 +1196,17 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
11741196 }
11751197 } else {
11761198 brcmf_dbg (SCAN , "Performing passive scan\n" );
1177- params_le -> scan_type = cpu_to_le32 ( BRCMF_SCANTYPE_PASSIVE ) ;
1199+ scan_type = BRCMF_SCANTYPE_PASSIVE ;
11781200 }
1201+ scan_type |= brcmf_nl80211_scan_flags_to_scan_flags (request -> flags );
1202+ params_le -> scan_type = cpu_to_le32 (scan_type );
11791203 params_le -> length = cpu_to_le16 (length );
1204+
1205+ /* Include RNR results if requested */
1206+ if (request -> flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ ) {
1207+ params_le -> ssid_type |= BRCMF_SCANSSID_INC_RNR ;
1208+ }
1209+
11801210 /* Adding mask to channel numbers */
11811211 params_le -> channel_num =
11821212 cpu_to_le32 ((n_ssids << BRCMF_SCAN_PARAMS_NSSID_SHIFT ) |
@@ -7840,6 +7870,16 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
78407870 wiphy_ext_feature_set (wiphy ,
78417871 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP );
78427872 }
7873+ if (brcmf_feat_is_enabled (ifp , BRCMF_FEAT_SAE )) {
7874+ wiphy -> features |= NL80211_FEATURE_SAE ;
7875+ }
7876+
7877+ /* High accuracy and low power scans are always supported. */
7878+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN );
7879+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_LOW_POWER_SCAN );
7880+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_LOW_SPAN_SCAN );
7881+ wiphy -> features |= NL80211_FEATURE_LOW_PRIORITY_SCAN ;
7882+
78437883 wiphy -> mgmt_stypes = brcmf_txrx_stypes ;
78447884 wiphy -> max_remain_on_channel_duration = 5000 ;
78457885 if (brcmf_feat_is_enabled (ifp , BRCMF_FEAT_PNO )) {
0 commit comments