Sean Wang <sean.wang@xxxxxxxxxx> writes: >> > > > +static int mt7921_check_offload_capability(struct mt7921_dev *dev) >> > > > +{ >> > > > + struct ieee80211_hw *hw = mt76_hw(dev); >> > > > + int year, mon, day, hour, min, sec; >> > > > + struct wiphy *wiphy = hw->wiphy; >> > > > + bool fw_can_roc = false; >> > > > + int ret; >> > > > + >> > > > + ret = sscanf(dev->mt76.hw->wiphy->fw_version + 11, "%4d%2d%2d%2d%2d%2d", >> > > > + &year, &mon, &day, &hour, &min, &sec); >> > > >> > > does the fw have a differnt base version with respect to the previous ones? >> > > checking the date is a bit ugly. >> > >> > I admitted that way was a bit ugly, but I have investigated for a >> > while, and that is the only way we can use to distinguish the version >> > in current mt7921 firmware. >> >> the fw seems pretty new (2022/7/15), is it already available in linux-firmware >> git tree? If not I guess you can increment fw version in a more evident way. >> For the future please remember to do it for major fw changes. > > The new FW is not released in linux-firmware. I will try to figure out > a better way to recognize the FW can support the feature and add it in > v2. It would be a lot better and more future proof to use some kind feature advertising instead of guessing from a firmware version. For example, ath11k uses WMI service bits and other upstream drivers have something similar. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches