@@ -7301,6 +7301,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
73017301 break ;
73027302 }
73037303 }
7304+
73047305 if (!channel ) {
73057306 /* It seems firmware supports some channel we never
73067307 * considered. Something new in IEEE standard?
@@ -7373,17 +7374,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
73737374 struct brcmu_chan ch ;
73747375 u32 num_chan ;
73757376 int i , j ;
7377+ s32 updown ;
73767378
73777379 /* verify support for bw_cap command */
7378- val = WLC_BAND_5G ;
7380+ val = WLC_BAND_2G ;
73797381 err = brcmf_fil_iovar_int_query (ifp , "bw_cap" , & val );
7380-
7382+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
73817383 if (!err ) {
7384+ /* Setting the bw_cap is DOWN restricted. */
7385+ updown = 0 ;
7386+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
73827387 /* only set 2G bandwidth using bw_cap command */
73837388 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
73847389 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
73857390 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
73867391 sizeof (band_bwcap ));
7392+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7393+ brcmf_c_set_joinpref_default (ifp );
7394+ updown = 1 ;
7395+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
73877396 } else {
73887397 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
73897398 val = WLC_N_BW_40ALL ;
@@ -7445,7 +7454,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
74457454 return err ;
74467455}
74477456
7448- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7457+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
74497458{
74507459 struct brcmf_pub * drvr = ifp -> drvr ;
74517460 u32 band , mimo_bwcap ;
@@ -7499,7 +7508,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
74997508}
75007509
75017510static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7502- u32 bw_cap [2 ], u32 nrxchain )
7511+ u32 bw_cap [4 ], u32 nrxchain )
75037512{
75047513 /* Not supported in 6G band */
75057514 if (band -> band == NL80211_BAND_6GHZ )
@@ -7530,7 +7539,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
75307539}
75317540
75327541static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7533- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7542+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
75347543 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
75357544 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
75367545{
@@ -7715,7 +7724,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
77157724 u32 nmode ;
77167725 u32 vhtmode = 0 ;
77177726 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7718- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7727+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
77197728 u32 rxchain ;
77207729 u32 txchain ;
77217730 u32 nrxchain ;
0 commit comments