aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-19 06:17:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-02 16:13:27 -0400
commit252aa631f88080920a7083ac5a5844ffc5463629 (patch)
treee1482e9cf7c7230acb9ed33c8a24687e48dc7aa1 /net/wireless/nl80211.c
parent4f424867dd4752d457458fec29ca57ce5d7dc4ac (diff)
cfg80211: make action channel type optional
When sending action frames, we want to verify that we do that on the correct channel. However, checking the channel type in addition can get in the way, since the channel type could change on the fly during an association, and it's not useful to have the channel type anyway since it has no effect on the transmission. Therefore, make it optional to specify so that if wanted, it can still be checked, but is not required. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index db71150b8040..90ab3c8519be 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4681,6 +4681,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4681 struct net_device *dev; 4681 struct net_device *dev;
4682 struct ieee80211_channel *chan; 4682 struct ieee80211_channel *chan;
4683 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT; 4683 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
4684 bool channel_type_valid = false;
4684 u32 freq; 4685 u32 freq;
4685 int err; 4686 int err;
4686 void *hdr; 4687 void *hdr;
@@ -4722,6 +4723,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4722 err = -EINVAL; 4723 err = -EINVAL;
4723 goto out; 4724 goto out;
4724 } 4725 }
4726 channel_type_valid = true;
4725 } 4727 }
4726 4728
4727 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); 4729 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
@@ -4745,6 +4747,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4745 goto free_msg; 4747 goto free_msg;
4746 } 4748 }
4747 err = cfg80211_mlme_action(rdev, dev, chan, channel_type, 4749 err = cfg80211_mlme_action(rdev, dev, chan, channel_type,
4750 channel_type_valid,
4748 nla_data(info->attrs[NL80211_ATTR_FRAME]), 4751 nla_data(info->attrs[NL80211_ATTR_FRAME]),
4749 nla_len(info->attrs[NL80211_ATTR_FRAME]), 4752 nla_len(info->attrs[NL80211_ATTR_FRAME]),
4750 &cookie); 4753 &cookie);