diff options
author | adrian <adrian@FreeBSD.org> | 2013-05-13 21:17:27 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-05-13 21:17:27 +0000 |
commit | a3b2ceee4e01710e4077468427678f3ddfa8ff6f (patch) | |
tree | bd723faf12d6d7876fa5b2431fed348b4a7ed6ea /sys/dev | |
parent | 641feb7a9e39f8bdd8a2e873ebbe96b0a7bb0a14 (diff) | |
download | FreeBSD-src-a3b2ceee4e01710e4077468427678f3ddfa8ff6f.zip FreeBSD-src-a3b2ceee4e01710e4077468427678f3ddfa8ff6f.tar.gz |
Support sending ATH_ALQ messages with no payload.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/if_ath_alq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_alq.c b/sys/dev/ath/if_ath_alq.c index 1ad13db..8ca53ae 100644 --- a/sys/dev/ath/if_ath_alq.c +++ b/sys/dev/ath/if_ath_alq.c @@ -184,9 +184,11 @@ if_ath_alq_post(struct if_ath_alq *alq, uint16_t op, uint16_t len, /* * Copy the payload _after_ the header field. */ - memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr), - buf, - len); + if (buf != NULL) { + memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr), + buf, + len); + } alq_post(alq->sc_alq_alq, ale); } |