Writing new driver using API since kernel v4.6

In my attempts to write a new driver for use with Lede/OpenWRT I didn’t realize that I’m using an API which is only available since kernel v4.6.

My target is the Ramips MT7621 and MT7628, development is already on the way with v4.14, but the stable releases are still on v4.4.

My question is would it make sense to rewrite some code to be compatible with this version or should I just accept the fact that I can’t make everyone happy by hanging on to the past??

Hi, I think that supporting 4.4 would cause more headaches - the target for the next release is 4.9/14 so you will be covered there. Since the next release is scheduled for the next month and a half you would be covering the latest stable version.

1 Like

Just write it for 4.14 since that is what Ramips will be on stable as 4.14 is already default for it now.
Current 17.01 stable is pretty old now and 4.4 would require a lot of backports

Thanks, "everything" after 4.6 should work. I'm debugging/cleaning the code now. Should have a beta release soon.

There's been a push for 4.14 on a lot of architectures lately, and I myself have been running master with the 4.14 kernel on my DIR-860L for like a week now (ever since Felix pushed 4.14 support for ramips to master). No hiccups whatsoever so far. I suppose the codebase will be frozen somewhere in March (I haven't read the lede-adm mailing list lately), and there's been tons of commits for the past few weeks, whereas it had been pretty quiet before. Really looks like things are picking up with a code freeze/fork coming up.