cd /opt/Sources/
mkdir ath10k-firmware
cd ath10k-firmware

# Backup current files
mkdir backups
cd backups/
tar cvjf QCA6174_$(date -I).tar.bz2 /lib/firmware/ath10k/QCA6174/

# Download
cd ..
wget https://github.com/kvalo/ath10k-firmware/archive/master.zip
unzip master.zip 
cd ath10k-firmware-master/QCA6174/

# Rename some files
mv hw2.1/firmware-5.bin_SW_RM.1.1.1-00157-QCARMSWPZ-1 hw2.1/firmware-5.bin
mv hw3.0/firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1 hw3.0/firmware-4.bin
mv hw3.0/4.4.1.c3/firmware-6.bin_WLAN.RM.4.4.1.c3-00059 hw3.0/firmware-6.bin

# Delete unused files
rm -rf hw3.0/4*
rm -rf hw3.0/sdio-4.4.1*

# Clean up and copy
rm -rf /lib/firmware/ath10k/QCA6174/*
cp -avf * /lib/firmware/ath10k/QCA6174/