@@ -7272,6 +7272,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
72727272 break ;
72737273 }
72747274 }
7275+
72757276 if (!channel ) {
72767277 /* It seems firmware supports some channel we never
72777278 * considered. Something new in IEEE standard?
@@ -7344,17 +7345,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
73447345 struct brcmu_chan ch ;
73457346 u32 num_chan ;
73467347 int i , j ;
7348+ s32 updown ;
73477349
73487350 /* verify support for bw_cap command */
7349- val = WLC_BAND_5G ;
7351+ val = WLC_BAND_2G ;
73507352 err = brcmf_fil_iovar_int_query (ifp , "bw_cap" , & val );
7351-
7353+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
73527354 if (!err ) {
7355+ /* Setting the bw_cap is DOWN restricted. */
7356+ updown = 0 ;
7357+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
73537358 /* only set 2G bandwidth using bw_cap command */
73547359 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
73557360 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
73567361 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
73577362 sizeof (band_bwcap ));
7363+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7364+ brcmf_c_set_joinpref_default (ifp );
7365+ updown = 1 ;
7366+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
73587367 } else {
73597368 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
73607369 val = WLC_N_BW_40ALL ;
@@ -7416,7 +7425,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
74167425 return err ;
74177426}
74187427
7419- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7428+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
74207429{
74217430 struct brcmf_pub * drvr = ifp -> drvr ;
74227431 u32 band , mimo_bwcap ;
@@ -7470,7 +7479,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
74707479}
74717480
74727481static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7473- u32 bw_cap [2 ], u32 nrxchain )
7482+ u32 bw_cap [4 ], u32 nrxchain )
74747483{
74757484 /* Not supported in 6G band */
74767485 if (band -> band == NL80211_BAND_6GHZ )
@@ -7501,7 +7510,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
75017510}
75027511
75037512static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7504- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7513+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
75057514 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
75067515 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
75077516{
@@ -7686,7 +7695,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
76867695 u32 nmode ;
76877696 u32 vhtmode = 0 ;
76887697 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7689- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7698+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
76907699 u32 rxchain ;
76917700 u32 txchain ;
76927701 u32 nrxchain ;
0 commit comments