@@ -7264,6 +7264,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
72647264 break ;
72657265 }
72667266 }
7267+
72677268 if (!channel ) {
72687269 /* It seems firmware supports some channel we never
72697270 * considered. Something new in IEEE standard?
@@ -7336,17 +7337,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
73367337 struct brcmu_chan ch ;
73377338 u32 num_chan ;
73387339 int i , j ;
7340+ s32 updown ;
73397341
73407342 /* verify support for bw_cap command */
7341- val = WLC_BAND_5G ;
7343+ val = WLC_BAND_2G ;
73427344 err = brcmf_fil_iovar_int_query (ifp , "bw_cap" , & val );
7343-
7345+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
73447346 if (!err ) {
7347+ /* Setting the bw_cap is DOWN restricted. */
7348+ updown = 0 ;
7349+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
73457350 /* only set 2G bandwidth using bw_cap command */
73467351 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
73477352 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
73487353 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
73497354 sizeof (band_bwcap ));
7355+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7356+ brcmf_c_set_joinpref_default (ifp );
7357+ updown = 1 ;
7358+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
73507359 } else {
73517360 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
73527361 val = WLC_N_BW_40ALL ;
@@ -7408,7 +7417,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
74087417 return err ;
74097418}
74107419
7411- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7420+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
74127421{
74137422 struct brcmf_pub * drvr = ifp -> drvr ;
74147423 u32 band , mimo_bwcap ;
@@ -7462,7 +7471,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
74627471}
74637472
74647473static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7465- u32 bw_cap [2 ], u32 nrxchain )
7474+ u32 bw_cap [4 ], u32 nrxchain )
74667475{
74677476 /* Not supported in 6G band */
74687477 if (band -> band == NL80211_BAND_6GHZ )
@@ -7493,7 +7502,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
74937502}
74947503
74957504static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7496- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7505+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
74977506 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
74987507 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
74997508{
@@ -7678,7 +7687,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
76787687 u32 nmode ;
76797688 u32 vhtmode = 0 ;
76807689 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7681- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7690+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
76827691 u32 rxchain ;
76837692 u32 txchain ;
76847693 u32 nrxchain ;
0 commit comments