It seems that you (initially) confused "firmware-atheros" with
"firmware-ath9k-htc". The first is non-free firmware (mainly) for ath10k and
Atheros bluetooth. The second is free/libre and is in the main repository of
Debian, and provides free/libre firmware for ath9k-htc cards including
AR9271.
By installing the non-free package "firmware-atheros", you installed lots of
non-free blobs, not only for your AR9271 but also for ath10k and bluetooth.
You should remove this package and reinstall "firmware-ath9k-htc" (I'm glad
to see that you've already done so.). Debian's non-official ISO images with
non-free firmware are not good, either, so stay away from them.
I have been Debian testing/unstable user for years. I routinely test the
weekly builds of Debian (testing) installer. Strangely, although
"firmware-ath9k-htc" is free/libre, it is not integrated into the installer
image. If I insert an AR9271 during installation, the installer doesn't
prompt me to provide the free/libre firmware package (firmware-ath9k-htc). I
wonder whether it shall be integrated into new Debian testing (bullseye)
installer image.