diff --git a/utils/nlink/inc/wlan_nlink_srv.h b/utils/nlink/inc/wlan_nlink_srv.h index 4f76a4171d..4cea66031d 100644 --- a/utils/nlink/inc/wlan_nlink_srv.h +++ b/utils/nlink/inc/wlan_nlink_srv.h @@ -65,4 +65,6 @@ int nl_srv_bcast(struct sk_buff *skb); #endif int nl_srv_is_initialized(void); +void nl_srv_ucast_oem(struct sk_buff *skb, int dst_pid, int flag); + #endif diff --git a/utils/nlink/src/wlan_nlink_srv.c b/utils/nlink/src/wlan_nlink_srv.c index d2e3fe0acb..d5c5fcbf9e 100644 --- a/utils/nlink/src/wlan_nlink_srv.c +++ b/utils/nlink/src/wlan_nlink_srv.c @@ -753,3 +753,28 @@ int nl_srv_is_initialized(void) return 0; } #endif + + +/** + * nl_srv_ucast_oem() - Wrapper function to send ucast msgs to OEM + * @skb: sk buffer pointer + * @dst_pid: Destination PID + * @flag: flags + * + * Sends the ucast message to OEM with generic nl socket if CNSS_GENL + * is enabled. Else, use the legacy netlink socket to send. + * + * Return: None + */ +#ifdef CNSS_GENL +void nl_srv_ucast_oem(struct sk_buff *skb, int dst_pid, int flag) +{ + nl_srv_ucast(skb, dst_pid, flag, WLAN_NL_MSG_OEM, + CLD80211_MCGRP_OEM_MSGS); +} +#else +void nl_srv_ucast_oem(struct sk_buff *skb, int dst_pid, int flag) +{ + nl_srv_ucast(skb, dst_pid, flag); +} +#endif