File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
drivers/wifi/nrf_wifi/src Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -875,18 +875,6 @@ int nrf_wifi_channel(const struct device *dev,
875875 return ret ;
876876 }
877877
878- for (i = 0 ; i < MAX_PEERS ; i ++ ) {
879- peer = & sys_dev_ctx -> tx_config .peers [i ];
880- if (peer -> peer_id == -1 ) {
881- continue ;
882- }
883- if (peer -> authorized ) {
884- LOG_ERR ("%s: Cannot change channel when in station connected mode" ,
885- __func__ );
886- return ret ;
887- }
888- }
889-
890878 rpu_ctx_zep = vif_ctx_zep -> rpu_ctx_zep ;
891879 if (!rpu_ctx_zep ) {
892880 LOG_ERR ("%s: rpu_ctx_zep is NULL" , __func__ );
@@ -902,6 +890,18 @@ int nrf_wifi_channel(const struct device *dev,
902890 fmac_dev_ctx = rpu_ctx_zep -> rpu_ctx ;
903891 sys_dev_ctx = wifi_dev_priv (fmac_dev_ctx );
904892
893+ for (i = 0 ; i < MAX_PEERS ; i ++ ) {
894+ peer = & sys_dev_ctx -> tx_config .peers [i ];
895+ if (peer -> peer_id == -1 ) {
896+ continue ;
897+ }
898+ if (peer -> authorized ) {
899+ LOG_ERR ("%s: Cannot change channel when in station connected mode" ,
900+ __func__ );
901+ return ret ;
902+ }
903+ }
904+
905905 if (channel -> oper == WIFI_MGMT_SET ) {
906906 /**
907907 * Send the driver vif_idx instead of upper layer sent if_index.
You can’t perform that action at this time.
0 commit comments