Thread (39 messages) 39 messages, 5 authors, 2012-09-05

Re: [RFC 06/20] mac80211: refactor set_channel_type

From: Eliad Peller <hidden>
Date: 2012-07-29 09:03:11

On Fri, Jul 27, 2012 at 2:16 PM, Johannes Berg
[off-list ref] wrote:
From: Michal Kazior <redacted>

Split functionality for further reuse.

Will prevent code duplication when channel context
channel_type merging is introduced.

Signed-off-by: Michal Kazior <redacted>
Signed-off-by: Johannes Berg <redacted>
---
+
+bool ieee80211_set_channel_type(struct ieee80211_local *local,
+                               struct ieee80211_sub_if_data *sdata,
+                               enum nl80211_channel_type chantype)
+{
+       enum nl80211_channel_type superchan;
+       enum nl80211_channel_type compatchan = NL80211_CHAN_NO_HT;
+
no need to initialize compatchan.
+       superchan = ieee80211_get_superchan(local, sdata);
+       if (!ieee80211_channel_types_are_compatible(superchan, chantype,
+                                                   &compatchan))
+               return false;
+
as it should be assigned here.

Eliad.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help