nl80211: Fixed a merge issue in an earlier commit for set_freq

This commit is contained in:
Jouni Malinen 2008-11-26 10:52:45 +02:00 committed by Jouni Malinen
parent 446842b101
commit a78d3dbd02

View file

@ -482,19 +482,21 @@ static int i802_set_freq2(void *priv, struct hostapd_freq_params *freq)
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(drv->iface)); NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(drv->iface));
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq->freq); NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq->freq);
switch (freq->sec_channel_offset) { if (freq->ht_enabled) {
case -1: switch (freq->sec_channel_offset) {
NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET, case -1:
NL80211_SEC_CHAN_BELOW); NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
break; NL80211_SEC_CHAN_BELOW);
case 1: break;
NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET, case 1:
NL80211_SEC_CHAN_ABOVE); NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
break; NL80211_SEC_CHAN_ABOVE);
default: break;
NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET, default:
NL80211_SEC_CHAN_DISABLED); NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
break; NL80211_SEC_CHAN_DISABLED);
break;
}
} }
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0) if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)