Message ID | 50B71FA3.7050304@posedge.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 2012-11-29 at 14:11 +0530, Mahesh Palivela wrote: > From: Mahesh Palivela <maheshp@posedge.com> > > Cleanup of unused VHT channel config related code. Huh, good catch, thanks. Applied. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/29/2012 02:22 PM, Johannes Berg wrote: > On Thu, 2012-11-29 at 14:11 +0530, Mahesh Palivela wrote: >> From: Mahesh Palivela <maheshp@posedge.com> >> >> Cleanup of unused VHT channel config related code. > > Huh, good catch, thanks. Applied. Thanks. Even below also can be removed as cfg80211_chandef_usable() checks this at the beginning. if (!cfg80211_chandef_valid(chandef)) return -EINVAL; > > johannes > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2012-11-29 at 14:28 +0530, Mahesh Palivela wrote: > On 11/29/2012 02:22 PM, Johannes Berg wrote: > > On Thu, 2012-11-29 at 14:11 +0530, Mahesh Palivela wrote: > >> From: Mahesh Palivela <maheshp@posedge.com> > >> > >> Cleanup of unused VHT channel config related code. > > > > Huh, good catch, thanks. Applied. > > Thanks. Even below also can be removed as cfg80211_chandef_usable() > checks this at the beginning. > > if (!cfg80211_chandef_valid(chandef)) > return -EINVAL; Hmm good point I'll roll that in. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2012-11-29 at 10:05 +0100, Johannes Berg wrote: > On Thu, 2012-11-29 at 14:28 +0530, Mahesh Palivela wrote: > > On 11/29/2012 02:22 PM, Johannes Berg wrote: > > > On Thu, 2012-11-29 at 14:11 +0530, Mahesh Palivela wrote: > > >> From: Mahesh Palivela <maheshp@posedge.com> > > >> > > >> Cleanup of unused VHT channel config related code. > > > > > > Huh, good catch, thanks. Applied. > > > > Thanks. Even below also can be removed as cfg80211_chandef_usable() > > checks this at the beginning. > > > > if (!cfg80211_chandef_valid(chandef)) > > return -EINVAL; > > Hmm good point I'll roll that in. No actually it can't, cfg80211_chandef_usable() triggers a warning which we can't do if userspace just sends invalid information; however it's doing that for all other in-kernel users intentionally. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/29/2012 2:36 PM, Johannes Berg wrote: > On Thu, 2012-11-29 at 10:05 +0100, Johannes Berg wrote: >> On Thu, 2012-11-29 at 14:28 +0530, Mahesh Palivela wrote: >>> On 11/29/2012 02:22 PM, Johannes Berg wrote: >>>> On Thu, 2012-11-29 at 14:11 +0530, Mahesh Palivela wrote: >>>>> From: Mahesh Palivela <maheshp@posedge.com> >>>>> >>>>> Cleanup of unused VHT channel config related code. >>>> >>>> Huh, good catch, thanks. Applied. >>> >>> Thanks. Even below also can be removed as cfg80211_chandef_usable() >>> checks this at the beginning. >>> >>> if (!cfg80211_chandef_valid(chandef)) >>> return -EINVAL; >> >> Hmm good point I'll roll that in. > > No actually it can't, cfg80211_chandef_usable() triggers a warning which > we can't do if userspace just sends invalid information; however it's > doing that for all other in-kernel users intentionally. ok. So in case of nl80211_parse_chandef() we will be calling cfg80211_chandef_valid() twice. No problem. > > johannes >
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7cce43b..0e7e8d5 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1371,9 +1371,7 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev, struct genl_info *info, struct cfg80211_chan_def *chandef) { - struct ieee80211_sta_ht_cap *ht_cap; - struct ieee80211_sta_vht_cap *vht_cap; - u32 control_freq, width; + u32 control_freq; if (!info->attrs[NL80211_ATTR_WIPHY_FREQ])