No one is perfect, and this goes double for software developers. All of the quality assurance testing in the world does nothing when you put a new OS in the hands of everyday users, since we all use our devices in different places and for different reasons. Recently, Cyanogen released their version of Android Lollipop, Cyanogen OS 12, and with it came a whole lot of great features, but some bugs also slipped in.
This was made apparent when some users found it impossible to connect to their wireless router. For some reason, the old drivers from CyanogenMod 11S were not ported over to Cyanogen OS 12, but thankfully XDA user blackthund3r has created a flashable ZIP that'll install them on your device.
This will require you to be on a Cyanogen OS 12 or a CyanogenMod 12 nightly build, along with having TWRP installed as your recovery image.
I'll go ahead and preface this guide by letting you know that I have not had a single issue connecting to my router on Cyanogen OS 12, but other users have needed these additional drivers, stating that they have alleviated most of their issues. With that being said, if you're experiencing issues with Wi-Fi, go ahead a download a copy of the drivers here.
With TWRP booted up, tap "Install" and select the ZIP you downloaded in the previous step. "Swipe to Confirm Flash," then tap "Reboot System" once installation has completed.
Once the device reboots, you should be able to connect to your router without a problem. These drivers make it so that your device can now recognize new Wi-Fi frequency channels (both 2.5 GHz and 5 GHz).
If you are still having difficulties, it may be an issue with your hardware, so try factory resetting your router and doing a clean restore on your One to see if that fixes your issues. If not, or if you have other issues with Cyanogen OS 12, let me know in the comments below.