Thank you, Frank. I was testing yesterday again. I removed all GPIO and USB devices from RPi, I burned stock image again (the same you tested with), I connected it via LAN and configured Wi-Fi. I'm using DHCP, no static IP. Then I brought the Pi close to the router to have a full signal and I started testing. Maybe I expressed myself bad, the problem is not that Wi-Fi is not working at all. It works but sometimes it won't connect. So I was rebooting it a 10-20 times to test and sometimes it connects but sometimes it won't. I noticed that, if I do a Power Off and then unplug and plug the power again, there's a much higher probability that it will connect than if I just reboot it. When I reboot it, it mostly won't connect. Sometimes it works good (I managed to reboot it a few times and it connected every time) but sometimes it won't connect even after more than 5 reboots.
When it won't connect, the adapter still works, the LED on it is on, I can scan for networks from UI, and when I choose my network and press CONNECT, UI shows the message (blue box in bottom right corner) that it's now connected but it's not. "ip link" tells that adapter is down.
It's hard to tell where is the problem because sometimes it can work good for a longer period, but sometimes it's a nightmare. Now I turned it on again, only with Wi-Fi and it connected successfully, even from my room where Wi-Fi signal is weak from router so it probably catches a signal from repeater. But I'm scared that as soon as I connect all my devices to it (USB hub with HDD and external DAC, I2C LCD display, buttons, IR receiver) and start installing neccessary things, that it will break. Furthermore, I'm currently rebooting it all the time (Reboot option from UI), and 4-5 times in a row it connected successfully, but then suddenly it didn't connect. So I removed the power plug and plugged it in again and then it connected. And then I tried to reboot it from UI again, and it didn't connect. Then I unplugged it and plugged again, and it connected. And then I did a reboot and again, it didn't connect so I cut the power from it again and plug it back and it connected.
INFO
Raspberry Pi 2
Wi-Fi: TP-Link TL-WN722N
SD: SanDisk Ultra microSDHC Class 10 8 GB
Burned with: Win32 Disk Imager
Now I connected the LAN as well and rebooted it, and it did connect with both. As you can see, today is working fine but it's still somehow not very stable. Now I can't get it to not connect so I can grab the debug data
I'm scared that it will start making problems soon as I start installing things. Now I have to enable I2C and LIRC again.
I finally succeded at it failing to connect
Here's the debug data:
http://pastebin.com/7muKtLW8 (the message was too long so I copied it to pastebin).
PROBLEM 2Almost forgot, I have another problem with network. Once it connects, everything works fine (I can listen to online radio stations for hours, even in flac) but there are some problems with pacman. When I try to install or update something and when it downloads required files, often happens that the speed starts to drop from max speed (around 500 kB/s) to almost zero. When it reaches a few bytes per second, it throws an error that the speed is too slow. When I repeat the command for install/update, then it works without problems. This is happening both on Wi-Fi and LAN.