I don´t know what model are u using, i had a di-524 here in my office, and when we accessed from the up floor the connecton act like yours, i put an acces point AP900+ and configurated as repeater, and the connection becomes stable.
Maybe you are too far away from the router like me, even with same model and same brand, you can have different ranges.
Try connect your device near the router and see if the problem persists, if not you got your problem.
cya
Wilson