Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> writes: > This patch implements all the necessary features needed to keep > operating channel information in sync between firmware and driver: > > - implement cfg80211 qtnf_get_channel handler > - implement QLINK_EVENT_FREQ_CHANGE event handling > using this event firmware notifies host when operating channel is changed > - update qtnf_dump_survey > specify current channel in use in survey report > - update qtnf_connect > pass to firmware channel number rather than frequency > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> [...] > +static int > +qtnf_event_handle_freq_change(struct qtnf_wmac *mac, > + const struct qlink_event_freq_change *data, > + u16 len) > +{ > + struct wiphy *wiphy = priv_to_wiphy(mac); > + struct cfg80211_chan_def chandef; > + struct ieee80211_channel *chan; > + struct qtnf_bss_config *bss_cfg; > + struct qtnf_vif *vif; > + int freq; > + int i; > + > + if (len < sizeof(*data)) { > + pr_err("payload is too short\n"); > + return -EINVAL; > + } > + > + freq = le32_to_cpu(data->freq); > + chan = ieee80211_get_channel(wiphy, freq); > + if (!chan) { > + pr_err("channel at %d MHz not found\n", freq); > + return -EINVAL; > + } > + > + pr_info("MAC%d switch to new channel %u MHz\n", mac->macid, freq); Should this be a debug message? I don't see why the driver would need to spam this every time. -- Kalle Valo