From: Luis R. Rodriguez Date: Tue, 4 Aug 2009 18:22:14 +0000 (-0700) Subject: Move libertas changes to 01-netdev.patch X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9341388ea4ec5b92bbd340d35ecdbecfa26660d3;p=openwrt%2Fstaging%2Fblogic.git Move libertas changes to 01-netdev.patch Signed-off-by: Luis R. Rodriguez --- diff --git a/compat/compat.diff b/compat/compat.diff index 89b751d026b6..7656a906c443 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -87,101 +87,6 @@ { lbs_pr_err("error in pcmcia_get_first_tuple etc\n"); goto out1; ---- a/drivers/net/wireless/libertas/main.c -+++ b/drivers/net/wireless/libertas/main.c -@@ -1148,6 +1148,7 @@ static void lbs_free_adapter(struct lbs_private *priv) - lbs_deb_leave(LBS_DEB_MAIN); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - static const struct net_device_ops lbs_netdev_ops = { - .ndo_open = lbs_dev_open, - .ndo_stop = lbs_eth_stop, -@@ -1158,6 +1159,7 @@ static const struct net_device_ops lbs_netdev_ops = { - .ndo_change_mtu = eth_change_mtu, - .ndo_validate_addr = eth_validate_addr, - }; -+#endif - - /** - * @brief This function adds the card. it will probe the -@@ -1193,7 +1195,16 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev) - priv->infra_open = 0; - - /* Setup the OS Interface to our functions */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - dev->netdev_ops = &lbs_netdev_ops; -+#else -+ dev->open = lbs_dev_open; -+ dev->hard_start_xmit = lbs_hard_start_xmit; -+ dev->stop = lbs_eth_stop; -+ dev->set_mac_address = lbs_set_mac_address; -+ dev->tx_timeout = lbs_tx_timeout; -+ dev->set_multicast_list = lbs_set_multicast_list; -+#endif - dev->watchdog_timeo = 5 * HZ; - dev->ethtool_ops = &lbs_ethtool_ops; - #ifdef WIRELESS_EXT -@@ -1419,6 +1430,7 @@ out: - EXPORT_SYMBOL_GPL(lbs_stop_card); - - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - static const struct net_device_ops mesh_netdev_ops = { - .ndo_open = lbs_dev_open, - .ndo_stop = lbs_mesh_stop, -@@ -1426,6 +1438,7 @@ static const struct net_device_ops mesh_netdev_ops = { - .ndo_set_mac_address = lbs_set_mac_address, - .ndo_set_multicast_list = lbs_set_multicast_list, - }; -+#endif - - /** - * @brief This function adds mshX interface -@@ -1449,7 +1462,15 @@ static int lbs_add_mesh(struct lbs_private *priv) - mesh_dev->ml_priv = priv; - priv->mesh_dev = mesh_dev; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - mesh_dev->netdev_ops = &mesh_netdev_ops; -+#else -+ mesh_dev->open = lbs_dev_open; -+ mesh_dev->hard_start_xmit = lbs_hard_start_xmit; -+ mesh_dev->stop = lbs_mesh_stop; -+ mesh_dev->set_mac_address = lbs_set_mac_address; -+ mesh_dev->set_multicast_list = lbs_set_multicast_list; -+#endif - mesh_dev->ethtool_ops = &lbs_ethtool_ops; - memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, - sizeof(priv->dev->dev_addr)); -@@ -1664,11 +1685,13 @@ out: - lbs_deb_leave(LBS_DEB_MAIN); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - static const struct net_device_ops rtap_netdev_ops = { - .ndo_open = lbs_rtap_open, - .ndo_stop = lbs_rtap_stop, - .ndo_start_xmit = lbs_rtap_hard_start_xmit, - }; -+#endif - - static int lbs_add_rtap(struct lbs_private *priv) - { -@@ -1689,7 +1712,13 @@ static int lbs_add_rtap(struct lbs_private *priv) - - memcpy(rtap_dev->dev_addr, priv->current_addr, ETH_ALEN); - rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - rtap_dev->netdev_ops = &rtap_netdev_ops; -+#else -+ rtap_dev->open = lbs_rtap_open; -+ rtap_dev->stop = lbs_rtap_stop; -+ rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; -+#endif - rtap_dev->ml_priv = priv; - SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); - --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -814,16 +814,22 @@ static struct device_driver mac80211_hwsim_driver = { diff --git a/compat/diffs/01-netdev.patch b/compat/diffs/01-netdev.patch index 34f8ec90d8b3..d56c9382c673 100644 --- a/compat/diffs/01-netdev.patch +++ b/compat/diffs/01-netdev.patch @@ -389,3 +389,98 @@ priv->wireless_data.spy_data = &priv->ieee->spy_data; net_dev->wireless_data = &priv->wireless_data; net_dev->wireless_handlers = &ipw_wx_handler_def; +--- a/drivers/net/wireless/libertas/main.c ++++ b/drivers/net/wireless/libertas/main.c +@@ -1148,6 +1148,7 @@ static void lbs_free_adapter(struct lbs_private *priv) + lbs_deb_leave(LBS_DEB_MAIN); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + static const struct net_device_ops lbs_netdev_ops = { + .ndo_open = lbs_dev_open, + .ndo_stop = lbs_eth_stop, +@@ -1158,6 +1159,7 @@ static const struct net_device_ops lbs_netdev_ops = { + .ndo_change_mtu = eth_change_mtu, + .ndo_validate_addr = eth_validate_addr, + }; ++#endif + + /** + * @brief This function adds the card. it will probe the +@@ -1193,7 +1195,16 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev) + priv->infra_open = 0; + + /* Setup the OS Interface to our functions */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + dev->netdev_ops = &lbs_netdev_ops; ++#else ++ dev->open = lbs_dev_open; ++ dev->hard_start_xmit = lbs_hard_start_xmit; ++ dev->stop = lbs_eth_stop; ++ dev->set_mac_address = lbs_set_mac_address; ++ dev->tx_timeout = lbs_tx_timeout; ++ dev->set_multicast_list = lbs_set_multicast_list; ++#endif + dev->watchdog_timeo = 5 * HZ; + dev->ethtool_ops = &lbs_ethtool_ops; + #ifdef WIRELESS_EXT +@@ -1419,6 +1430,7 @@ out: + EXPORT_SYMBOL_GPL(lbs_stop_card); + + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + static const struct net_device_ops mesh_netdev_ops = { + .ndo_open = lbs_dev_open, + .ndo_stop = lbs_mesh_stop, +@@ -1426,6 +1438,7 @@ static const struct net_device_ops mesh_netdev_ops = { + .ndo_set_mac_address = lbs_set_mac_address, + .ndo_set_multicast_list = lbs_set_multicast_list, + }; ++#endif + + /** + * @brief This function adds mshX interface +@@ -1449,7 +1462,15 @@ static int lbs_add_mesh(struct lbs_private *priv) + mesh_dev->ml_priv = priv; + priv->mesh_dev = mesh_dev; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + mesh_dev->netdev_ops = &mesh_netdev_ops; ++#else ++ mesh_dev->open = lbs_dev_open; ++ mesh_dev->hard_start_xmit = lbs_hard_start_xmit; ++ mesh_dev->stop = lbs_mesh_stop; ++ mesh_dev->set_mac_address = lbs_set_mac_address; ++ mesh_dev->set_multicast_list = lbs_set_multicast_list; ++#endif + mesh_dev->ethtool_ops = &lbs_ethtool_ops; + memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, + sizeof(priv->dev->dev_addr)); +@@ -1664,11 +1685,13 @@ out: + lbs_deb_leave(LBS_DEB_MAIN); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + static const struct net_device_ops rtap_netdev_ops = { + .ndo_open = lbs_rtap_open, + .ndo_stop = lbs_rtap_stop, + .ndo_start_xmit = lbs_rtap_hard_start_xmit, + }; ++#endif + + static int lbs_add_rtap(struct lbs_private *priv) + { +@@ -1689,7 +1712,13 @@ static int lbs_add_rtap(struct lbs_private *priv) + + memcpy(rtap_dev->dev_addr, priv->current_addr, ETH_ALEN); + rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + rtap_dev->netdev_ops = &rtap_netdev_ops; ++#else ++ rtap_dev->open = lbs_rtap_open; ++ rtap_dev->stop = lbs_rtap_stop; ++ rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; ++#endif + rtap_dev->ml_priv = priv; + SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); +