@@ -7278,6 +7278,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
72787278 break ;
72797279 }
72807280 }
7281+
72817282 if (!channel ) {
72827283 /* It seems firmware supports some channel we never
72837284 * considered. Something new in IEEE standard?
@@ -7350,17 +7351,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
73507351 struct brcmu_chan ch ;
73517352 u32 num_chan ;
73527353 int i , j ;
7354+ s32 updown ;
73537355
73547356 /* verify support for bw_cap command */
7355- val = WLC_BAND_5G ;
7357+ val = WLC_BAND_2G ;
73567358 err = brcmf_fil_iovar_int_query (ifp , "bw_cap" , & val );
7357-
7359+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
73587360 if (!err ) {
7361+ /* Setting the bw_cap is DOWN restricted. */
7362+ updown = 0 ;
7363+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
73597364 /* only set 2G bandwidth using bw_cap command */
73607365 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
73617366 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
73627367 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
73637368 sizeof (band_bwcap ));
7369+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7370+ brcmf_c_set_joinpref_default (ifp );
7371+ updown = 1 ;
7372+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
73647373 } else {
73657374 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
73667375 val = WLC_N_BW_40ALL ;
@@ -7422,7 +7431,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
74227431 return err ;
74237432}
74247433
7425- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7434+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
74267435{
74277436 struct brcmf_pub * drvr = ifp -> drvr ;
74287437 u32 band , mimo_bwcap ;
@@ -7476,7 +7485,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
74767485}
74777486
74787487static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7479- u32 bw_cap [2 ], u32 nrxchain )
7488+ u32 bw_cap [4 ], u32 nrxchain )
74807489{
74817490 /* Not supported in 6G band */
74827491 if (band -> band == NL80211_BAND_6GHZ )
@@ -7507,7 +7516,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
75077516}
75087517
75097518static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7510- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7519+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
75117520 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
75127521 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
75137522{
@@ -7692,7 +7701,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
76927701 u32 nmode ;
76937702 u32 vhtmode = 0 ;
76947703 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7695- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7704+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
76967705 u32 rxchain ;
76977706 u32 txchain ;
76987707 u32 nrxchain ;
0 commit comments