The TP-Link TL-WN822N is a WiFi adapter, which is connected to the USB port and is equipped with two external antennas. The adapter exists in two versions. Version 1 uses the Atheros AR9170 chip set while version 2 uses the Atheros AR7010 chip set. Both versions are supported by Linux, since Ubuntu 12.04 completely automatically.
Version 1 – AR9170
This version has the USB ID 0cf3:1002:
Bus 002 Device 002: ID 0cf3:1002 Atheros Communications, Inc. TP-Link TL-WN821N v2 802.11n [Atheros AR9170]
and is controlled by the kernel module ar9170. A firmware file is needed for this device. This file can be downloaded at http://linuxwireless.org/en/users/Drivers/ar9170#firmware.
Version 2 – AR7010
The second version has the USB ID 0cf3:7015
Bus 001 Device 004: ID 0cf3:7015 Atheros Communications, Inc. TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287]
and is accessed with the help of the ath9k_htc kernel module.
Also this chip set needs a firmware file. This file (if not already part of the used Linux distribution) can be downloaded at: http://linuxwireless.org/en/users/Drivers/ath9k_htc#Firmware.