Message ID | 1383048716-5886-1-git-send-email-janusz.dziedzic@tieto.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, Oct 29, 2013 at 1:11 PM, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote: > Handle correctly prohibited flags in cfg80211_secondary_chans_ok() > function. Before, we ignore IEEE80211_CHAN_RADAR flag even > caller put the flag as prohibited one. > > Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> > --- > net/wireless/chan.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/net/wireless/chan.c b/net/wireless/chan.c > index a6f5c4c..6f2be48 100644 > --- a/net/wireless/chan.c > +++ b/net/wireless/chan.c > @@ -438,16 +438,7 @@ static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy, > > for (freq = start_freq; freq <= end_freq; freq += 20) { > c = ieee80211_get_channel(wiphy, freq); > - if (!c) > - return false; > - > - /* check for radar flags */ > - if ((prohibited_flags & c->flags & IEEE80211_CHAN_RADAR) && > - (c->dfs_state != NL80211_DFS_AVAILABLE)) > - return false; > - > - /* check for the other flags */ > - if (c->flags & prohibited_flags & ~IEEE80211_CHAN_RADAR) > + if (!c || c->flags & prohibited_flags) > return false; > } NACK Although you do something that looks good here you are breaking this check atomically for this commit and introducing a regression here, you want to merge the two patches together. Luis -- 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
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index a6f5c4c..6f2be48 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -438,16 +438,7 @@ static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy, for (freq = start_freq; freq <= end_freq; freq += 20) { c = ieee80211_get_channel(wiphy, freq); - if (!c) - return false; - - /* check for radar flags */ - if ((prohibited_flags & c->flags & IEEE80211_CHAN_RADAR) && - (c->dfs_state != NL80211_DFS_AVAILABLE)) - return false; - - /* check for the other flags */ - if (c->flags & prohibited_flags & ~IEEE80211_CHAN_RADAR) + if (!c || c->flags & prohibited_flags) return false; }
Handle correctly prohibited flags in cfg80211_secondary_chans_ok() function. Before, we ignore IEEE80211_CHAN_RADAR flag even caller put the flag as prohibited one. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> --- net/wireless/chan.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)