Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327672
b: refs/heads/master
c: c0af073
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Aug 20, 2012
1 parent 7e80a7f commit 0a06028
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b8648704358e42f9865cd6de7cedb5ac0db67e7
refs/heads/master: c0af07340aae5db9f976bfe71e2e9bcab3169409
12 changes: 5 additions & 7 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
int priv_size, i;
struct wiphy *wiphy;

if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config ||
!ops->add_interface || !ops->remove_interface ||
!ops->configure_filter))
return NULL;

if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
return NULL;

Expand Down Expand Up @@ -597,13 +602,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,

local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);

BUG_ON(!ops->tx);
BUG_ON(!ops->start);
BUG_ON(!ops->stop);
BUG_ON(!ops->config);
BUG_ON(!ops->add_interface);
BUG_ON(!ops->remove_interface);
BUG_ON(!ops->configure_filter);
local->ops = ops;

/* set up some defaults */
Expand Down

0 comments on commit 0a06028

Please sign in to comment.