aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-14 13:17:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:14 -0400
commit9124b07740c51cbc6e358dd0c4abc6ee8ded084d (patch)
tree5746885ca90399588f0735aa1a5511648f0be329 /net/mac80211/wext.c
parent525181891fb5ed323b6ba0f141c422f1395acfb9 (diff)
mac80211: make retry limits part of hw config
Instead of having a separate callback, use the HW config callback with a new flag to change retry limits. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 94c4b35eeb14..f7e442f80a17 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -802,21 +802,16 @@ static int ieee80211_ioctl_siwretry(struct net_device *dev,
802 (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) 802 (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
803 return -EINVAL; 803 return -EINVAL;
804 804
805 if (retry->flags & IW_RETRY_MAX) 805 if (retry->flags & IW_RETRY_MAX) {
806 local->long_retry_limit = retry->value; 806 local->hw.conf.long_frame_max_tx_count = retry->value;
807 else if (retry->flags & IW_RETRY_MIN) 807 } else if (retry->flags & IW_RETRY_MIN) {
808 local->short_retry_limit = retry->value; 808 local->hw.conf.short_frame_max_tx_count = retry->value;
809 else { 809 } else {
810 local->long_retry_limit = retry->value; 810 local->hw.conf.long_frame_max_tx_count = retry->value;
811 local->short_retry_limit = retry->value; 811 local->hw.conf.short_frame_max_tx_count = retry->value;
812 } 812 }
813 813
814 if (local->ops->set_retry_limit) { 814 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS);
815 return local->ops->set_retry_limit(
816 local_to_hw(local),
817 local->short_retry_limit,
818 local->long_retry_limit);
819 }
820 815
821 return 0; 816 return 0;
822} 817}
@@ -833,14 +828,15 @@ static int ieee80211_ioctl_giwretry(struct net_device *dev,
833 /* first return min value, iwconfig will ask max value 828 /* first return min value, iwconfig will ask max value
834 * later if needed */ 829 * later if needed */
835 retry->flags |= IW_RETRY_LIMIT; 830 retry->flags |= IW_RETRY_LIMIT;
836 retry->value = local->short_retry_limit; 831 retry->value = local->hw.conf.short_frame_max_tx_count;
837 if (local->long_retry_limit != local->short_retry_limit) 832 if (local->hw.conf.long_frame_max_tx_count !=
833 local->hw.conf.short_frame_max_tx_count)
838 retry->flags |= IW_RETRY_MIN; 834 retry->flags |= IW_RETRY_MIN;
839 return 0; 835 return 0;
840 } 836 }
841 if (retry->flags & IW_RETRY_MAX) { 837 if (retry->flags & IW_RETRY_MAX) {
842 retry->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; 838 retry->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
843 retry->value = local->long_retry_limit; 839 retry->value = local->hw.conf.long_frame_max_tx_count;
844 } 840 }
845 841
846 return 0; 842 return 0;