Skip to content

Commit bdcf635

Browse files
committed
Fix vwifi build failure due to virtio_find_vqs
Updated vwifi_virtio_init_vqs to match the new virtio_find_vqs API, which replaced separate callback and name arrays with a unified struct. Added and populated the necessary struct fields, enabling proper parameter passing and restoring successful module compilation on newer kernel versions.
1 parent a940502 commit bdcf635

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

vwifi.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,8 +3167,14 @@ static int vwifi_virtio_init_vqs(struct virtio_device *vdev)
31673167
[VWIFI_VQ_TX] = "tx",
31683168
};
31693169

3170-
return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, callbacks, names,
3171-
NULL);
3170+
struct virtqueue_info vqs_info[VWIFI_NUM_VQS];
3171+
for (int i = 0; i < VWIFI_NUM_VQS; i++) {
3172+
vqs_info[i].callback = callbacks[i];
3173+
vqs_info[i].name = names[i];
3174+
vqs_info[i].ctx = NULL; // optional
3175+
}
3176+
3177+
return virtio_find_vqs(vdev, VWIFI_NUM_VQS, vwifi_vqs, vqs_info, NULL);
31723178
}
31733179

31743180
static void vwifi_virtio_fill_vq(struct virtqueue *vq, u8 vnet_hdr_len)

0 commit comments

Comments
 (0)