Commit f0f1d016 authored by David S. Miller's avatar David S. Miller

Merge tag 'mac80211-for-davem-2017-12-11' of...

Merge tag 'mac80211-for-davem-2017-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
Three fixes:
 * for certificate C file generation, don't use hexdump as it's
   not always installed by default, use pure posix instead (od/sed)
 * for certificate C file generation, don't write the file if
   anything fails, so the build abort will not cause a bad build
   upon a second attempt
 * fix locking in ieee80211_sta_tear_down_BA_sessions() which had
   been causing lots of locking warnings
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f335195a 0afe9d4a
......@@ -291,16 +291,15 @@ void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,
int i;
mutex_lock(&sta->ampdu_mlme.mtx);
for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
___ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT,
WLAN_REASON_QSTA_LEAVE_QBSS,
reason != AGG_STOP_DESTROY_STA &&
reason != AGG_STOP_PEER_REQUEST);
}
mutex_unlock(&sta->ampdu_mlme.mtx);
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
___ieee80211_stop_tx_ba_session(sta, i, reason);
mutex_unlock(&sta->ampdu_mlme.mtx);
/* stopping might queue the work again - so cancel only afterwards */
cancel_work_sync(&sta->ampdu_mlme.work);
......
......@@ -25,17 +25,45 @@ endif
$(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509)
@$(kecho) " GEN $@"
@echo '#include "reg.h"' > $@
@echo 'const u8 shipped_regdb_certs[] = {' >> $@
@for f in $^ ; do hexdump -v -e '1/1 "0x%.2x," "\n"' < $$f >> $@ ; done
@echo '};' >> $@
@echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);' >> $@
@(set -e; \
allf=""; \
for f in $^ ; do \
# similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \
thisf=$$(od -An -v -tx1 < $$f | \
sed -e 's/ /\n/g' | \
sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \
sed -e 's/^/0x/;s/$$/,/'); \
# file should not be empty - maybe command substitution failed? \
test ! -z "$$thisf";\
allf=$$allf$$thisf;\
done; \
( \
echo '#include "reg.h"'; \
echo 'const u8 shipped_regdb_certs[] = {'; \
echo "$$allf"; \
echo '};'; \
echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
) >> $@)
$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
$(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)
@$(kecho) " GEN $@"
@echo '#include "reg.h"' > $@
@echo 'const u8 extra_regdb_certs[] = {' >> $@
@for f in $^ ; do test -f $$f && hexdump -v -e '1/1 "0x%.2x," "\n"' < $$f >> $@ || true ; done
@echo '};' >> $@
@echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);' >> $@
@(set -e; \
allf=""; \
for f in $^ ; do \
# similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \
thisf=$$(od -An -v -tx1 < $$f | \
sed -e 's/ /\n/g' | \
sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \
sed -e 's/^/0x/;s/$$/,/'); \
# file should not be empty - maybe command substitution failed? \
test ! -z "$$thisf";\
allf=$$allf$$thisf;\
done; \
( \
echo '#include "reg.h"'; \
echo 'const u8 extra_regdb_certs[] = {'; \
echo "$$allf"; \
echo '};'; \
echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \
) >> $@)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment