@@ -7321,6 +7321,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
73217321 break ;
73227322 }
73237323 }
7324+
73247325 if (!channel ) {
73257326 /* It seems firmware supports some channel we never
73267327 * considered. Something new in IEEE standard?
@@ -7393,17 +7394,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
73937394 struct brcmu_chan ch ;
73947395 u32 num_chan ;
73957396 int i , j ;
7397+ s32 updown ;
73967398
73977399 /* verify support for bw_cap command */
7398- val = WLC_BAND_5G ;
7400+ val = WLC_BAND_2G ;
73997401 err = brcmf_fil_iovar_int_query (ifp , "bw_cap" , & val );
7400-
7402+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
74017403 if (!err ) {
7404+ /* Setting the bw_cap is DOWN restricted. */
7405+ updown = 0 ;
7406+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
74027407 /* only set 2G bandwidth using bw_cap command */
74037408 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
74047409 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
74057410 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
74067411 sizeof (band_bwcap ));
7412+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7413+ brcmf_c_set_joinpref_default (ifp );
7414+ updown = 1 ;
7415+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
74077416 } else {
74087417 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
74097418 val = WLC_N_BW_40ALL ;
@@ -7465,7 +7474,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
74657474 return err ;
74667475}
74677476
7468- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7477+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
74697478{
74707479 struct brcmf_pub * drvr = ifp -> drvr ;
74717480 u32 band , mimo_bwcap ;
@@ -7519,7 +7528,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
75197528}
75207529
75217530static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7522- u32 bw_cap [2 ], u32 nrxchain )
7531+ u32 bw_cap [4 ], u32 nrxchain )
75237532{
75247533 /* Not supported in 6G band */
75257534 if (band -> band == NL80211_BAND_6GHZ )
@@ -7550,7 +7559,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
75507559}
75517560
75527561static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7553- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7562+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
75547563 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
75557564 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
75567565{
@@ -7735,7 +7744,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
77357744 u32 nmode ;
77367745 u32 vhtmode = 0 ;
77377746 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7738- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7747+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
77397748 u32 rxchain ;
77407749 u32 txchain ;
77417750 u32 nrxchain ;
0 commit comments