Search Linux Wireless

Re: [PATCH v3 2/2] mt76: mt7915: fix radar detector logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



śr., 10 lis 2021 o 21:36 Ben Greear <greearb@xxxxxxxxxxxxxxx> napisał(a):
>
> On 8/20/21 1:35 PM, greearb@xxxxxxxxxxxxxxx wrote:
> > From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> >
> > Before this patch, if AP went from ch 100 to ch 36, the radar detector
> > logic in the firmware was not being disabled.  This made the AP appear
> > to be up, but no beacons were seen on air until module reload or
> > reboot.
> >
> > To reproduce this, I change hostapd.conf and restart hostapd.  Others
> > on openwrt used their UI to make changes and problem was seen, but
> > stil others changed channels in some other way and/or had some other
> > difference and could *not* reproduce it.  So, something perhaps a
> > bit subtle.
> >
> > To fix the problem, stop depending on comparing dfs_state, store last
> > freq/bandwidth to detect changes in that, and streamline code that
> > checks to enable/disable radar detection.  And add in error checking
> > and dev_dbg logic so one can see what is actually happening if need
> > to debug this again.
>
> Back when I was working on this, someone sent me an email or chat or something
> about some other way to do this that was simpler and just relied on
> mac80211 timers.  But, I cannot find that email for the life of me.
>
> In case you are reading, please resend!  Evidently this 2/2 patch had
> some regression for someone so it is not acceptable upstream in
> current state...maybe the mac80211 option is best.
>
> Thanks,

--- a/mt7615/mac.c
+++ b/mt7615/mac.c
@@ -2034,6 +2034,11 @@ static int mt7615_dfs_start_radar_detect
  phy->rdd_state |= BIT(1);
  }

+   /* end CAC - upper layer will care about it, lock tx, beacon setup */
+   err = mt7615_mcu_rdd_cmd(dev, RDD_CAC_END, ext_phy, MT_RX_SEL0, 0);
+   if (err < 0)
+       return err;
+
  return 0;
 }

@@ -2104,11 +2109,7 @@ int mt7615_dfs_init_radar_detector(struc
  phy->dfs_state = chandef->chan->dfs_state;

  if (chandef->chan->flags & IEEE80211_CHAN_RADAR) {
-   if (chandef->chan->dfs_state != NL80211_DFS_AVAILABLE)
-     return mt7615_dfs_start_radar_detector(phy);
-
-   return mt7615_mcu_rdd_cmd(dev, RDD_CAC_END, ext_phy,
-   MT_RX_SEL0, 0);
+   return mt7615_dfs_start_radar_detector(phy);
  }

-- 
Janusz Dziedzic




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux