summaryrefslogtreecommitdiff
path: root/package/acx-mac80211/patches/003-add-changes-for-3-10.patch
blob: 18d4f9e3949cdd3d75ed26ebb9aa905b81ccc1f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- a/main.c
+++ b/main.c
@@ -681,6 +681,7 @@ int acx_op_config(struct ieee80211_hw *h
 	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
 		changed_not_done &= ~IEEE80211_CONF_CHANGE_CHANNEL;
 
+#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 10, 0)
 		logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL, "
 			"channel->hw_value=%i\n", conf->channel->hw_value);
 
@@ -689,6 +690,16 @@ int acx_op_config(struct ieee80211_hw *h
 
 		acx_selectchannel(adev, conf->channel->hw_value,
 				conf->channel->center_freq);
+#else
+		logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL, "
+			"channel->hw_value=%i\n", conf->chandef.chan->hw_value);
+
+		if (conf->chandef.chan->hw_value == adev->channel)
+			goto change_channel_done;
+
+		acx_selectchannel(adev, conf->chandef.chan->hw_value,
+				conf->chandef.chan->center_freq);
+#endif
 	}
 change_channel_done:
 	if (changed_not_done)