|
@@ -4576,6 +4576,23 @@ QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma,
|
|
|
return QDF_STATUS_E_NOSUPPORT;
|
|
|
}
|
|
|
|
|
|
+ if (!bpf_set_offload) {
|
|
|
+ WMA_LOGE("%s: Invalid BPF instruction request", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (bpf_set_offload->session_id >= wma->max_bssid) {
|
|
|
+ WMA_LOGE(FL("Invalid vdev_id: %d"),
|
|
|
+ bpf_set_offload->session_id);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!wma_is_vdev_up(bpf_set_offload->session_id)) {
|
|
|
+ WMA_LOGE("vdev %d is not up skipping BPF offload",
|
|
|
+ bpf_set_offload->session_id);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
if (bpf_set_offload->total_length) {
|
|
|
len_aligned = roundup(bpf_set_offload->current_length,
|
|
|
sizeof(A_UINT32));
|
|
@@ -4617,6 +4634,8 @@ QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma,
|
|
|
wmi_buf_free(wmi_buf);
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
+ WMA_LOGD(FL("BPF offload enabled in fw"));
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|