Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158957
b: refs/heads/master
c: 0b20633
h: refs/heads/master
i:
  158955: 2e2c3e1
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 10, 2009
1 parent 7b77bfb commit 68ee80a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 79c97e97aed7f760d2826c7daf2d42d8eefe9838
refs/heads/master: 0b20633d966eb08506f8796544aef7a9ab5f3544
11 changes: 9 additions & 2 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,13 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
struct cfg80211_registered_device *rdev;
int alloc_size;

WARN_ON(!ops->add_key && ops->del_key);
WARN_ON(ops->add_key && !ops->del_key);
WARN_ON(ops->add_key && (!ops->del_key || !ops->set_default_key));
WARN_ON(ops->auth && (!ops->assoc || !ops->deauth || !ops->disassoc));
WARN_ON(ops->connect && !ops->disconnect);
WARN_ON(ops->join_ibss && !ops->leave_ibss);
WARN_ON(ops->add_virtual_intf && !ops->del_virtual_intf);
WARN_ON(ops->add_station && !ops->del_station);
WARN_ON(ops->add_mpath && !ops->del_mpath);

alloc_size = sizeof(*rdev) + sizeof_priv;

Expand Down Expand Up @@ -687,6 +692,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
mutex_destroy(&wdev->mtx);
break;
case NETDEV_PRE_UP:
if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype)))
return notifier_from_errno(-EOPNOTSUPP);
if (rfkill_blocked(rdev->rfkill))
return notifier_from_errno(-ERFKILL);
break;
Expand Down

0 comments on commit 68ee80a

Please sign in to comment.