mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
station: update current BSS frequency on netdev channel switch event
If the connected BSS changes channel, netdev will emit an event with the new channel's frequency. In response, have station change the frequency of the connected scan_bss struct and inform network about the update.
This commit is contained in:
parent
5eb0b7ca8e
commit
920ac37a40
@ -2316,6 +2316,16 @@ static void station_event_roamed(struct station *station, struct scan_bss *new)
|
||||
station_roamed(station);
|
||||
}
|
||||
|
||||
static void station_event_channel_switched(struct station *station,
|
||||
const uint32_t freq)
|
||||
{
|
||||
struct network *network = station->connected_network;
|
||||
|
||||
station->connected_bss->frequency = freq;
|
||||
|
||||
network_bss_update(network, station->connected_bss);
|
||||
}
|
||||
|
||||
static void station_rssi_level_changed(struct station *station,
|
||||
uint8_t level_idx);
|
||||
|
||||
@ -2594,6 +2604,9 @@ static void station_netdev_event(struct netdev *netdev, enum netdev_event event,
|
||||
case NETDEV_EVENT_ROAMED:
|
||||
station_event_roamed(station, (struct scan_bss *) event_data);
|
||||
break;
|
||||
case NETDEV_EVENT_CHANNEL_SWITCHED:
|
||||
station_event_channel_switched(station, l_get_u32(event_data));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user