diff options
author | Jouni Malinen <j@w1.fi> | 2009-04-20 12:39:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:57:17 -0400 |
commit | b9a5f8cab751d362f7c2d94899ca788c22fcd1ef (patch) | |
tree | e769e2f59ef845cf7c7cc93b64d33eeed49bb9f7 /include/net/cfg80211.h | |
parent | 9e52b0623c6eb49c3f23a326c1fb97bdecc49ba1 (diff) |
nl80211: Add set/get for frag/rts threshold and retry limits
Add new nl80211 attributes that can be used with NL80211_CMD_SET_WIPHY
and NL80211_CMD_GET_WIPHY to manage fragmentation/RTS threshold and
retry limits.
Since these values are stored in struct wiphy, remove the local copy
from mac80211 where feasible (frag & rts threshold). The retry limits
are currently needed in struct ieee80211_conf, but these could be
eventually removed since the driver should have access to the values
in struct wiphy.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 601eac64b02d..54bc69c83691 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -744,6 +744,20 @@ struct cfg80211_ibss_params { | |||
744 | }; | 744 | }; |
745 | 745 | ||
746 | /** | 746 | /** |
747 | * enum wiphy_params_flags - set_wiphy_params bitfield values | ||
748 | * WIPHY_PARAM_RETRY_SHORT: wiphy->retry_short has changed | ||
749 | * WIPHY_PARAM_RETRY_LONG: wiphy->retry_long has changed | ||
750 | * WIPHY_PARAM_FRAG_THRESHOLD: wiphy->frag_threshold has changed | ||
751 | * WIPHY_PARAM_RTS_THRESHOLD: wiphy->rts_threshold has changed | ||
752 | */ | ||
753 | enum wiphy_params_flags { | ||
754 | WIPHY_PARAM_RETRY_SHORT = 1 << 0, | ||
755 | WIPHY_PARAM_RETRY_LONG = 1 << 1, | ||
756 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, | ||
757 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, | ||
758 | }; | ||
759 | |||
760 | /** | ||
747 | * struct cfg80211_ops - backend description for wireless configuration | 761 | * struct cfg80211_ops - backend description for wireless configuration |
748 | * | 762 | * |
749 | * This struct is registered by fullmac card drivers and/or wireless stacks | 763 | * This struct is registered by fullmac card drivers and/or wireless stacks |
@@ -823,6 +837,11 @@ struct cfg80211_ibss_params { | |||
823 | * cfg80211_ibss_joined(), also call that function when changing BSSID due | 837 | * cfg80211_ibss_joined(), also call that function when changing BSSID due |
824 | * to a merge. | 838 | * to a merge. |
825 | * @leave_ibss: Leave the IBSS. | 839 | * @leave_ibss: Leave the IBSS. |
840 | * | ||
841 | * @set_wiphy_params: Notify that wiphy parameters have changed; | ||
842 | * @changed bitfield (see &enum wiphy_params_flags) describes which values | ||
843 | * have changed. The actual parameter values are available in | ||
844 | * struct wiphy. If returning an error, no value should be changed. | ||
826 | */ | 845 | */ |
827 | struct cfg80211_ops { | 846 | struct cfg80211_ops { |
828 | int (*suspend)(struct wiphy *wiphy); | 847 | int (*suspend)(struct wiphy *wiphy); |
@@ -912,6 +931,8 @@ struct cfg80211_ops { | |||
912 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, | 931 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, |
913 | struct cfg80211_ibss_params *params); | 932 | struct cfg80211_ibss_params *params); |
914 | int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); | 933 | int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); |
934 | |||
935 | int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); | ||
915 | }; | 936 | }; |
916 | 937 | ||
917 | /* | 938 | /* |
@@ -945,6 +966,11 @@ struct cfg80211_ops { | |||
945 | * @signal_type: signal type reported in &struct cfg80211_bss. | 966 | * @signal_type: signal type reported in &struct cfg80211_bss. |
946 | * @cipher_suites: supported cipher suites | 967 | * @cipher_suites: supported cipher suites |
947 | * @n_cipher_suites: number of supported cipher suites | 968 | * @n_cipher_suites: number of supported cipher suites |
969 | * @retry_short: Retry limit for short frames (dot11ShortRetryLimit) | ||
970 | * @retry_long: Retry limit for long frames (dot11LongRetryLimit) | ||
971 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); | ||
972 | * -1 = fragmentation disabled, only odd values >= 256 used | ||
973 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | ||
948 | */ | 974 | */ |
949 | struct wiphy { | 975 | struct wiphy { |
950 | /* assign these fields before you register the wiphy */ | 976 | /* assign these fields before you register the wiphy */ |
@@ -967,6 +993,11 @@ struct wiphy { | |||
967 | int n_cipher_suites; | 993 | int n_cipher_suites; |
968 | const u32 *cipher_suites; | 994 | const u32 *cipher_suites; |
969 | 995 | ||
996 | u8 retry_short; | ||
997 | u8 retry_long; | ||
998 | u32 frag_threshold; | ||
999 | u32 rts_threshold; | ||
1000 | |||
970 | /* If multiple wiphys are registered and you're handed e.g. | 1001 | /* If multiple wiphys are registered and you're handed e.g. |
971 | * a regular netdev with assigned ieee80211_ptr, you won't | 1002 | * a regular netdev with assigned ieee80211_ptr, you won't |
972 | * know whether it points to a wiphy your driver has registered | 1003 | * know whether it points to a wiphy your driver has registered |
@@ -1345,6 +1376,25 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev, | |||
1345 | struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, | 1376 | struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, |
1346 | struct iw_freq *freq); | 1377 | struct iw_freq *freq); |
1347 | 1378 | ||
1379 | int cfg80211_wext_siwrts(struct net_device *dev, | ||
1380 | struct iw_request_info *info, | ||
1381 | struct iw_param *rts, char *extra); | ||
1382 | int cfg80211_wext_giwrts(struct net_device *dev, | ||
1383 | struct iw_request_info *info, | ||
1384 | struct iw_param *rts, char *extra); | ||
1385 | int cfg80211_wext_siwfrag(struct net_device *dev, | ||
1386 | struct iw_request_info *info, | ||
1387 | struct iw_param *frag, char *extra); | ||
1388 | int cfg80211_wext_giwfrag(struct net_device *dev, | ||
1389 | struct iw_request_info *info, | ||
1390 | struct iw_param *frag, char *extra); | ||
1391 | int cfg80211_wext_siwretry(struct net_device *dev, | ||
1392 | struct iw_request_info *info, | ||
1393 | struct iw_param *retry, char *extra); | ||
1394 | int cfg80211_wext_giwretry(struct net_device *dev, | ||
1395 | struct iw_request_info *info, | ||
1396 | struct iw_param *retry, char *extra); | ||
1397 | |||
1348 | /* | 1398 | /* |
1349 | * callbacks for asynchronous cfg80211 methods, notification | 1399 | * callbacks for asynchronous cfg80211 methods, notification |
1350 | * functions and BSS handling helpers | 1400 | * functions and BSS handling helpers |