aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/ieee80211_wx.c89
1 files changed, 89 insertions, 0 deletions
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
764int 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
809int 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
764EXPORT_SYMBOL(ieee80211_wx_set_encodeext); 850EXPORT_SYMBOL(ieee80211_wx_set_encodeext);
765EXPORT_SYMBOL(ieee80211_wx_get_encodeext); 851EXPORT_SYMBOL(ieee80211_wx_get_encodeext);
766 852
767EXPORT_SYMBOL(ieee80211_wx_get_scan); 853EXPORT_SYMBOL(ieee80211_wx_get_scan);
768EXPORT_SYMBOL(ieee80211_wx_set_encode); 854EXPORT_SYMBOL(ieee80211_wx_set_encode);
769EXPORT_SYMBOL(ieee80211_wx_get_encode); 855EXPORT_SYMBOL(ieee80211_wx_get_encode);
856
857EXPORT_SYMBOL_GPL(ieee80211_wx_set_auth);
858EXPORT_SYMBOL_GPL(ieee80211_wx_get_auth);