backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] backports: Add time64_to_tm and ipv6_mc_check_mld
@ 2020-11-10 14:03 Shay Bar
  2020-11-15 13:46 ` Hauke Mehrtens
  0 siblings, 1 reply; 3+ messages in thread
From: Shay Bar @ 2020-11-10 14:03 UTC (permalink / raw)
  To: hauke, mcgrof; +Cc: backports, eliav.farber

ipv6_mc_check_mld() was added in kernel version 4.2.0.
The 2nd parameter was removed in kernel version 5.1.0.

time64_to_tm() was added in kernel version 4.8.0.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
---
 backport/backport-include/linux/time.h   |  8 ++++++++
 backport/backport-include/net/addrconf.h | 15 +++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/backport/backport-include/linux/time.h b/backport/backport-include/linux/time.h
index 3191047d..ce8a1b03 100644
--- a/backport/backport-include/linux/time.h
+++ b/backport/backport-include/linux/time.h
@@ -4,4 +4,12 @@
 
 #include <linux/time64.h>
 
+#if LINUX_VERSION_IS_LESS(4,8,0)
+static inline void time64_to_tm(time64_t totalsecs, int offset,
+				struct tm *result)
+{
+	time_to_tm((time_t)totalsecs, 0, result);
+}
+#endif
+
 #endif /* __BACKPORT_LINUX_TIME_H */
diff --git a/backport/backport-include/net/addrconf.h b/backport/backport-include/net/addrconf.h
index f1e8e627..67d44e19 100644
--- a/backport/backport-include/net/addrconf.h
+++ b/backport/backport-include/net/addrconf.h
@@ -22,4 +22,19 @@ static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr)
 }
 #endif /* LINUX_VERSION_IS_LESS(3,9,0) */
 
+#if LINUX_VERSION_IS_LESS(4,2,0)
+static inline int ipv6_mc_check_mld(struct sk_buff *skb)
+{
+	WARN_ON(1);
+
+	return -1;
+}
+#elif LINUX_VERSION_IS_LESS(5,1,0)
+static inline int backport_ipv6_mc_check_mld(struct sk_buff *skb)
+{
+	return ipv6_mc_check_mld(skb, NULL);
+}
+#define ipv6_mc_check_mld LINUX_BACKPORT(ipv6_mc_check_mld)
+#endif
+
 #endif	/* _BACKPORT_NET_ADDRCONF_H */
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] backports: Add time64_to_tm and ipv6_mc_check_mld
  2020-11-10 14:03 [PATCH] backports: Add time64_to_tm and ipv6_mc_check_mld Shay Bar
@ 2020-11-15 13:46 ` Hauke Mehrtens
  2020-11-15 14:07   ` Shay Bar
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2020-11-15 13:46 UTC (permalink / raw)
  To: Shay Bar, mcgrof; +Cc: backports, eliav.farber


[-- Attachment #1.1.1: Type: text/plain, Size: 378 bytes --]

On 11/10/20 3:03 PM, Shay Bar wrote:
> ipv6_mc_check_mld() was added in kernel version 4.2.0.
> The 2nd parameter was removed in kernel version 5.1.0.
> 
> time64_to_tm() was added in kernel version 4.8.0.
> 
> Signed-off-by: Shay Bar <shay.bar@celeno.com>

Hi Shay,

Where are these functions used? I can not find ayn wifi driver in kernel 
5.10 using it.

Hauke

[-- Attachment #1.1.2: OpenPGP_0x93DD20630910B515.asc --]
[-- Type: application/pgp-keys, Size: 10027 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] backports: Add time64_to_tm and ipv6_mc_check_mld
  2020-11-15 13:46 ` Hauke Mehrtens
@ 2020-11-15 14:07   ` Shay Bar
  0 siblings, 0 replies; 3+ messages in thread
From: Shay Bar @ 2020-11-15 14:07 UTC (permalink / raw)
  To: Hauke Mehrtens, mcgrof; +Cc: backports, Eliav Farber

Hi Hauke,

Indeed, no wifi driver is currently using them, but we plan to
commit our new driver (that uses it) to the kernel.

Should I ping this patch again once we upstream or can you
already accept it now ?

Thanks,
Shay.
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-15 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 14:03 [PATCH] backports: Add time64_to_tm and ipv6_mc_check_mld Shay Bar
2020-11-15 13:46 ` Hauke Mehrtens
2020-11-15 14:07   ` Shay Bar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).