Skip to content

Commit

Permalink
* (adrian) fix to use the correct node function;
Browse files Browse the repository at this point in the history
* (adrian) use M_80211_NODE to allocate so net80211's node_free will work;
* (adrian) call otus_node_alloc to allocate a node so there's space
  for the driver-local memory.
  • Loading branch information
Adrian Chadd committed Oct 19, 2015
1 parent 5247cd8 commit 1197210
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions otus/freebsd/src/sys/dev/otus/if_otus.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/dev/otus/if_otus.c 288319 2015-09-28 01:09:48Z adrian $");
__FBSDID("$FreeBSD: head/sys/dev/otus/if_otus.c 289557 2015-10-19 01:21:29Z adrian $");

#include "opt_wlan.h"

Expand Down Expand Up @@ -164,7 +164,8 @@ int otus_cmd(struct otus_softc *, uint8_t, const void *, int,
void *, int);
void otus_write(struct otus_softc *, uint32_t, uint32_t);
int otus_write_barrier(struct otus_softc *);
struct ieee80211_node *otus_node_alloc(struct ieee80211com *);
static struct ieee80211_node *otus_node_alloc(struct ieee80211vap *vap,
const uint8_t mac[IEEE80211_ADDR_LEN]);
int otus_media_change(struct ifnet *);
int otus_read_eeprom(struct otus_softc *);
void otus_newassoc(struct ieee80211_node *, int);
Expand Down Expand Up @@ -814,6 +815,7 @@ otus_attachhook(struct otus_softc *sc)
ic->ic_ampdu_enable = otus_ampdu_enable;
ic->ic_wme.wme_update = otus_wme_update;
ic->ic_newassoc = otus_newassoc;
ic->ic_node_alloc = otus_node_alloc;

#ifdef notyet
ic->ic_set_key = otus_set_key;
Expand Down Expand Up @@ -1387,10 +1389,12 @@ otus_write_barrier(struct otus_softc *sc)
return error;
}

struct ieee80211_node *
otus_node_alloc(struct ieee80211com *ic)
static struct ieee80211_node *
otus_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
{
return malloc(sizeof (struct otus_node), M_DEVBUF, M_NOWAIT | M_ZERO);

return malloc(sizeof (struct otus_node), M_80211_NODE,
M_NOWAIT | M_ZERO);
}

#if 0
Expand Down

0 comments on commit 1197210

Please sign in to comment.