Hi all,

Today's linux-next merge of the net-next tree got a conflict in
net/mac80211/ibss.c between commit 75a423f493ff ("mac80211: ibss: fix
ignored channel parameter") from the wireless tree and commit
7ca15a0ae865 ("mac80211: allow scanning for 5/10 MHz channels in IBSS")
from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

diff --cc net/mac80211/ibss.c
index 2d45643,e08387c..0000000
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@@ -48,12 -49,13 +49,14 @@@ static void __ieee80211_sta_join_ibss(s
        u8 *pos;
        struct ieee80211_supported_band *sband;
        struct cfg80211_bss *bss;
-       u32 bss_change;
-       u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
+       u32 bss_change, rate_flags, rates = 0, rates_added = 0;
        struct cfg80211_chan_def chandef;
 +      struct ieee80211_channel *chan;
+       enum nl80211_bss_scan_width scan_width;
+       bool have_higher_than_11mbit = false;
        struct beacon_data *presp;
        int frame_len;
+       int shift;
  
        sdata_assert_lock(sdata);
  
@@@ -82,10 -84,16 +85,18 @@@
  
        sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
  
 -      chandef = ifibss->chandef;
 +      /* make a copy of the chandef, it could be modified below. */
 +      chandef = *req_chandef;
 +      chan = chandef.chan;
        if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
+               if (chandef.width == NL80211_CHAN_WIDTH_5 ||
+                   chandef.width == NL80211_CHAN_WIDTH_10 ||
+                   chandef.width == NL80211_CHAN_WIDTH_20_NOHT ||
+                   chandef.width == NL80211_CHAN_WIDTH_20) {
+                       sdata_info(sdata,
+                                  "Failed to join IBSS, beacons forbidden\n");
+                       return;
+               }
                chandef.width = NL80211_CHAN_WIDTH_20;
                chandef.center_freq1 = chan->center_freq;
        }
@@@ -267,35 -310,18 +314,39 @@@ static void ieee80211_sta_join_ibss(str
        int i, j;
        u16 beacon_int = cbss->beacon_interval;
        const struct cfg80211_bss_ies *ies;
 +      enum nl80211_channel_type chan_type;
        u64 tsf;
+       u32 rate_flags;
+       int shift;
  
        sdata_assert_lock(sdata);
  
        if (beacon_int < 10)
                beacon_int = 10;
  
 +      switch (sdata->u.ibss.chandef.width) {
 +      case NL80211_CHAN_WIDTH_20_NOHT:
 +      case NL80211_CHAN_WIDTH_20:
 +      case NL80211_CHAN_WIDTH_40:
 +              chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef);
 +              cfg80211_chandef_create(&chandef, cbss->channel, chan_type);
 +              break;
 +      case NL80211_CHAN_WIDTH_5:
 +      case NL80211_CHAN_WIDTH_10:
 +              cfg80211_chandef_create(&chandef, cbss->channel,
 +                                      NL80211_CHAN_WIDTH_20_NOHT);
 +              chandef.width = sdata->u.ibss.chandef.width;
 +              break;
 +      default:
 +              /* fall back to 20 MHz for unsupported modes */
 +              cfg80211_chandef_create(&chandef, cbss->channel,
 +                                      NL80211_CHAN_WIDTH_20_NOHT);
 +              break;
 +      }
 +
        sband = sdata->local->hw.wiphy->bands[cbss->channel->band];
+       rate_flags = ieee80211_chandef_rate_flags(&sdata->u.ibss.chandef);
+       shift = ieee80211_vif_get_shift(&sdata->vif);
  
        basic_rates = 0;
  

Attachment: pgpvvNP1cm1CV.pgp
Description: PGP signature

Reply via email to