Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci No need to duplicate the members of the wpi_cmd_...
details: https://anonhg.NetBSD.org/src/rev/c26b9e0b18a8
branches: trunk
changeset: 797025:c26b9e0b18a8
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Jul 02 00:04:18 2014 +0000
description:
No need to duplicate the members of the wpi_cmd_data structure within
the wpi_scan_hdr structure when we can just put the wpi_cmd_data
structure within the wpi_scan_hdr structure.
This also brings our if_wpireg.h mostly in line with OpenBSD's 1.18.
diffstat:
sys/dev/pci/if_wpi.c | 16 ++++++++--------
sys/dev/pci/if_wpireg.h | 25 +++++--------------------
2 files changed, 13 insertions(+), 28 deletions(-)
diffs (94 lines):
diff -r 2a2ce713013d -r c26b9e0b18a8 sys/dev/pci/if_wpi.c
--- a/sys/dev/pci/if_wpi.c Tue Jul 01 23:01:54 2014 +0000
+++ b/sys/dev/pci/if_wpi.c Wed Jul 02 00:04:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wpi.c,v 1.59 2014/06/16 22:38:27 jakllsch Exp $ */
+/* $NetBSD: if_wpi.c,v 1.60 2014/07/02 00:04:18 jakllsch Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.59 2014/06/16 22:38:27 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.60 2014/07/02 00:04:18 jakllsch Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -2728,9 +2728,9 @@
hdr = (struct wpi_scan_hdr *)cmd->data;
memset(hdr, 0, sizeof (struct wpi_scan_hdr));
- hdr->txflags = htole32(WPI_TX_AUTO_SEQ);
- hdr->id = WPI_ID_BROADCAST;
- hdr->lifetime = htole32(WPI_LIFETIME_INFINITE);
+ hdr->cmd.flags = htole32(WPI_TX_AUTO_SEQ);
+ hdr->cmd.id = WPI_ID_BROADCAST;
+ hdr->cmd.lifetime = htole32(WPI_LIFETIME_INFINITE);
/*
* Move to the next channel if no packets are received within 5 msecs
@@ -2743,11 +2743,11 @@
if (flags & IEEE80211_CHAN_A) {
hdr->crc_threshold = htole16(1);
/* send probe requests at 6Mbps */
- hdr->rate = wpi_plcp_signal(12);
+ hdr->cmd.rate = wpi_plcp_signal(12);
} else {
hdr->flags = htole32(WPI_CONFIG_24GHZ | WPI_CONFIG_AUTO);
/* send probe requests at 1Mbps */
- hdr->rate = wpi_plcp_signal(2);
+ hdr->cmd.rate = wpi_plcp_signal(2);
}
/* for directed scans, firmware inserts the essid IE itself */
@@ -2797,7 +2797,7 @@
}
/* setup length of probe request */
- hdr->paylen = htole16(frm - (uint8_t *)wh);
+ hdr->cmd.len = htole16(frm - (uint8_t *)wh);
chan = (struct wpi_scan_chan *)frm;
for (c = &ic->ic_channels[1];
diff -r 2a2ce713013d -r c26b9e0b18a8 sys/dev/pci/if_wpireg.h
--- a/sys/dev/pci/if_wpireg.h Tue Jul 01 23:01:54 2014 +0000
+++ b/sys/dev/pci/if_wpireg.h Wed Jul 02 00:04:18 2014 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: if_wpireg.h,v 1.11 2014/06/30 21:33:40 jakllsch Exp $ */
-/* $OpenBSD: if_wpireg.h,v 1.17 2007/07/24 16:07:47 damien Exp $ */
+/* $NetBSD: if_wpireg.h,v 1.12 2014/07/02 00:04:18 jakllsch Exp $ */
+/* $OpenBSD: if_wpireg.h,v 1.18 2007/09/10 20:34:43 damien Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -493,25 +493,10 @@
uint32_t flags;
uint32_t filter;
- /* wpi_cmd_data structure */
- uint16_t paylen;
- uint16_t lnext;
- uint32_t txflags;
- uint8_t rate;
- uint8_t id;
- uint8_t tid;
- uint8_t security;
- uint8_t key[IEEE80211_KEYBUF_SIZE];
- uint8_t tkip[IEEE80211_WEP_MICLEN];
- uint32_t fnext;
- uint32_t lifetime;
- uint8_t ofdm_mask;
- uint8_t cck_mask;
- uint8_t rts_ntries;
- uint8_t data_ntries;
- uint16_t timeout;
- uint16_t txop;
+ /* followed by a struct wpi_cmd_data */
+ struct wpi_cmd_data cmd;
+ /* followed by an array of 4x struct wpi_scan_essid */
struct wpi_scan_essid essid[4];
/* followed by probe request body */
Home |
Main Index |
Thread Index |
Old Index