diff options
-rw-r--r-- | include/net/ieee80211.h | 8 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_wx.c | 89 |
2 files changed, 97 insertions, 0 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index ff6ef9e1a691..4725ff861c57 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -1285,6 +1285,14 @@ extern int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee, | |||
1285 | extern int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee, | 1285 | extern int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee, |
1286 | struct iw_request_info *info, | 1286 | struct iw_request_info *info, |
1287 | union iwreq_data *wrqu, char *extra); | 1287 | union iwreq_data *wrqu, char *extra); |
1288 | extern int ieee80211_wx_set_auth(struct net_device *dev, | ||
1289 | struct iw_request_info *info, | ||
1290 | union iwreq_data *wrqu, | ||
1291 | char *extra); | ||
1292 | extern int ieee80211_wx_get_auth(struct net_device *dev, | ||
1293 | struct iw_request_info *info, | ||
1294 | union iwreq_data *wrqu, | ||
1295 | char *extra); | ||
1288 | 1296 | ||
1289 | static inline void ieee80211_increment_scans(struct ieee80211_device *ieee) | 1297 | static inline void ieee80211_increment_scans(struct ieee80211_device *ieee) |
1290 | { | 1298 | { |
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index 9496918e6106..e8c55a4d5834 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c | |||
@@ -761,9 +761,98 @@ int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee, | |||
761 | return 0; | 761 | return 0; |
762 | } | 762 | } |
763 | 763 | ||
764 | int ieee80211_wx_set_auth(struct net_device *dev, | ||
765 | struct iw_request_info *info, | ||
766 | union iwreq_data *wrqu, | ||
767 | char *extra) | ||
768 | { | ||
769 | struct ieee80211_device *ieee = netdev_priv(dev); | ||
770 | unsigned long flags; | ||
771 | int err = 0; | ||
772 | |||
773 | spin_lock_irqsave(&ieee->lock, flags); | ||
774 | |||
775 | switch (wrqu->param.flags & IW_AUTH_INDEX) { | ||
776 | case IW_AUTH_WPA_VERSION: | ||
777 | case IW_AUTH_CIPHER_PAIRWISE: | ||
778 | case IW_AUTH_CIPHER_GROUP: | ||
779 | case IW_AUTH_KEY_MGMT: | ||
780 | /* | ||
781 | * Host AP driver does not use these parameters and allows | ||
782 | * wpa_supplicant to control them internally. | ||
783 | */ | ||
784 | break; | ||
785 | case IW_AUTH_TKIP_COUNTERMEASURES: | ||
786 | break; /* FIXME */ | ||
787 | case IW_AUTH_DROP_UNENCRYPTED: | ||
788 | ieee->drop_unencrypted = !!wrqu->param.value; | ||
789 | break; | ||
790 | case IW_AUTH_80211_AUTH_ALG: | ||
791 | break; /* FIXME */ | ||
792 | case IW_AUTH_WPA_ENABLED: | ||
793 | ieee->privacy_invoked = ieee->wpa_enabled = !!wrqu->param.value; | ||
794 | break; | ||
795 | case IW_AUTH_RX_UNENCRYPTED_EAPOL: | ||
796 | ieee->ieee802_1x = !!wrqu->param.value; | ||
797 | break; | ||
798 | case IW_AUTH_PRIVACY_INVOKED: | ||
799 | ieee->privacy_invoked = !!wrqu->param.value; | ||
800 | break; | ||
801 | default: | ||
802 | err = -EOPNOTSUPP; | ||
803 | break; | ||
804 | } | ||
805 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
806 | return err; | ||
807 | } | ||
808 | |||
809 | int ieee80211_wx_get_auth(struct net_device *dev, | ||
810 | struct iw_request_info *info, | ||
811 | union iwreq_data *wrqu, | ||
812 | char *extra) | ||
813 | { | ||
814 | struct ieee80211_device *ieee = netdev_priv(dev); | ||
815 | unsigned long flags; | ||
816 | int err = 0; | ||
817 | |||
818 | spin_lock_irqsave(&ieee->lock, flags); | ||
819 | |||
820 | switch (wrqu->param.flags & IW_AUTH_INDEX) { | ||
821 | case IW_AUTH_WPA_VERSION: | ||
822 | case IW_AUTH_CIPHER_PAIRWISE: | ||
823 | case IW_AUTH_CIPHER_GROUP: | ||
824 | case IW_AUTH_KEY_MGMT: | ||
825 | case IW_AUTH_TKIP_COUNTERMEASURES: /* FIXME */ | ||
826 | case IW_AUTH_80211_AUTH_ALG: /* FIXME */ | ||
827 | /* | ||
828 | * Host AP driver does not use these parameters and allows | ||
829 | * wpa_supplicant to control them internally. | ||
830 | */ | ||
831 | err = -EOPNOTSUPP; | ||
832 | break; | ||
833 | case IW_AUTH_DROP_UNENCRYPTED: | ||
834 | wrqu->param.value = ieee->drop_unencrypted; | ||
835 | break; | ||
836 | case IW_AUTH_WPA_ENABLED: | ||
837 | wrqu->param.value = ieee->wpa_enabled; | ||
838 | break; | ||
839 | case IW_AUTH_RX_UNENCRYPTED_EAPOL: | ||
840 | wrqu->param.value = ieee->ieee802_1x; | ||
841 | break; | ||
842 | default: | ||
843 | err = -EOPNOTSUPP; | ||
844 | break; | ||
845 | } | ||
846 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
847 | return err; | ||
848 | } | ||
849 | |||
764 | EXPORT_SYMBOL(ieee80211_wx_set_encodeext); | 850 | EXPORT_SYMBOL(ieee80211_wx_set_encodeext); |
765 | EXPORT_SYMBOL(ieee80211_wx_get_encodeext); | 851 | EXPORT_SYMBOL(ieee80211_wx_get_encodeext); |
766 | 852 | ||
767 | EXPORT_SYMBOL(ieee80211_wx_get_scan); | 853 | EXPORT_SYMBOL(ieee80211_wx_get_scan); |
768 | EXPORT_SYMBOL(ieee80211_wx_set_encode); | 854 | EXPORT_SYMBOL(ieee80211_wx_set_encode); |
769 | EXPORT_SYMBOL(ieee80211_wx_get_encode); | 855 | EXPORT_SYMBOL(ieee80211_wx_get_encode); |
856 | |||
857 | EXPORT_SYMBOL_GPL(ieee80211_wx_set_auth); | ||
858 | EXPORT_SYMBOL_GPL(ieee80211_wx_get_auth); | ||