Is it only causing problem with that specific connection or is it unable to connect any other WiFi connection. If the device is unable to connect to any WiFi then yes your M8 is at fault. But if your M8 is able to connect to other WiFi connections then it can be a problem of Router to device support. There can multiple reasons for your router to not support the device first check how many devices are already connected to that WiFi if it crosses the limit that can be a problem. First disconnect all other devices connected to WiFi and then try connecting M8. If that doesn't work then probably you have to change that router.