Deleted Added
full compact
if_urtw.c (228195) if_urtw.c (228621)
1/*-
2 * Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include <sys/cdefs.h>
18__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtw.c 228195 2011-12-02 02:19:03Z kevlo $");
18__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtw.c 228621 2011-12-17 10:23:17Z bschmidt $");
19#include <sys/param.h>
20#include <sys/sockio.h>
21#include <sys/sysctl.h>
22#include <sys/lock.h>
23#include <sys/mutex.h>
24#include <sys/mbuf.h>
25#include <sys/kernel.h>
26#include <sys/socket.h>

--- 617 unchanged lines hidden (view full) ---

644 .pipe_bof = 1,
645 },
646 .callback = urtw_bulk_tx_callback,
647 .timeout = URTW_DATA_TIMEOUT
648 },
649};
650
651static struct ieee80211vap *urtw_vap_create(struct ieee80211com *,
19#include <sys/param.h>
20#include <sys/sockio.h>
21#include <sys/sysctl.h>
22#include <sys/lock.h>
23#include <sys/mutex.h>
24#include <sys/mbuf.h>
25#include <sys/kernel.h>
26#include <sys/socket.h>

--- 617 unchanged lines hidden (view full) ---

644 .pipe_bof = 1,
645 },
646 .callback = urtw_bulk_tx_callback,
647 .timeout = URTW_DATA_TIMEOUT
648 },
649};
650
651static struct ieee80211vap *urtw_vap_create(struct ieee80211com *,
652 const char name[IFNAMSIZ], int unit, int opmode,
653 int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
654 const uint8_t mac[IEEE80211_ADDR_LEN]);
652 const char [IFNAMSIZ], int, enum ieee80211_opmode,
653 int, const uint8_t [IEEE80211_ADDR_LEN],
654 const uint8_t [IEEE80211_ADDR_LEN]);
655static void urtw_vap_delete(struct ieee80211vap *);
656static void urtw_init(void *);
657static void urtw_stop(struct ifnet *, int);
658static void urtw_stop_locked(struct ifnet *, int);
659static int urtw_ioctl(struct ifnet *, u_long, caddr_t);
660static void urtw_start(struct ifnet *);
661static int urtw_alloc_rx_data_list(struct urtw_softc *);
662static int urtw_alloc_tx_data_list(struct urtw_softc *);

--- 325 unchanged lines hidden (view full) ---

988 if (dp->ni != NULL) {
989 ieee80211_free_node(dp->ni);
990 dp->ni = NULL;
991 }
992 }
993}
994
995static struct ieee80211vap *
655static void urtw_vap_delete(struct ieee80211vap *);
656static void urtw_init(void *);
657static void urtw_stop(struct ifnet *, int);
658static void urtw_stop_locked(struct ifnet *, int);
659static int urtw_ioctl(struct ifnet *, u_long, caddr_t);
660static void urtw_start(struct ifnet *);
661static int urtw_alloc_rx_data_list(struct urtw_softc *);
662static int urtw_alloc_tx_data_list(struct urtw_softc *);

--- 325 unchanged lines hidden (view full) ---

988 if (dp->ni != NULL) {
989 ieee80211_free_node(dp->ni);
990 dp->ni = NULL;
991 }
992 }
993}
994
995static struct ieee80211vap *
996urtw_vap_create(struct ieee80211com *ic,
997 const char name[IFNAMSIZ], int unit, int opmode, int flags,
998 const uint8_t bssid[IEEE80211_ADDR_LEN],
999 const uint8_t mac[IEEE80211_ADDR_LEN])
996urtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
997 enum ieee80211_opmode opmode, int flags,
998 const uint8_t bssid[IEEE80211_ADDR_LEN],
999 const uint8_t mac[IEEE80211_ADDR_LEN])
1000{
1001 struct urtw_vap *uvp;
1002 struct ieee80211vap *vap;
1003
1004 if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */
1005 return (NULL);
1006 uvp = (struct urtw_vap *) malloc(sizeof(struct urtw_vap),
1007 M_80211_VAP, M_NOWAIT | M_ZERO);

--- 3439 unchanged lines hidden ---
1000{
1001 struct urtw_vap *uvp;
1002 struct ieee80211vap *vap;
1003
1004 if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */
1005 return (NULL);
1006 uvp = (struct urtw_vap *) malloc(sizeof(struct urtw_vap),
1007 M_80211_VAP, M_NOWAIT | M_ZERO);

--- 3439 unchanged lines hidden ---