diff options
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index ea2e0f958ac3..9964f057bcef 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -1063,8 +1063,12 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev, | |||
1063 | 1063 | ||
1064 | case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: | 1064 | case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: |
1065 | if (sdata->type == IEEE80211_IF_TYPE_AP) { | 1065 | if (sdata->type == IEEE80211_IF_TYPE_AP) { |
1066 | sdata->use_protection = !!value; | 1066 | if (value) |
1067 | ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PROTECTION); | 1067 | sdata->flags |= IEEE80211_SDATA_USE_PROTECTION; |
1068 | else | ||
1069 | sdata->flags &= ~IEEE80211_SDATA_USE_PROTECTION; | ||
1070 | ieee80211_erp_info_change_notify(dev, | ||
1071 | IEEE80211_ERP_CHANGE_PROTECTION); | ||
1068 | } else { | 1072 | } else { |
1069 | ret = -ENOENT; | 1073 | ret = -ENOENT; |
1070 | } | 1074 | } |
@@ -1072,8 +1076,12 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev, | |||
1072 | 1076 | ||
1073 | case PRISM2_PARAM_PREAMBLE: | 1077 | case PRISM2_PARAM_PREAMBLE: |
1074 | if (sdata->type != IEEE80211_IF_TYPE_AP) { | 1078 | if (sdata->type != IEEE80211_IF_TYPE_AP) { |
1075 | sdata->short_preamble = !!value; | 1079 | if (value) |
1076 | ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PREAMBLE); | 1080 | sdata->flags |= IEEE80211_SDATA_SHORT_PREAMBLE; |
1081 | else | ||
1082 | sdata->flags &= ~IEEE80211_SDATA_SHORT_PREAMBLE; | ||
1083 | ieee80211_erp_info_change_notify(dev, | ||
1084 | IEEE80211_ERP_CHANGE_PREAMBLE); | ||
1077 | } else { | 1085 | } else { |
1078 | ret = -ENOENT; | 1086 | ret = -ENOENT; |
1079 | } | 1087 | } |
@@ -1167,11 +1175,11 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev, | |||
1167 | break; | 1175 | break; |
1168 | 1176 | ||
1169 | case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: | 1177 | case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES: |
1170 | *param = sdata->use_protection; | 1178 | *param = !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION); |
1171 | break; | 1179 | break; |
1172 | 1180 | ||
1173 | case PRISM2_PARAM_PREAMBLE: | 1181 | case PRISM2_PARAM_PREAMBLE: |
1174 | *param = sdata->short_preamble; | 1182 | *param = !!(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE); |
1175 | break; | 1183 | break; |
1176 | 1184 | ||
1177 | case PRISM2_PARAM_SHORT_SLOT_TIME: | 1185 | case PRISM2_PARAM_SHORT_SLOT_TIME: |