@@ -7484,6 +7484,7 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
74847484 break ;
74857485 }
74867486 }
7487+
74877488 if (!channel ) {
74887489 /* It seems firmware supports some channel we never
74897490 * considered. Something new in IEEE standard?
@@ -7552,17 +7553,25 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
75527553 struct brcmu_chan ch ;
75537554 u32 num_chan ;
75547555 int i , j ;
7556+ s32 updown ;
75557557
75567558 /* verify support for bw_cap command */
7557- val = WLC_BAND_5G ;
7559+ val = WLC_BAND_2G ;
75587560 err = brcmf_fil_iovar_int_get (ifp , "bw_cap" , & val );
7559-
7561+ brcmf_dbg ( INFO , "Check bw_cap support:%d\n" , err );
75607562 if (!err ) {
7563+ /* Setting the bw_cap is DOWN restricted. */
7564+ updown = 0 ;
7565+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_DOWN , & updown , sizeof (s32 ));
75617566 /* only set 2G bandwidth using bw_cap command */
75627567 band_bwcap .band = cpu_to_le32 (WLC_BAND_2G );
75637568 band_bwcap .bw_cap = cpu_to_le32 (WLC_BW_CAP_40MHZ );
75647569 err = brcmf_fil_iovar_data_set (ifp , "bw_cap" , & band_bwcap ,
75657570 sizeof (band_bwcap ));
7571+ brcmf_dbg (INFO , "set bw_cap support:%d\n" , err );
7572+ brcmf_c_set_joinpref_default (ifp );
7573+ updown = 1 ;
7574+ brcmf_fil_cmd_data_set (ifp , BRCMF_C_UP , & updown , sizeof (s32 ));
75667575 } else {
75677576 brcmf_dbg (INFO , "fallback to mimo_bw_cap\n" );
75687577 val = WLC_N_BW_40ALL ;
@@ -7609,7 +7618,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
76097618 return err ;
76107619}
76117620
7612- static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [], bool has_6g )
7621+ static void brcmf_get_bwcap (struct brcmf_if * ifp , u32 bw_cap [4 ], bool has_6g )
76137622{
76147623 struct brcmf_pub * drvr = ifp -> drvr ;
76157624 u32 band , mimo_bwcap ;
@@ -7664,7 +7673,7 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[], bool has_6g)
76647673}
76657674
76667675static void brcmf_update_ht_cap (struct ieee80211_supported_band * band ,
7667- u32 bw_cap [2 ], u32 nrxchain )
7676+ u32 bw_cap [4 ], u32 nrxchain )
76687677{
76697678 /* Not supported in 6G band */
76707679 if (band -> band == NL80211_BAND_6GHZ )
@@ -7695,7 +7704,7 @@ static __le16 brcmf_get_mcs_map(u32 nstreams,
76957704}
76967705
76977706static void brcmf_update_vht_cap (struct ieee80211_supported_band * band ,
7698- u32 bw_cap [2 ], u32 txstreams , u32 rxstreams ,
7707+ u32 bw_cap [4 ], u32 txstreams , u32 rxstreams ,
76997708 u32 txbf_bfe_cap , u32 txbf_bfr_cap ,
77007709 u32 ldpc_cap , u32 stbc_rx , u32 stbc_tx )
77017710{
@@ -7880,7 +7889,7 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
78807889 u32 nmode = 0 ;
78817890 u32 vhtmode = 0 ;
78827891 /* 2GHZ, 5GHZ, 60GHZ, 6GHZ */
7883- u32 bw_cap [4 ] = { WLC_BW_20MHZ_BIT , WLC_BW_20MHZ_BIT , 0 , 0 };
7892+ u32 bw_cap [4 ] = { 0 , 0 , 0 , 0 };
78847893 u32 rxchain ;
78857894 u32 txchain ;
78867895 u32 nrxchain ;
0 commit comments