From: Chaitanya T K Date: Sat, 4 May 2013 08:36:28 +0000 (+0300) Subject: wlantest: Fix the injection of protected broadcast frames X-Git-Tag: aosp-kk-from-upstream~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=409cd147b7a0685cbcae180c4d81526dd10b9159;p=thirdparty%2Fhostap.git wlantest: Fix the injection of protected broadcast frames Injecting protected broadcast frames fails because of the unnecessary null check for sta. In case of broadcast frames sta can be null, so remove the check. Reported-by: Janardhan R Signed-hostap: Chaitanya T K --- diff --git a/wlantest/inject.c b/wlantest/inject.c index ab8d11315..5b14ca7c6 100644 --- a/wlantest/inject.c +++ b/wlantest/inject.c @@ -285,9 +285,8 @@ int wlantest_inject(struct wlantest *wt, struct wlantest_bss *bss, return -1; } - if (prot != WLANTEST_INJECT_UNPROTECTED && - (bss == NULL || sta == NULL)) { - wpa_printf(MSG_INFO, "No BSS/STA information to inject " + if (prot != WLANTEST_INJECT_UNPROTECTED && bss == NULL) { + wpa_printf(MSG_INFO, "No BSS information to inject " "protected frames"); return -1; }