Skip to content

Commit 3c37f35

Browse files
dcuidavem330
authored andcommitted
net: mana: Report OS info to the PF driver
The PF driver might use the OS info for statistical purposes. Signed-off-by: Dexuan Cui <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6c7ea69 commit 3c37f35

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/ethernet/microsoft/mana/gdma_main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#include <linux/module.h>
55
#include <linux/pci.h>
6+
#include <linux/utsname.h>
7+
#include <linux/version.h>
68

79
#include "mana.h"
810

@@ -848,6 +850,15 @@ int mana_gd_verify_vf_version(struct pci_dev *pdev)
848850
req.gd_drv_cap_flags3 = GDMA_DRV_CAP_FLAGS3;
849851
req.gd_drv_cap_flags4 = GDMA_DRV_CAP_FLAGS4;
850852

853+
req.drv_ver = 0; /* Unused*/
854+
req.os_type = 0x10; /* Linux */
855+
req.os_ver_major = LINUX_VERSION_MAJOR;
856+
req.os_ver_minor = LINUX_VERSION_PATCHLEVEL;
857+
req.os_ver_build = LINUX_VERSION_SUBLEVEL;
858+
strscpy(req.os_ver_str1, utsname()->sysname, sizeof(req.os_ver_str1));
859+
strscpy(req.os_ver_str2, utsname()->release, sizeof(req.os_ver_str2));
860+
strscpy(req.os_ver_str3, utsname()->version, sizeof(req.os_ver_str3));
861+
851862
err = mana_gd_send_request(gc, sizeof(req), &req, sizeof(resp), &resp);
852863
if (err || resp.hdr.status) {
853864
dev_err(gc->dev, "VfVerifyVersionOutput: %d, status=0x%x\n",

0 commit comments

Comments
 (0)