qcacld-3.0: Allow channel change only if SAP is started
AP context in adapter will have existing beacon data of SAP which will be created on SAP start BSS. If userspace requests channel switch before start BSS then trying to access beacon data in hdd_softap_set_channel_change() API might result in NULL pointer dereference. Check if SAP BSS is started on that link info before processing the channel switch request. CRs-Fixed: 3612796 Change-Id: I2d6aefb78914450551f59ee445d76da3dda69a16
This commit is contained in:

committad av
Rahul Choudhary

förälder
9a7b096350
incheckning
f6cc53fbaf
@@ -6396,6 +6396,11 @@ static int drv_cmd_set_channel_switch(struct wlan_hdd_link_info *link_info,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!qdf_atomic_test_bit(SOFTAP_BSS_STARTED, &link_info->link_flags)) {
|
||||
hdd_err("SAP not started");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
status = hdd_parse_set_channel_switch_command(value,
|
||||
&chan_number, &chan_bw);
|
||||
if (status) {
|
||||
|
Referens i nytt ärende
Block a user