aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c69
2 files changed, 52 insertions, 18 deletions
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index e80ff608dd2a..3dad1cf8f241 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -3222,7 +3222,6 @@ while (0)
3222 3222
3223 hostap_setup_dev(dev, local, HOSTAP_INTERFACE_MASTER); 3223 hostap_setup_dev(dev, local, HOSTAP_INTERFACE_MASTER);
3224 3224
3225 dev->hard_start_xmit = hostap_master_start_xmit;
3226 dev->type = ARPHRD_IEEE80211; 3225 dev->type = ARPHRD_IEEE80211;
3227 dev->header_ops = &hostap_80211_ops; 3226 dev->header_ops = &hostap_80211_ops;
3228 3227
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 792dd14c894e..6fe122f18c0d 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -815,6 +815,46 @@ const struct header_ops hostap_80211_ops = {
815}; 815};
816EXPORT_SYMBOL(hostap_80211_ops); 816EXPORT_SYMBOL(hostap_80211_ops);
817 817
818
819static const struct net_device_ops hostap_netdev_ops = {
820 .ndo_start_xmit = hostap_data_start_xmit,
821
822 .ndo_open = prism2_open,
823 .ndo_stop = prism2_close,
824 .ndo_do_ioctl = hostap_ioctl,
825 .ndo_set_mac_address = prism2_set_mac_address,
826 .ndo_set_multicast_list = hostap_set_multicast_list,
827 .ndo_change_mtu = prism2_change_mtu,
828 .ndo_tx_timeout = prism2_tx_timeout,
829 .ndo_validate_addr = eth_validate_addr,
830};
831
832static const struct net_device_ops hostap_mgmt_netdev_ops = {
833 .ndo_start_xmit = hostap_mgmt_start_xmit,
834
835 .ndo_open = prism2_open,
836 .ndo_stop = prism2_close,
837 .ndo_do_ioctl = hostap_ioctl,
838 .ndo_set_mac_address = prism2_set_mac_address,
839 .ndo_set_multicast_list = hostap_set_multicast_list,
840 .ndo_change_mtu = prism2_change_mtu,
841 .ndo_tx_timeout = prism2_tx_timeout,
842 .ndo_validate_addr = eth_validate_addr,
843};
844
845static const struct net_device_ops hostap_master_ops = {
846 .ndo_start_xmit = hostap_master_start_xmit,
847
848 .ndo_open = prism2_open,
849 .ndo_stop = prism2_close,
850 .ndo_do_ioctl = hostap_ioctl,
851 .ndo_set_mac_address = prism2_set_mac_address,
852 .ndo_set_multicast_list = hostap_set_multicast_list,
853 .ndo_change_mtu = prism2_change_mtu,
854 .ndo_tx_timeout = prism2_tx_timeout,
855 .ndo_validate_addr = eth_validate_addr,
856};
857
818void hostap_setup_dev(struct net_device *dev, local_info_t *local, 858void hostap_setup_dev(struct net_device *dev, local_info_t *local,
819 int type) 859 int type)
820{ 860{
@@ -830,30 +870,25 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
830 iface->wireless_data.spy_data = &iface->spy_data; 870 iface->wireless_data.spy_data = &iface->spy_data;
831 dev->wireless_data = &iface->wireless_data; 871 dev->wireless_data = &iface->wireless_data;
832 } 872 }
833 dev->wireless_handlers = 873 dev->wireless_handlers = &hostap_iw_handler_def;
834 (struct iw_handler_def *) &hostap_iw_handler_def;
835 dev->do_ioctl = hostap_ioctl;
836 dev->open = prism2_open;
837 dev->stop = prism2_close;
838 dev->set_mac_address = prism2_set_mac_address;
839 dev->set_multicast_list = hostap_set_multicast_list;
840 dev->change_mtu = prism2_change_mtu;
841 dev->tx_timeout = prism2_tx_timeout;
842 dev->watchdog_timeo = TX_TIMEOUT; 874 dev->watchdog_timeo = TX_TIMEOUT;
843 875
844 if (type == HOSTAP_INTERFACE_AP) { 876 switch(type) {
845 dev->hard_start_xmit = hostap_mgmt_start_xmit; 877 case HOSTAP_INTERFACE_AP:
878 dev->netdev_ops = &hostap_mgmt_netdev_ops;
846 dev->type = ARPHRD_IEEE80211; 879 dev->type = ARPHRD_IEEE80211;
847 dev->header_ops = &hostap_80211_ops; 880 dev->header_ops = &hostap_80211_ops;
848 } else { 881 break;
849 dev->hard_start_xmit = hostap_data_start_xmit; 882 case HOSTAP_INTERFACE_MASTER:
883 dev->tx_queue_len = 0; /* use main radio device queue */
884 dev->netdev_ops = &hostap_master_ops;
885 break;
886 default:
887 dev->netdev_ops = &hostap_netdev_ops;
850 } 888 }
851 889
852 dev->mtu = local->mtu; 890 dev->mtu = local->mtu;
853 if (type != HOSTAP_INTERFACE_MASTER) { 891
854 /* use main radio device queue */
855 dev->tx_queue_len = 0;
856 }
857 892
858 SET_ETHTOOL_OPS(dev, &prism2_ethtool_ops); 893 SET_ETHTOOL_OPS(dev, &prism2_ethtool_ops);
859 894