From: Pavel Roskin <proski@gnu.org>
To: Jouni Malinen <j@w1.fi>, John W Linville <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: [PATCH 3/5] hostap: don't skip any headers in hostap_80211_header_parse()
Date: Fri, 27 Jun 2008 16:20:04 -0400 [thread overview]
Message-ID: <20080627202004.18603.41908.stgit@dv.roinet.com> (raw)
In-Reply-To: <20080627201952.18603.98308.stgit@dv.roinet.com>
Don't try to skip any headers in hostap_80211_header_parse(). We never
use that function for interfaces affected by local->monitor_type. Both
the master and the AP interface receive 802.11 frames without any
additional headers.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/hostap/hostap_main.c | 20 +-------------------
1 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index a38e85f..756ab56 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -597,25 +597,7 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
static int hostap_80211_header_parse(const struct sk_buff *skb,
unsigned char *haddr)
{
- struct hostap_interface *iface = netdev_priv(skb->dev);
- local_info_t *local = iface->local;
-
- if (local->monitor_type == PRISM2_MONITOR_PRISM ||
- local->monitor_type == PRISM2_MONITOR_CAPHDR) {
- const unsigned char *mac = skb_mac_header(skb);
-
- if (*(u32 *)mac == LWNG_CAP_DID_BASE) {
- memcpy(haddr,
- mac + sizeof(struct linux_wlan_ng_prism_hdr) + 10,
- ETH_ALEN); /* addr2 */
- } else { /* (*(u32 *)mac == htonl(LWNG_CAPHDR_VERSION)) */
- memcpy(haddr,
- mac + sizeof(struct linux_wlan_ng_cap_hdr) + 10,
- ETH_ALEN); /* addr2 */
- }
- } else
- memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
-
+ memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
return ETH_ALEN;
}
next prev parent reply other threads:[~2008-06-27 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 20:19 [PATCH 1/5] hostap: don't report useless WDS frames by default Pavel Roskin
2008-06-27 20:19 ` [PATCH 2/5] hostap: fix sparse warnings Pavel Roskin
2008-06-27 20:20 ` Pavel Roskin [this message]
2008-06-27 20:20 ` [PATCH 4/5] hostap: add radiotap support in monitor mode Pavel Roskin
2008-06-27 20:20 ` [PATCH 5/5] hostap: use radiotap headers by default Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080627202004.18603.41908.stgit@dv.roinet.com \
--to=proski@gnu.org \
--cc=j@w1.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).