* [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18
From: Adrian Bunk @ 2006-01-14 15:21 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: John W. Linville, jgarzik, netdev, linux-kernel
WIRELESS_EXT < 18 will never be true in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/tiacx/acx_struct.h | 5
drivers/net/wireless/tiacx/common.c | 4
drivers/net/wireless/tiacx/conv.c | 2
drivers/net/wireless/tiacx/ioctl.c | 436 -----------------------
drivers/net/wireless/tiacx/pci.c | 8
drivers/net/wireless/tiacx/usb.c | 6
drivers/net/wireless/tiacx/wlan.c | 2
drivers/net/wireless/tiacx/wlan_compat.h | 10
8 files changed, 1 insertion(+), 472 deletions(-)
WIRELESS_EXT < 18 will never be true in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/tiacx/acx_struct.h | 5
drivers/net/wireless/tiacx/common.c | 4
drivers/net/wireless/tiacx/conv.c | 2
drivers/net/wireless/tiacx/ioctl.c | 436 -----------------------
drivers/net/wireless/tiacx/pci.c | 8
drivers/net/wireless/tiacx/usb.c | 6
drivers/net/wireless/tiacx/wlan.c | 2
drivers/net/wireless/tiacx/wlan_compat.h | 10
8 files changed, 1 insertion(+), 472 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h.old 2005-12-03 02:58:36.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h 2005-12-03 02:59:36.000000000 +0100
@@ -1053,9 +1053,8 @@
* the struct net_device. */
/*** Device statistics ***/
struct net_device_stats stats; /* net device statistics */
-#ifdef WIRELESS_EXT
struct iw_statistics wstats; /* wireless statistics */
-#endif
+
/*** Power managment ***/
struct pm_dev *pm; /* PM crap */
@@ -1103,9 +1102,7 @@
u8 scan_rate;
u16 scan_duration;
u16 scan_probe_delay;
-#if WIRELESS_EXT > 15
struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
-#endif
/*** Wireless network settings ***/
/* copy of the device address (ifconfig hw ether) that we actually use
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c.old 2005-12-03 02:59:47.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c 2005-12-03 03:00:04.000000000 +0100
@@ -46,9 +46,7 @@
#include <linux/wireless.h>
#include <linux/pm.h>
#include <linux/vmalloc.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -2707,7 +2705,6 @@
acxlog(L_ASSOC, "%s(%d):%s\n",
__func__, new_status, acx_get_status_name(new_status));
-#if WIRELESS_EXT > 13 /* wireless_send_event() and SIOCGIWSCAN */
/* wireless_send_event never sleeps */
if (ACX_STATUS_4_ASSOCIATED == new_status) {
union iwreq_data wrqu;
@@ -2729,7 +2726,6 @@
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, NULL);
}
-#endif
priv->status = new_status;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c.old 2005-12-03 03:00:17.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c 2005-12-03 03:00:26.000000000 +0100
@@ -36,9 +36,7 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c.old 2005-12-03 03:02:16.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c 2005-12-03 03:02:30.000000000 +0100
@@ -45,9 +45,7 @@
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -1820,11 +1818,7 @@
dev->hard_start_xmit = &acx_i_start_xmit;
dev->get_stats = &acx_e_get_stats;
dev->get_wireless_stats = &acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = &acx_e_ioctl_old;
-#endif
dev->set_multicast_list = &acxpci_i_set_multicast_list;
dev->tx_timeout = &acxpci_i_tx_timeout;
dev->change_mtu = &acx_e_change_mtu;
@@ -3842,7 +3836,6 @@
r100 = txdesc->u.r1.rate;
r111 = txdesc->u.r2.rate111;
-#if WIRELESS_EXT > 13 /* wireless_send_event() and IWEVTXDROP are WE13 */
/* need to check for certain error conditions before we
* clean the descriptor: we still need valid descr data here */
if (unlikely(0x30 & error)) {
@@ -3857,7 +3850,6 @@
MAC_COPY(wrqu.addr.sa_data, hdr->a1);
wireless_send_event(priv->netdev, IWEVTXDROP, &wrqu, NULL);
}
-#endif
/* ...and free the desc */
txdesc->error = 0;
txdesc->ack_failures = 0;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c.old 2005-12-03 03:02:58.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c 2005-12-03 03:03:02.000000000 +0100
@@ -43,9 +43,7 @@
#include <linux/types.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h.old 2005-12-03 03:03:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h 2005-12-03 03:03:19.000000000 +0100
@@ -228,15 +228,6 @@
typedef struct net_device netdevice_t;
#endif
-#ifdef WIRELESS_EXT
-#if (WIRELESS_EXT < 13)
-struct iw_request_info {
- __u16 cmd; /* Wireless Extension command */
- __u16 flags; /* More to come ;-) */
-};
-#endif
-#endif
-
/* Interrupt handler backwards compatibility stuff */
#ifndef IRQ_NONE
#define IRQ_NONE
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--- linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/ioctl.c.old 2006-01-14 15:56:54.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/ioctl.c 2006-01-14 15:59:12.000000000 +0100
@@ -39,9 +39,7 @@
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -330,11 +328,9 @@
case IW_MODE_AUTO:
priv->mode = ACX_MODE_OFF;
break;
-#if WIRELESS_EXT > 14
case IW_MODE_MONITOR:
priv->mode = ACX_MODE_MONITOR;
break;
-#endif /* WIRELESS_EXT > 14 */
case IW_MODE_ADHOC:
priv->mode = ACX_MODE_0_ADHOC;
break;
@@ -382,10 +378,8 @@
switch (priv->mode) {
case ACX_MODE_OFF:
*uwrq = IW_MODE_AUTO; break;
-#if WIRELESS_EXT > 14
case ACX_MODE_MONITOR:
*uwrq = IW_MODE_MONITOR; break;
-#endif /* WIRELESS_EXT > 14 */
case ACX_MODE_0_ADHOC:
*uwrq = IW_MODE_ADHOC; break;
case ACX_MODE_2_STA:
@@ -617,7 +611,6 @@
}
-#if WIRELESS_EXT > 13
/***********************************************************************
** acx_s_scan_add_station
*/
@@ -772,7 +765,6 @@
FN_EXIT1(result);
return result;
}
-#endif /* WIRELESS_EXT > 13 */
/*----------------------------------------------------------------
@@ -1486,39 +1478,6 @@
/***********************************************************************
-** Private functions
-*/
-
-#if WIRELESS_EXT < 13
-/***********************************************************************
-** acx_ioctl_get_iw_priv
-**
-** I added the monitor mode and changed the stuff below
-** to look more like the orinoco driver
-*/
-static int
-acx_ioctl_get_iw_priv(struct iwreq *iwr)
-{
- int result = -EINVAL;
-
- if (!iwr->u.data.pointer)
- return -EINVAL;
- result = verify_area(VERIFY_WRITE, iwr->u.data.pointer,
- sizeof(acx_ioctl_private_args));
- if (result)
- return result;
-
- iwr->u.data.length = VEC_SIZE(acx_ioctl_private_args);
- if (copy_to_user(iwr->u.data.pointer,
- acx_ioctl_private_args, sizeof(acx_ioctl_private_args)) != 0)
- result = -EFAULT;
-
- return result;
-}
-#endif
-
-
-/***********************************************************************
** acx_ioctl_get_nick
*/
static inline int
@@ -2585,7 +2544,6 @@
/***********************************************************************
*/
-#if WIRELESS_EXT >= 13
static const iw_handler acx_ioctl_handler[] =
{
(iw_handler) acx_ioctl_commit, /* SIOCSIWCOMMIT */
@@ -2624,13 +2582,8 @@
(iw_handler) acx_ioctl_get_ap, /* SIOCGIWAP */
(iw_handler) NULL, /* [nothing] */
(iw_handler) acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
-#if WIRELESS_EXT > 13
(iw_handler) acx_ioctl_set_scan, /* SIOCSIWSCAN */
(iw_handler) acx_ioctl_get_scan, /* SIOCGIWSCAN */
-#else /* WE > 13 */
- (iw_handler) NULL, /* SIOCSIWSCAN */
- (iw_handler) NULL, /* SIOCGIWSCAN */
-#endif /* WE > 13 */
(iw_handler) acx_ioctl_set_essid, /* SIOCSIWESSID */
(iw_handler) acx_ioctl_get_essid, /* SIOCGIWESSID */
(iw_handler) acx_ioctl_set_nick, /* SIOCSIWNICKN */
@@ -2694,392 +2647,3 @@
.private_args = (struct iw_priv_args *) acx_ioctl_private_args,
};
-#endif /* WE >= 13 */
-
-
-#if WIRELESS_EXT < 13
-/***********************************************************************
-** Main function
-**
-** acx_e_ioctl_old
-**
-** This is the *OLD* ioctl handler.
-** Make sure to not only place your additions here, but instead mainly
-** in the new one (acx_ioctl_handler[])!
-*/
-int
-acx_e_ioctl_old(netdevice_t *dev, struct ifreq *ifr, int cmd)
-{
- wlandevice_t *priv = netdev_priv(dev);
- int result = 0;
- struct iwreq *iwr = (struct iwreq *)ifr;
-
- log(L_IOCTL, "%s cmd = 0x%04X\n", __func__, cmd);
-
- /* This is the way it is done in the orinoco driver.
- * Check to see if device is present.
- */
- if (0 == netif_device_present(dev)) {
- return -ENODEV;
- }
-
- switch (cmd) {
-/* WE 13 and higher will use acx_ioctl_handler_def */
- case SIOCGIWNAME:
- /* get name == wireless protocol */
- result = acx_ioctl_get_name(dev, NULL,
- (char *)&(iwr->u.name), NULL);
- break;
-
- case SIOCSIWNWID: /* pre-802.11, */
- case SIOCGIWNWID: /* not supported. */
- result = -EOPNOTSUPP;
- break;
-
- case SIOCSIWFREQ:
- /* set channel/frequency (Hz)
- data can be frequency or channel :
- 0-1000 = channel
- > 1000 = frequency in Hz */
- result = acx_ioctl_set_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCGIWFREQ:
- /* get channel/frequency (Hz) */
- result = acx_ioctl_get_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCSIWMODE:
- /* set operation mode */
- result = acx_ioctl_set_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCGIWMODE:
- /* get operation mode */
- result = acx_ioctl_get_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCSIWSENS:
- /* Set sensitivity */
- result = acx_ioctl_set_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
- case SIOCGIWSENS:
- /* Get sensitivity */
- result = acx_ioctl_get_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
-#if WIRELESS_EXT > 10
- case SIOCGIWRANGE:
- /* Get range of parameters */
- {
- struct iw_range range;
- result = acx_ioctl_get_range(dev, NULL,
- &(iwr->u.data), (char *)&range);
- if (copy_to_user(iwr->u.data.pointer, &range,
- sizeof(struct iw_range)))
- result = -EFAULT;
- }
- break;
-#endif
-
- case SIOCGIWPRIV:
- result = acx_ioctl_get_iw_priv(iwr);
- break;
-
- /* case SIOCSIWSPY: */
- /* case SIOCGIWSPY: */
- /* case SIOCSIWTHRSPY: */
- /* case SIOCGIWTHRSPY: */
-
- case SIOCSIWAP:
- /* set access point by MAC address */
- result = acx_ioctl_set_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAP:
- /* get access point MAC address */
- result = acx_ioctl_get_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAPLIST:
- /* get list of access points in range */
- result = acx_ioctl_get_aplist(dev, NULL, &(iwr->u.data),
- NULL);
- break;
-
-#if NOT_FINISHED_YET
- case SIOCSIWSCAN:
- /* start a station scan */
- result = acx_ioctl_set_scan(iwr, priv);
- break;
-
- case SIOCGIWSCAN:
- /* get list of stations found during scan */
- result = acx_ioctl_get_scan(iwr, priv);
- break;
-#endif
-
- case SIOCSIWESSID:
- /* set ESSID (network name) */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.essid.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(essid, iwr->u.essid.pointer,
- iwr->u.essid.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_essid(dev, NULL,
- &(iwr->u.essid), essid);
- }
- break;
-
- case SIOCGIWESSID:
- /* get ESSID */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.essid.pointer)
- result = acx_ioctl_get_essid(dev, NULL,
- &(iwr->u.essid), essid);
- if (copy_to_user(iwr->u.essid.pointer, essid,
- iwr->u.essid.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWNICKN:
- /* set nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.data.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(nick, iwr->u.data.pointer,
- iwr->u.data.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_nick(dev, NULL,
- &(iwr->u.data), nick);
- }
- break;
-
- case SIOCGIWNICKN:
- /* get nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.data.pointer)
- result = acx_ioctl_get_nick(dev, NULL,
- &(iwr->u.data), nick);
- if (copy_to_user(iwr->u.data.pointer, nick,
- iwr->u.data.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWRATE:
- /* set default bit rate (bps) */
- result = acx_ioctl_set_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCGIWRATE:
- /* get default bit rate (bps) */
- result = acx_ioctl_get_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCSIWRTS:
- /* set RTS threshold value */
- result = acx_ioctl_set_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
- case SIOCGIWRTS:
- /* get RTS threshold value */
- result = acx_ioctl_get_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
-
- /* case SIOCSIWFRAG: */
- /* case SIOCGIWFRAG: */
-
-#if WIRELESS_EXT > 9
- case SIOCGIWTXPOW:
- /* get tx power */
- result = acx_ioctl_get_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-
- case SIOCSIWTXPOW:
- /* set tx power */
- result = acx_ioctl_set_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-#endif
-
- case SIOCSIWRETRY:
- result = acx_ioctl_set_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCGIWRETRY:
- result = acx_ioctl_get_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCSIWENCODE:
- {
- /* set encoding token & mode */
- u8 key[29];
- if (iwr->u.encoding.pointer) {
- if (iwr->u.encoding.length > 29) {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(key, iwr->u.encoding.pointer,
- iwr->u.encoding.length)) {
- result = -EFAULT;
- break;
- }
- }
- else
- if (iwr->u.encoding.length) {
- result = -EINVAL;
- break;
- }
- result = acx_ioctl_set_encode(dev, NULL,
- &(iwr->u.encoding), key);
- }
- break;
-
- case SIOCGIWENCODE:
- {
- /* get encoding token & mode */
- u8 key[29];
-
- result = acx_ioctl_get_encode(dev, NULL,
- &(iwr->u.encoding), key);
- if (iwr->u.encoding.pointer) {
- if (copy_to_user(iwr->u.encoding.pointer,
- key, iwr->u.encoding.length))
- result = -EFAULT;
- }
- }
- break;
-
- /******************** iwpriv ioctls below ********************/
-#if ACX_DEBUG
- case ACX100_IOCTL_DEBUG:
- acx_ioctl_set_debug(dev, NULL, NULL, iwr->u.name);
- break;
-#endif
-
- case ACX100_IOCTL_SET_PLED:
- acx100_ioctl_set_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PLED:
- acx100_ioctl_get_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_LIST_DOM:
- acx_ioctl_list_reg_domain(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_SET_DOM:
- acx_ioctl_set_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_DOM:
- acx_ioctl_get_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_SCAN_PARAMS:
- acx_ioctl_set_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_SCAN_PARAMS:
- acx_ioctl_get_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_PREAMB:
- acx_ioctl_set_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PREAMB:
- acx_ioctl_get_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ANT:
- acx_ioctl_set_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_ANT:
- acx_ioctl_get_antenna(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_RX_ANT:
- acx_ioctl_set_rx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TX_ANT:
- acx_ioctl_set_tx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ED:
- acx_ioctl_set_ed_threshold(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_CCA:
- acx_ioctl_set_cca(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_MONITOR: /* set sniff (monitor) mode */
- log(L_IOCTL, "%s: IWPRIV monitor\n", dev->name);
-
- /* can only be done by admin */
- if (!capable(CAP_NET_ADMIN)) {
- result = -EPERM;
- break;
- }
- result = acx_ioctl_wlansniff(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TEST:
- acx_ioctl_unknown11(dev, NULL, NULL, NULL);
- break;
-
- case ACX111_IOCTL_INFO:
- acx111_ioctl_info(dev, NULL, NULL, NULL);
- break;
-
- default:
- log(L_IOCTL, "wireless ioctl 0x%04X queried "
- "but not implemented yet\n", cmd);
- result = -EOPNOTSUPP;
- break;
- }
-
- if ((priv->dev_state_mask & ACX_STATE_IFACE_UP) && priv->set_mask) {
- acx_sem_lock(priv);
- acx_s_update_card_settings(priv);
- acx_sem_unlock(priv);
- }
-
- /* older WEs don't have a commit handler,
- * so we need to fix return code in this case */
- if (-EINPROGRESS == result)
- result = 0;
-
- return result;
-}
-#endif /* WE < 13 */
--- linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/usb.c.old 2006-01-14 15:57:02.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/net/wireless/tiacx/usb.c 2006-01-14 15:57:31.000000000 +0100
@@ -57,9 +57,7 @@
#include <linux/rtnetlink.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/vmalloc.h>
#include "acx.h"
@@ -622,11 +620,7 @@
dev->hard_start_xmit = (void *)&acx_i_start_xmit;
dev->get_stats = (void *)&acx_e_get_stats;
dev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = (void *)&acx_e_ioctl_old;
-#endif
dev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = &acxusb_i_tx_timeout;
^ permalink raw reply
* [2.6 patch] drivers/net/wireless/ipw2100.c: remove code for WIRELESS_EXT < 18
From: Adrian Bunk @ 2006-01-14 15:20 UTC (permalink / raw)
To: yi.zhu, jketreno; +Cc: John W. Linville, netdev, linux-kernel
WIRELESS_EXT < 18 will never be true in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/ipw2100.c | 434 ---------------------------------
1 file changed, 434 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/ipw2100.c.old 2005-12-03 02:56:37.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/ipw2100.c 2005-12-03 02:58:09.000000000 +0100
@@ -5735,70 +5735,6 @@
return &priv->ieee->stats;
}
-#if WIRELESS_EXT < 18
-/* Support for wpa_supplicant before WE-18, deprecated. */
-
-/* following definitions must match definitions in driver_ipw.c */
-
-#define IPW2100_IOCTL_WPA_SUPPLICANT SIOCIWFIRSTPRIV+30
-
-#define IPW2100_CMD_SET_WPA_PARAM 1
-#define IPW2100_CMD_SET_WPA_IE 2
-#define IPW2100_CMD_SET_ENCRYPTION 3
-#define IPW2100_CMD_MLME 4
-
-#define IPW2100_PARAM_WPA_ENABLED 1
-#define IPW2100_PARAM_TKIP_COUNTERMEASURES 2
-#define IPW2100_PARAM_DROP_UNENCRYPTED 3
-#define IPW2100_PARAM_PRIVACY_INVOKED 4
-#define IPW2100_PARAM_AUTH_ALGS 5
-#define IPW2100_PARAM_IEEE_802_1X 6
-
-#define IPW2100_MLME_STA_DEAUTH 1
-#define IPW2100_MLME_STA_DISASSOC 2
-
-#define IPW2100_CRYPT_ERR_UNKNOWN_ALG 2
-#define IPW2100_CRYPT_ERR_UNKNOWN_ADDR 3
-#define IPW2100_CRYPT_ERR_CRYPT_INIT_FAILED 4
-#define IPW2100_CRYPT_ERR_KEY_SET_FAILED 5
-#define IPW2100_CRYPT_ERR_TX_KEY_SET_FAILED 6
-#define IPW2100_CRYPT_ERR_CARD_CONF_FAILED 7
-
-#define IPW2100_CRYPT_ALG_NAME_LEN 16
-
-struct ipw2100_param {
- u32 cmd;
- u8 sta_addr[ETH_ALEN];
- union {
- struct {
- u8 name;
- u32 value;
- } wpa_param;
- struct {
- u32 len;
- u8 reserved[32];
- u8 data[0];
- } wpa_ie;
- struct {
- u32 command;
- u32 reason_code;
- } mlme;
- struct {
- u8 alg[IPW2100_CRYPT_ALG_NAME_LEN];
- u8 set_tx;
- u32 err;
- u8 idx;
- u8 seq[8]; /* sequence counter (set: RX, get: TX) */
- u16 key_len;
- u8 key[0];
- } crypt;
-
- } u;
-};
-
-/* end of driver_ipw.c code */
-#endif /* WIRELESS_EXT < 18 */
-
static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value)
{
/* This is called when wpa_supplicant loads and closes the driver
@@ -5807,11 +5743,6 @@
return 0;
}
-#if WIRELESS_EXT < 18
-#define IW_AUTH_ALG_OPEN_SYSTEM 0x1
-#define IW_AUTH_ALG_SHARED_KEY 0x2
-#endif
-
static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value)
{
@@ -5855,360 +5786,6 @@
ipw2100_set_wpa_ie(priv, &frame, 0);
}
-#if WIRELESS_EXT < 18
-static int ipw2100_wpa_set_param(struct net_device *dev, u8 name, u32 value)
-{
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_crypt_data *crypt;
- unsigned long flags;
- int ret = 0;
-
- switch (name) {
- case IPW2100_PARAM_WPA_ENABLED:
- ret = ipw2100_wpa_enable(priv, value);
- break;
-
- case IPW2100_PARAM_TKIP_COUNTERMEASURES:
- crypt = priv->ieee->crypt[priv->ieee->tx_keyidx];
- if (!crypt || !crypt->ops->set_flags || !crypt->ops->get_flags)
- break;
-
- flags = crypt->ops->get_flags(crypt->priv);
-
- if (value)
- flags |= IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
- else
- flags &= ~IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
-
- crypt->ops->set_flags(flags, crypt->priv);
-
- break;
-
- case IPW2100_PARAM_DROP_UNENCRYPTED:{
- /* See IW_AUTH_DROP_UNENCRYPTED handling for details */
- struct ieee80211_security sec = {
- .flags = SEC_ENABLED,
- .enabled = value,
- };
- priv->ieee->drop_unencrypted = value;
- /* We only change SEC_LEVEL for open mode. Others
- * are set by ipw_wpa_set_encryption.
- */
- if (!value) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_0;
- } else {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_1;
- }
- if (priv->ieee->set_security)
- priv->ieee->set_security(priv->ieee->dev, &sec);
- break;
- }
-
- case IPW2100_PARAM_PRIVACY_INVOKED:
- priv->ieee->privacy_invoked = value;
- break;
-
- case IPW2100_PARAM_AUTH_ALGS:
- ret = ipw2100_wpa_set_auth_algs(priv, value);
- break;
-
- case IPW2100_PARAM_IEEE_802_1X:
- priv->ieee->ieee802_1x = value;
- break;
-
- default:
- printk(KERN_ERR DRV_NAME ": %s: Unknown WPA param: %d\n",
- dev->name, name);
- ret = -EOPNOTSUPP;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_mlme(struct net_device *dev, int command, int reason)
-{
-
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- int ret = 0;
-
- switch (command) {
- case IPW2100_MLME_STA_DEAUTH:
- // silently ignore
- break;
-
- case IPW2100_MLME_STA_DISASSOC:
- ipw2100_disassociate_bssid(priv);
- break;
-
- default:
- printk(KERN_ERR DRV_NAME ": %s: Unknown MLME request: %d\n",
- dev->name, command);
- ret = -EOPNOTSUPP;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_set_wpa_ie(struct net_device *dev,
- struct ipw2100_param *param, int plen)
-{
-
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_device *ieee = priv->ieee;
- u8 *buf;
-
- if (!ieee->wpa_enabled)
- return -EOPNOTSUPP;
-
- if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
- (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
- return -EINVAL;
-
- if (param->u.wpa_ie.len) {
- buf = kmalloc(param->u.wpa_ie.len, GFP_KERNEL);
- if (buf == NULL)
- return -ENOMEM;
-
- memcpy(buf, param->u.wpa_ie.data, param->u.wpa_ie.len);
-
- kfree(ieee->wpa_ie);
- ieee->wpa_ie = buf;
- ieee->wpa_ie_len = param->u.wpa_ie.len;
-
- } else {
- kfree(ieee->wpa_ie);
- ieee->wpa_ie = NULL;
- ieee->wpa_ie_len = 0;
- }
-
- ipw2100_wpa_assoc_frame(priv, ieee->wpa_ie, ieee->wpa_ie_len);
-
- return 0;
-}
-
-/* implementation borrowed from hostap driver */
-
-static int ipw2100_wpa_set_encryption(struct net_device *dev,
- struct ipw2100_param *param,
- int param_len)
-{
- int ret = 0;
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_device *ieee = priv->ieee;
- struct ieee80211_crypto_ops *ops;
- struct ieee80211_crypt_data **crypt;
-
- struct ieee80211_security sec = {
- .flags = 0,
- };
-
- param->u.crypt.err = 0;
- param->u.crypt.alg[IPW2100_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
- if (param_len !=
- (int)((char *)param->u.crypt.key - (char *)param) +
- param->u.crypt.key_len) {
- IPW_DEBUG_INFO("Len mismatch %d, %d\n", param_len,
- param->u.crypt.key_len);
- return -EINVAL;
- }
- if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff &&
- param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff &&
- param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) {
- if (param->u.crypt.idx >= WEP_KEYS)
- return -EINVAL;
- crypt = &ieee->crypt[param->u.crypt.idx];
- } else {
- return -EINVAL;
- }
-
- sec.flags |= SEC_ENABLED | SEC_ENCRYPT;
- if (strcmp(param->u.crypt.alg, "none") == 0) {
- if (crypt) {
- sec.enabled = 0;
- sec.encrypt = 0;
- sec.level = SEC_LEVEL_0;
- sec.flags |= SEC_LEVEL;
- ieee80211_crypt_delayed_deinit(ieee, crypt);
- }
- goto done;
- }
- sec.enabled = 1;
- sec.encrypt = 1;
-
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
- request_module("ieee80211_crypt_wep");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- } else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
- request_module("ieee80211_crypt_tkip");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- } else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
- request_module("ieee80211_crypt_ccmp");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- }
- if (ops == NULL) {
- IPW_DEBUG_INFO("%s: unknown crypto alg '%s'\n",
- dev->name, param->u.crypt.alg);
- param->u.crypt.err = IPW2100_CRYPT_ERR_UNKNOWN_ALG;
- ret = -EINVAL;
- goto done;
- }
-
- if (*crypt == NULL || (*crypt)->ops != ops) {
- struct ieee80211_crypt_data *new_crypt;
-
- ieee80211_crypt_delayed_deinit(ieee, crypt);
-
- new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), GFP_KERNEL);
- if (new_crypt == NULL) {
- ret = -ENOMEM;
- goto done;
- }
- new_crypt->ops = ops;
- if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
- new_crypt->priv =
- new_crypt->ops->init(param->u.crypt.idx);
-
- if (new_crypt->priv == NULL) {
- kfree(new_crypt);
- param->u.crypt.err =
- IPW2100_CRYPT_ERR_CRYPT_INIT_FAILED;
- ret = -EINVAL;
- goto done;
- }
-
- *crypt = new_crypt;
- }
-
- if (param->u.crypt.key_len > 0 && (*crypt)->ops->set_key &&
- (*crypt)->ops->set_key(param->u.crypt.key,
- param->u.crypt.key_len, param->u.crypt.seq,
- (*crypt)->priv) < 0) {
- IPW_DEBUG_INFO("%s: key setting failed\n", dev->name);
- param->u.crypt.err = IPW2100_CRYPT_ERR_KEY_SET_FAILED;
- ret = -EINVAL;
- goto done;
- }
-
- if (param->u.crypt.set_tx) {
- ieee->tx_keyidx = param->u.crypt.idx;
- sec.active_key = param->u.crypt.idx;
- sec.flags |= SEC_ACTIVE_KEY;
- }
-
- if (ops->name != NULL) {
-
- if (strcmp(ops->name, "WEP") == 0) {
- memcpy(sec.keys[param->u.crypt.idx],
- param->u.crypt.key, param->u.crypt.key_len);
- sec.key_sizes[param->u.crypt.idx] =
- param->u.crypt.key_len;
- sec.flags |= (1 << param->u.crypt.idx);
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_1;
- } else if (strcmp(ops->name, "TKIP") == 0) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_2;
- } else if (strcmp(ops->name, "CCMP") == 0) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_3;
- }
- }
- done:
- if (ieee->set_security)
- ieee->set_security(ieee->dev, &sec);
-
- /* Do not reset port if card is in Managed mode since resetting will
- * generate new IEEE 802.11 authentication which may end up in looping
- * with IEEE 802.1X. If your hardware requires a reset after WEP
- * configuration (for example... Prism2), implement the reset_port in
- * the callbacks structures used to initialize the 802.11 stack. */
- if (ieee->reset_on_keychange &&
- ieee->iw_mode != IW_MODE_INFRA &&
- ieee->reset_port && ieee->reset_port(dev)) {
- IPW_DEBUG_INFO("%s: reset_port failed\n", dev->name);
- param->u.crypt.err = IPW2100_CRYPT_ERR_CARD_CONF_FAILED;
- return -EINVAL;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_supplicant(struct net_device *dev, struct iw_point *p)
-{
-
- struct ipw2100_param *param;
- int ret = 0;
-
- IPW_DEBUG_IOCTL("wpa_supplicant: len=%d\n", p->length);
-
- if (p->length < sizeof(struct ipw2100_param) || !p->pointer)
- return -EINVAL;
-
- param = (struct ipw2100_param *)kmalloc(p->length, GFP_KERNEL);
- if (param == NULL)
- return -ENOMEM;
-
- if (copy_from_user(param, p->pointer, p->length)) {
- kfree(param);
- return -EFAULT;
- }
-
- switch (param->cmd) {
-
- case IPW2100_CMD_SET_WPA_PARAM:
- ret = ipw2100_wpa_set_param(dev, param->u.wpa_param.name,
- param->u.wpa_param.value);
- break;
-
- case IPW2100_CMD_SET_WPA_IE:
- ret = ipw2100_wpa_set_wpa_ie(dev, param, p->length);
- break;
-
- case IPW2100_CMD_SET_ENCRYPTION:
- ret = ipw2100_wpa_set_encryption(dev, param, p->length);
- break;
-
- case IPW2100_CMD_MLME:
- ret = ipw2100_wpa_mlme(dev, param->u.mlme.command,
- param->u.mlme.reason_code);
- break;
-
- default:
- printk(KERN_ERR DRV_NAME
- ": %s: Unknown WPA supplicant request: %d\n", dev->name,
- param->cmd);
- ret = -EOPNOTSUPP;
-
- }
-
- if (ret == 0 && copy_to_user(p->pointer, param, p->length))
- ret = -EFAULT;
-
- kfree(param);
- return ret;
-}
-
-static int ipw2100_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
- struct iwreq *wrq = (struct iwreq *)rq;
- int ret = -1;
- switch (cmd) {
- case IPW2100_IOCTL_WPA_SUPPLICANT:
- ret = ipw2100_wpa_supplicant(dev, &wrq->u.data);
- return ret;
-
- default:
- return -EOPNOTSUPP;
- }
-
- return -EOPNOTSUPP;
-}
-#endif /* WIRELESS_EXT < 18 */
-
static void ipw_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
@@ -6337,9 +5914,6 @@
dev->open = ipw2100_open;
dev->stop = ipw2100_close;
dev->init = ipw2100_net_init;
-#if WIRELESS_EXT < 18
- dev->do_ioctl = ipw2100_ioctl;
-#endif
dev->get_stats = ipw2100_stats;
dev->ethtool_ops = &ipw2100_ethtool_ops;
dev->tx_timeout = ipw2100_tx_timeout;
@@ -7852,7 +7426,6 @@
return 0;
}
-#if WIRELESS_EXT > 17
/*
* WE-18 WPA support
*/
@@ -8114,7 +7687,6 @@
}
return 0;
}
-#endif /* WIRELESS_EXT > 17 */
/*
*
@@ -8347,11 +7919,7 @@
NULL, /* SIOCWIWTHRSPY */
ipw2100_wx_set_wap, /* SIOCSIWAP */
ipw2100_wx_get_wap, /* SIOCGIWAP */
-#if WIRELESS_EXT > 17
ipw2100_wx_set_mlme, /* SIOCSIWMLME */
-#else
- NULL, /* -- hole -- */
-#endif
NULL, /* SIOCGIWAPLIST -- deprecated */
ipw2100_wx_set_scan, /* SIOCSIWSCAN */
ipw2100_wx_get_scan, /* SIOCGIWSCAN */
@@ -8375,7 +7943,6 @@
ipw2100_wx_get_encode, /* SIOCGIWENCODE */
ipw2100_wx_set_power, /* SIOCSIWPOWER */
ipw2100_wx_get_power, /* SIOCGIWPOWER */
-#if WIRELESS_EXT > 17
NULL, /* -- hole -- */
NULL, /* -- hole -- */
ipw2100_wx_set_genie, /* SIOCSIWGENIE */
@@ -8385,7 +7952,6 @@
ipw2100_wx_set_encodeext, /* SIOCSIWENCODEEXT */
ipw2100_wx_get_encodeext, /* SIOCGIWENCODEEXT */
NULL, /* SIOCSIWPMKSA */
-#endif
};
#define IPW2100_PRIV_SET_MONITOR SIOCIWFIRSTPRIV
^ permalink raw reply
* Re: wireless: recap of current issues (stack)
From: Ulrich Kunitz @ 2006-01-14 14:13 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, linux-kernel
In-Reply-To: <20060113213200.GG16166@tuxdriver.com>
On Fri, 13 Jan 2006, John W. Linville wrote:
> Can the in-kernel stack be saved? With the addition of softmac?
> Is it possible to extend softmac to support virtual wlan devices?
> If not, how do we proceed?
I don't think, that we can continue with the current model of the
stacks. There appears a great variance in the HOST-device
interfaces between WLAN devices of several vendors. The other
problem is, that there is a difference depending on the bus the
device is connected to. Register accesses in USB devices should be
able to sleep. However the 80211 stacks I've seen so far have a
fixed set of capabilities and do also assume, that at the driver
layer everything can be done in atomic mode, which is only true
for buses that support memory-mapping.
In my point of view each stack layer must allow drivers to
overwrite all entry-functions. Drivers could then do
cherry-picking of the provided standard-functions. This is of
course the library approach. The discussion about multiple
stacks will then be muted, because we would have several stacks in
the kernel and on the devices, which would have compatible interfaces.
> Do we need to have both wireless-stable and wireless-devel kernels?
> What about the suggestion of having both stacks in the kernel at once?
> I'm not very excited about two in-kernel stacks. Still, consolidating
> wireless drivers down to two stacks is probably better than what we
> have now...? Either way, we would have to have general understanding
> that at some point (not too far away), one of the stacks would have
> to disappear.
See above.
--
Ulrich Kunitz - kune@deine-taler.de
^ permalink raw reply
* Re: [2.6.15] running tcpdump on 3c905b causes freeze (reproducable)
From: Andrew Morton @ 2006-01-14 14:04 UTC (permalink / raw)
To: Folkert van Heusden; +Cc: netdev, linux-kernel
In-Reply-To: <20060114132414.GN6087@vanheusden.com>
Folkert van Heusden <folkert@vanheusden.com> wrote:
>
> > > > > > Have you tried enabling the NMI watchdog? Enable CONFIG_X86_LOCAL_APIC and
> > > > > > boot with `nmi_watchdog=1' on the command line, make sure that the NMI line
> > > > > > of /proc/interrupts is incrementing.
> > > > > I'll give it a try. I've added it to the append-line in the lilo config.
> > > > > Am now compiling the kernel.
> > > > No change. Well, that is: the last message on the console now is
> > > > "setting eth1 to promiscues mode".
> > > Did you confirm that the NMI counters in /proc/interrupts are incrementing?
> > Yes:
> > root@muur:/home/folkert# for i in `seq 1 5` ; do cat /proc/interrupts | grep NMI ; sleep 1 ; done
> > NMI: 6949080 6949067
> > NMI: 6949182 6949169
> > NMI: 6949284 6949271
> > NMI: 6949386 6949373
> > NMI: 6949488 6949475
>
> Is there anything else I can try?
argh. I haven't forgotten. Hopefully after -rc1 I'll have more time...
Your report didn't mention whether that card work OK under earlier 2.6
kernels. If it does, a bit of bisection searching would really help.
^ permalink raw reply
* Re: wireless: recap of current issues (stack)
From: Michael Buesch @ 2006-01-14 13:51 UTC (permalink / raw)
To: Chase Venters
Cc: netdev, linux-kernel, Jiri Benc, Stefan Rompf, Mike Kershaw,
Krzysztof Halasa, Robert Hancock, Alistair John Strachan,
Dominik Brodowski, Denis Vlasenko, Danny van Dyk,
Stephen Hemminger, feyd, Andreas Mohr, Bas Vermeulen,
Jean Tourrilhes, Daniel Drake, Ulrich Kunitz, Phil Dibowitz,
Simon Kelley, Michael Buesch, Marcel Holtmann, Patrick McHardy,
Ingo Oeser, Harald Welte <laforg
In-Reply-To: <200601131703.29677.chase.venters@clientec.com>
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
On Saturday 14 January 2006 00:03, you wrote:
> As an aside to this whole thing, I know we're talking about *kernel* wireless
> but it's worthless to most people without good userland support as well.
> Anyone have any thoughts and feelings on what things look like on the
> desktop? I think if we work closely with some desktop people, we can shepard
> in some wonderful new desktop support on top of the new netlink API.
I am in the KDE development and have (almost) full access to the KDE svn
repository. Altought I did not do much coding on KDE apps recently,
I will be able to help in WiFi support for KDE.
The first thing I thought of, was a tray icon with basic information
about the available interfaces and basic configuration
capabilities.
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: wireless: recap of current issues (configuration)
From: Krzysztof Halasa @ 2006-01-14 13:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: Stuffed Crust, netdev, linux-kernel
In-Reply-To: <1137230889.2520.82.camel@localhost>
Johannes Berg <johannes@sipsolutions.net> writes:
> Yeah, this is about what I thought of -- and it makes me wonder if the
> stack really should be aware of the channelization, or if the WiPHY
> driver might better just handle it itself.
The latter, possibly using library functions from the stack :-)
--
Krzysztof Halasa
^ permalink raw reply
* Re: wireless: recap of current issues (compatibility)
From: Krzysztof Halasa @ 2006-01-14 13:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev, linux-kernel
In-Reply-To: <1137191590.2520.65.camel@localhost>
Johannes Berg <johannes@sipsolutions.net> writes:
> If you want the old userspace API to 'just work' you have to create one
> default wlan device at WiPHY init.
I'm not sure the old API is that important. This isn't something
programs (third party, kernel utils don't count) rely on. Most users
would switch to the new stack immediately anyway.
It could probably be a separate compatibility module, the core stack
probably don't have to know about it. The last to worry about I'd say.
--
Krzysztof Halasa
^ permalink raw reply
* Re: [2.6.15] running tcpdump on 3c905b causes freeze (reproducable)
From: Folkert van Heusden @ 2006-01-14 13:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev, linux-kernel
In-Reply-To: <20060110142725.GH12673@vanheusden.com>
Hi,
> > > > > Have you tried enabling the NMI watchdog? Enable CONFIG_X86_LOCAL_APIC and
> > > > > boot with `nmi_watchdog=1' on the command line, make sure that the NMI line
> > > > > of /proc/interrupts is incrementing.
> > > > I'll give it a try. I've added it to the append-line in the lilo config.
> > > > Am now compiling the kernel.
> > > No change. Well, that is: the last message on the console now is
> > > "setting eth1 to promiscues mode".
> > Did you confirm that the NMI counters in /proc/interrupts are incrementing?
> Yes:
> root@muur:/home/folkert# for i in `seq 1 5` ; do cat /proc/interrupts | grep NMI ; sleep 1 ; done
> NMI: 6949080 6949067
> NMI: 6949182 6949169
> NMI: 6949284 6949271
> NMI: 6949386 6949373
> NMI: 6949488 6949475
Is there anything else I can try?
Folkert van Heusden
--
Try MultiTail! Multiple windows with logfiles, filtered with regular
expressions, colored output, etc. etc. www.vanheusden.com/multitail/
----------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
^ permalink raw reply
* Re: wireless: recap of current issues (stack)
From: Simon Kelley @ 2006-01-14 10:46 UTC (permalink / raw)
To: Chase Venters
Cc: netdev, linux-kernel, Jiri Benc, Stefan Rompf, Mike Kershaw,
Krzysztof Halasa, Robert Hancock, Alistair John Strachan,
Dominik Brodowski, Denis Vlasenko, Danny van Dyk,
Stephen Hemminger, feyd, Andreas Mohr, Bas Vermeulen,
Jean Tourrilhes, Daniel Drake, Ulrich Kunitz, Phil Dibowitz,
Michael Buesch, Marcel Holtmann, Patrick McHardy, Ingo Oeser,
Harald Welte, Ben Greear
In-Reply-To: <200601131703.29677.chase.venters@clientec.com>
Chase Venters wrote:
> As an aside to this whole thing, I know we're talking about *kernel* wireless
> but it's worthless to most people without good userland support as well.
> Anyone have any thoughts and feelings on what things look like on the
> desktop? I think if we work closely with some desktop people, we can shepard
> in some wonderful new desktop support on top of the new netlink API.
>
An obvious place to start is the NetworkManager project. They should be
asked the obvious "what do you need" and "does this provide it"
questions. Dan Williams has been active recently producing small kernel
patches which make the kernel side stuff work better with NM, so he
might be a good contact to start with.
Cheers,
Simon.
^ permalink raw reply
* Re: wireless: recap of current issues (configuration)
From: Johannes Berg @ 2006-01-14 9:28 UTC (permalink / raw)
To: Stuffed Crust; +Cc: netdev, linux-kernel
In-Reply-To: <20060114011726.GA19950@shaftnet.org>
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
On Fri, 2006-01-13 at 20:17 -0500, Stuffed Crust wrote:
> If you're talking about the former.. things get quite complicated, but
> that could be handled by having two WiPHY devices registered.
The former; and yes, I thought about that too -- having a driver that
shows two physical WiPHY devices as a single logical WiPHY device and
distributes virtual devices among them...
> As for the latter, when you factor in the needs of 802.11d and its
> dependents (802.11j, 802.11k, and others) the stack is going to need to
> be aware of the available channel sets; both in the sense of hardware
> support and also the various regulatory requirements.
>
> The hardware knows what frequencies it supports. Unfortunately this has
> to be a somewhat dynamic thing, as this is often not queryable until the
> device firmware is up and running.
>
> This can be accomplished by passing a static table to the
> register_wiphy_device() call (or perhaps via a struct wiphy_dev
> parameter) or through a more explicit, dynamic interface like:
>
> wiphy_register_supported_frequency(hw, 2412).
Yeah, this is about what I thought of -- and it makes me wonder if the
stack really should be aware of the channelization, or if the WiPHY
driver might better just handle it itself.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* Re: [git patches] 2.6.x net driver updates
From: Randy.Dunlap @ 2006-01-14 5:05 UTC (permalink / raw)
To: Adrian Bunk
Cc: sam, axboe, akpm, torvalds, jgarzik, netdev, linux-kernel, zippel
In-Reply-To: <20060114022949.GI29663@stusta.de>
On Sat, 14 Jan 2006 03:29:49 +0100 Adrian Bunk wrote:
> On Fri, Jan 13, 2006 at 08:28:13PM +0100, Sam Ravnborg wrote:
> > On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
> > >
> > > 'select' is really cool as a concept, but when you can't figure out why
> > > you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> > > annoying. Would be nice to actually be able to see if another option has
> > > selected this option.
> >
> > In menuconfig:
> >
> > Typing '?' on CONFIG_HOTPLUG revealed:
> > Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
> >...
>
> Is there any trick to see them all when they are longer than the line in
> the terminal (e.g. what selects FW_LOADER?)?
Use the right/left arrow keys to scroll horizontally.
---
~Randy
^ permalink raw reply
* Re: [git patches] 2.6.x net driver updates
From: Adrian Bunk @ 2006-01-14 2:29 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Jens Axboe, Andrew Morton, Linus Torvalds, jgarzik, netdev,
linux-kernel, Roman Zippel
In-Reply-To: <20060113192813.GA10560@mars.ravnborg.org>
On Fri, Jan 13, 2006 at 08:28:13PM +0100, Sam Ravnborg wrote:
> On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
> >
> > 'select' is really cool as a concept, but when you can't figure out why
> > you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> > annoying. Would be nice to actually be able to see if another option has
> > selected this option.
>
> In menuconfig:
>
> Typing '?' on CONFIG_HOTPLUG revealed:
> Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
>...
Is there any trick to see them all when they are longer than the line in
the terminal (e.g. what selects FW_LOADER?)?
> Sam
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* [2.6 patch] move some code to net/ipx/af_ipx.c
From: Adrian Bunk @ 2006-01-14 2:10 UTC (permalink / raw)
To: acme; +Cc: linux-kernel, netdev
This patch moves some code only used in this file to net/ipx/af_ipx.c .
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This version was slightly adapted to apply against Linus' current tree.
include/net/p8022.h | 13 -----
net/802/Makefile | 14 ++---
net/802/p8022.c | 66 ---------------------------
net/802/p8023.c | 61 -------------------------
net/8021q/vlan.c | 1
net/8021q/vlan_dev.c | 1
net/ethernet/Makefile | 2
net/ethernet/pe2.c | 39 ----------------
net/ipx/af_ipx.c | 102 ++++++++++++++++++++++++++++++++++++++++--
9 files changed, 106 insertions(+), 193 deletions(-)
--- linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile.old 2005-11-18 02:15:17.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile 2005-11-18 02:15:22.000000000 +0100
@@ -4,5 +4,3 @@
obj-y += eth.o
obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o
-obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o
-obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o
--- linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c.old 2005-11-18 02:19:40.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c 2005-11-18 02:19:46.000000000 +0100
@@ -26,7 +26,6 @@
#include <linux/mm.h>
#include <linux/in.h>
#include <linux/init.h>
-#include <net/p8022.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
#include <linux/notifier.h>
--- linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c.old 2005-11-18 02:19:55.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c 2005-11-18 02:19:58.000000000 +0100
@@ -29,7 +29,6 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <net/datalink.h>
-#include <net/p8022.h>
#include <net/arp.h>
#include "vlan.h"
--- linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c.old 2005-11-18 02:17:00.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c 2005-11-18 02:26:01.000000000 +0100
@@ -48,10 +48,10 @@
#include <linux/termios.h>
#include <net/ipx.h>
-#include <net/p8022.h>
#include <net/psnap.h>
#include <net/sock.h>
#include <net/tcp_states.h>
+#include <net/llc.h>
#include <asm/uaccess.h>
@@ -1939,8 +1939,104 @@
.notifier_call = ipxitf_device_event,
};
-extern struct datalink_proto *make_EII_client(void);
-extern void destroy_EII_client(struct datalink_proto *);
+static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
+ unsigned char *dest)
+{
+ llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
+ return 0;
+}
+
+static struct datalink_proto *register_8022_client(unsigned char type,
+ int (*func)(struct sk_buff *skb,
+ struct net_device *dev,
+ struct packet_type *pt,
+ struct net_device *orig_dev))
+{
+ struct datalink_proto *proto;
+
+ proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+ if (proto) {
+ proto->type[0] = type;
+ proto->header_length = 3;
+ proto->request = p8022_request;
+ proto->sap = llc_sap_open(type, func);
+ if (!proto->sap) {
+ kfree(proto);
+ proto = NULL;
+ }
+ }
+ return proto;
+}
+
+static void unregister_8022_client(struct datalink_proto *proto)
+{
+ llc_sap_put(proto->sap);
+ kfree(proto);
+}
+
+/*
+ * Place an 802.3 header on a packet. The driver will do the mac
+ * addresses, we just need to give it the buffer length.
+ */
+static int p8023_request(struct datalink_proto *dl,
+ struct sk_buff *skb, unsigned char *dest_node)
+{
+ struct net_device *dev = skb->dev;
+
+ dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
+ return dev_queue_xmit(skb);
+}
+
+/*
+ * Create an 802.3 client. Note there can be only one 802.3 client
+ */
+static struct datalink_proto *make_8023_client(void)
+{
+ struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+
+ if (proto) {
+ proto->header_length = 0;
+ proto->request = p8023_request;
+ }
+ return proto;
+}
+
+/*
+ * Destroy the 802.3 client.
+ */
+static void destroy_8023_client(struct datalink_proto *dl)
+{
+ kfree(dl);
+}
+
+static int pEII_request(struct datalink_proto *dl,
+ struct sk_buff *skb, unsigned char *dest_node)
+{
+ struct net_device *dev = skb->dev;
+
+ skb->protocol = htons(ETH_P_IPX);
+ if (dev->hard_header)
+ dev->hard_header(skb, dev, ETH_P_IPX,
+ dest_node, NULL, skb->len);
+ return dev_queue_xmit(skb);
+}
+
+static struct datalink_proto *make_EII_client(void)
+{
+ struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
+
+ if (proto) {
+ proto->header_length = 0;
+ proto->request = pEII_request;
+ }
+
+ return proto;
+}
+
+static void destroy_EII_client(struct datalink_proto *dl)
+{
+ kfree(dl);
+}
static unsigned char ipx_8022_type = 0xE0;
static unsigned char ipx_snap_id[5] = { 0x0, 0x0, 0x0, 0x81, 0x37 };
--- linux-2.6.15-rc1-mm1-full/include/net/p8022.h 2005-10-28 02:02:08.000000000 +0200
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,13 +0,0 @@
-#ifndef _NET_P8022_H
-#define _NET_P8022_H
-extern struct datalink_proto *
- register_8022_client(unsigned char type,
- int (*func)(struct sk_buff *skb,
- struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev));
-extern void unregister_8022_client(struct datalink_proto *proto);
-
-extern struct datalink_proto *make_8023_client(void);
-extern void destroy_8023_client(struct datalink_proto *dl);
-#endif
--- linux-2.6.15-rc1-mm1-full/net/ethernet/pe2.c 2005-11-17 21:30:56.000000000 +0100
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,39 +0,0 @@
-#include <linux/in.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-
-#include <net/datalink.h>
-
-static int pEII_request(struct datalink_proto *dl,
- struct sk_buff *skb, unsigned char *dest_node)
-{
- struct net_device *dev = skb->dev;
-
- skb->protocol = htons(ETH_P_IPX);
- if (dev->hard_header)
- dev->hard_header(skb, dev, ETH_P_IPX,
- dest_node, NULL, skb->len);
- return dev_queue_xmit(skb);
-}
-
-struct datalink_proto *make_EII_client(void)
-{
- struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
-
- if (proto) {
- proto->header_length = 0;
- proto->request = pEII_request;
- }
-
- return proto;
-}
-
-void destroy_EII_client(struct datalink_proto *dl)
-{
- kfree(dl);
-}
-
-EXPORT_SYMBOL(destroy_EII_client);
-EXPORT_SYMBOL(make_EII_client);
--- linux-2.6.15-rc1-mm1-full/net/802/p8022.c 2005-10-28 02:02:08.000000000 +0200
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,66 +0,0 @@
-/*
- * NET3: Support for 802.2 demultiplexing off Ethernet (Token ring
- * is kept separate see p8022tr.c)
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Demultiplex 802.2 encoded protocols. We match the entry by the
- * SSAP/DSAP pair and then deliver to the registered datalink that
- * matches. The control byte is ignored and handling of such items
- * is up to the routine passed the frame.
- *
- * Unlike the 802.3 datalink we have a list of 802.2 entries as
- * there are multiple protocols to demux. The list is currently
- * short (3 or 4 entries at most). The current demux assumes this.
- */
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-#include <net/datalink.h>
-#include <linux/mm.h>
-#include <linux/in.h>
-#include <linux/init.h>
-#include <net/llc.h>
-#include <net/p8022.h>
-
-static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
- unsigned char *dest)
-{
- llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
- return 0;
-}
-
-struct datalink_proto *register_8022_client(unsigned char type,
- int (*func)(struct sk_buff *skb,
- struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev))
-{
- struct datalink_proto *proto;
-
- proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
- if (proto) {
- proto->type[0] = type;
- proto->header_length = 3;
- proto->request = p8022_request;
- proto->sap = llc_sap_open(type, func);
- if (!proto->sap) {
- kfree(proto);
- proto = NULL;
- }
- }
- return proto;
-}
-
-void unregister_8022_client(struct datalink_proto *proto)
-{
- llc_sap_put(proto->sap);
- kfree(proto);
-}
-
-EXPORT_SYMBOL(register_8022_client);
-EXPORT_SYMBOL(unregister_8022_client);
-
-MODULE_LICENSE("GPL");
--- linux-2.6.15-rc1-mm1-full/net/802/p8023.c 2005-11-17 21:30:55.000000000 +0100
+++ /dev/null 2005-11-08 19:07:57.000000000 +0100
@@ -1,61 +0,0 @@
-/*
- * NET3: 802.3 data link hooks used for IPX 802.3
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * 802.3 isn't really a protocol data link layer. Some old IPX stuff
- * uses it however. Note that there is only one 802.3 protocol layer
- * in the system. We don't currently support different protocols
- * running raw 802.3 on different devices. Thankfully nobody else
- * has done anything like the old IPX.
- */
-
-#include <linux/in.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-
-#include <net/datalink.h>
-#include <net/p8022.h>
-
-/*
- * Place an 802.3 header on a packet. The driver will do the mac
- * addresses, we just need to give it the buffer length.
- */
-static int p8023_request(struct datalink_proto *dl,
- struct sk_buff *skb, unsigned char *dest_node)
-{
- struct net_device *dev = skb->dev;
-
- dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
- return dev_queue_xmit(skb);
-}
-
-/*
- * Create an 802.3 client. Note there can be only one 802.3 client
- */
-struct datalink_proto *make_8023_client(void)
-{
- struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
-
- if (proto) {
- proto->header_length = 0;
- proto->request = p8023_request;
- }
- return proto;
-}
-
-/*
- * Destroy the 802.3 client.
- */
-void destroy_8023_client(struct datalink_proto *dl)
-{
- kfree(dl);
-}
-
-EXPORT_SYMBOL(destroy_8023_client);
-EXPORT_SYMBOL(make_8023_client);
--- linux-2.6.15-mm3-full/net/802/Makefile.old 2006-01-14 02:55:28.000000000 +0100
+++ linux-2.6.15-mm3-full/net/802/Makefile 2006-01-14 02:55:50.000000000 +0100
@@ -4,10 +4,10 @@
# Check the p8022 selections against net/core/Makefile.
obj-$(CONFIG_SYSCTL) += sysctl_net_802.o
-obj-$(CONFIG_LLC) += p8022.o psnap.o
-obj-$(CONFIG_TR) += p8022.o psnap.o tr.o sysctl_net_802.o
-obj-$(CONFIG_NET_FC) += fc.o
-obj-$(CONFIG_FDDI) += fddi.o
-obj-$(CONFIG_HIPPI) += hippi.o
-obj-$(CONFIG_IPX) += p8022.o psnap.o p8023.o
-obj-$(CONFIG_ATALK) += p8022.o psnap.o
+obj-$(CONFIG_LLC) += psnap.o
+obj-$(CONFIG_TR) += psnap.o tr.o sysctl_net_802.o
+obj-$(CONFIG_NET_FC) += fc.o
+obj-$(CONFIG_FDDI) += fddi.o
+obj-$(CONFIG_HIPPI) += hippi.o
+obj-$(CONFIG_IPX) += psnap.o
+obj-$(CONFIG_ATALK) += psnap.o
^ permalink raw reply
* [2.6 patch] drivers/net/arcnet/: possible cleanups
From: Adrian Bunk @ 2006-01-14 2:10 UTC (permalink / raw)
To: Jeff Garzik, akpm, linux-kernel, netdev
This patch contains the following possible cleanups:
- make needlessly global code static
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arc_proto_null)
- arcnet.c: remove the unneeded EXPORT_SYMBOL(arcnet_dump_packet)
To make Jeff happy, arcnet.c still prints
arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/arcnet/arc-rawmode.c | 2 +-
drivers/net/arcnet/arcnet.c | 15 +++++++++------
drivers/net/arcnet/rfc1051.c | 2 +-
drivers/net/arcnet/rfc1201.c | 2 +-
include/linux/arcdevice.h | 10 ----------
5 files changed, 12 insertions(+), 19 deletions(-)
diff -puN drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arcnet.c
--- devel/drivers/net/arcnet/arcnet.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arcnet.c 2005-07-09 01:24:43.000000000 -0700
@@ -61,6 +59,7 @@ static int null_build_header(struct sk_b
static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
int length, int bufnum);
+static void arcnet_rx(struct net_device *dev, int bufnum);
/*
* one ArcProto per possible proto ID. None of the elements of
@@ -71,7 +70,7 @@ static int null_prepare_tx(struct net_de
struct ArcProto *arc_proto_map[256], *arc_proto_default,
*arc_bcast_proto, *arc_raw_proto;
-struct ArcProto arc_proto_null =
+static struct ArcProto arc_proto_null =
{
.suffix = '?',
.mtu = XMTU,
@@ -90,7 +89,6 @@ EXPORT_SYMBOL(arc_proto_map);
EXPORT_SYMBOL(arc_proto_default);
EXPORT_SYMBOL(arc_bcast_proto);
EXPORT_SYMBOL(arc_raw_proto);
-EXPORT_SYMBOL(arc_proto_null);
EXPORT_SYMBOL(arcnet_unregister_proto);
EXPORT_SYMBOL(arcnet_debug);
EXPORT_SYMBOL(alloc_arcdev);
@@ -118,7 +116,7 @@ static int __init arcnet_init(void)
arcnet_debug = debug;
- printk(VERSION);
+ printk("arcnet loaded.\n");
#ifdef ALPHA_WARNING
BUGLVL(D_EXTRA) {
@@ -178,8 +176,8 @@ EXPORT_SYMBOL(arcnet_dump_skb);
* Dump the contents of an ARCnet buffer
*/
#if (ARCNET_DEBUG_MAX & (D_RX | D_TX))
-void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
- int take_arcnet_lock)
+static void arcnet_dump_packet(struct net_device *dev, int bufnum,
+ char *desc, int take_arcnet_lock)
{
struct arcnet_local *lp = dev->priv;
int i, length;
@@ -208,7 +206,10 @@ void arcnet_dump_packet(struct net_devic
}
-EXPORT_SYMBOL(arcnet_dump_packet);
+#else
+
+#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) do { } while (0)
+
#endif
@@ -987,7 +988,7 @@ irqreturn_t arcnet_interrupt(int irq, vo
* This is a generic packet receiver that calls arcnet??_rx depending on the
* protocol ID found.
*/
-void arcnet_rx(struct net_device *dev, int bufnum)
+static void arcnet_rx(struct net_device *dev, int bufnum)
{
struct arcnet_local *lp = dev->priv;
struct archdr pkt;
diff -puN drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/arc-rawmode.c
--- devel/drivers/net/arcnet/arc-rawmode.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/arc-rawmode.c 2005-07-09 01:24:43.000000000 -0700
@@ -42,7 +42,7 @@ static int build_header(struct sk_buff *
static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
int bufnum);
-struct ArcProto rawmode_proto =
+static struct ArcProto rawmode_proto =
{
.suffix = 'r',
.mtu = XMTU,
diff -puN drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1051.c
--- devel/drivers/net/arcnet/rfc1051.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1051.c 2005-07-09 01:24:43.000000000 -0700
@@ -43,7 +43,7 @@ static int prepare_tx(struct net_device
int bufnum);
-struct ArcProto rfc1051_proto =
+static struct ArcProto rfc1051_proto =
{
.suffix = 's',
.mtu = XMTU - RFC1051_HDR_SIZE,
diff -puN drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups drivers/net/arcnet/rfc1201.c
--- devel/drivers/net/arcnet/rfc1201.c~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/drivers/net/arcnet/rfc1201.c 2005-07-09 01:24:43.000000000 -0700
@@ -43,7 +43,7 @@ static int prepare_tx(struct net_device
int bufnum);
static int continue_tx(struct net_device *dev, int bufnum);
-struct ArcProto rfc1201_proto =
+static struct ArcProto rfc1201_proto =
{
.suffix = 'a',
.mtu = 1500, /* could be more, but some receivers can't handle it... */
diff -puN include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups include/linux/arcdevice.h
--- devel/include/linux/arcdevice.h~drivers-net-arcnet-possible-cleanups 2005-07-09 01:24:43.000000000 -0700
+++ devel-akpm/include/linux/arcdevice.h 2005-07-09 01:24:43.000000000 -0700
@@ -206,7 +206,6 @@ struct ArcProto {
extern struct ArcProto *arc_proto_map[256], *arc_proto_default,
*arc_bcast_proto, *arc_raw_proto;
-extern struct ArcProto arc_proto_null;
/*
@@ -334,17 +333,9 @@ void arcnet_dump_skb(struct net_device *
#define arcnet_dump_skb(dev,skb,desc) ;
#endif
-#if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX)
-void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
- int take_arcnet_lock);
-#else
-#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ;
-#endif
-
void arcnet_unregister_proto(struct ArcProto *proto);
irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
struct net_device *alloc_arcdev(char *name);
-void arcnet_rx(struct net_device *dev, int bufnum);
#endif /* __KERNEL__ */
#endif /* _LINUX_ARCDEVICE_H */
_
^ permalink raw reply
* [2.6 patch] drivers/net/s2io.c: make code static
From: Adrian Bunk @ 2006-01-14 2:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: Raghavendra Koushik, jgarzik, netdev, linux-kernel
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 5 Jan 2006
drivers/net/s2io.c | 22 +++++++++++-----------
drivers/net/s2io.h | 17 +++++++----------
2 files changed, 18 insertions(+), 21 deletions(-)
--- linux-2.6.15-mm1-full/drivers/net/s2io.h.old 2006-01-05 20:46:34.000000000 +0100
+++ linux-2.6.15-mm1-full/drivers/net/s2io.h 2006-01-05 21:10:33.000000000 +0100
@@ -64,7 +64,7 @@
#define INTR_DBG 4
/* Global variable that defines the present debug level of the driver. */
-int debug_level = ERR_DBG; /* Default level. */
+static int debug_level = ERR_DBG;
/* DEBUG message print. */
#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args)
@@ -268,7 +268,7 @@
#define MAX_RX_RINGS 8
/* FIFO mappings for all possible number of fifos configured */
-int fifo_map[][MAX_TX_FIFOS] = {
+static int fifo_map[][MAX_TX_FIFOS] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1},
{0, 0, 0, 1, 1, 1, 2, 2},
@@ -911,18 +911,16 @@
static void alarm_intr_handler(struct s2io_nic *sp);
static int s2io_starter(void);
-void s2io_closer(void);
static void s2io_tx_watchdog(struct net_device *dev);
static void s2io_tasklet(unsigned long dev_addr);
static void s2io_set_multicast(struct net_device *dev);
static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp);
-void s2io_link(nic_t * sp, int link);
-void s2io_reset(nic_t * sp);
+static void s2io_link(nic_t * sp, int link);
#if defined(CONFIG_S2IO_NAPI)
static int s2io_poll(struct net_device *dev, int *budget);
#endif
static void s2io_init_pci(nic_t * sp);
-int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
+static int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
static void s2io_alarm_handle(unsigned long data);
static int s2io_enable_msi(nic_t *nic);
static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs);
@@ -930,14 +928,13 @@
s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs);
static irqreturn_t
s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs);
-int s2io_enable_msi_x(nic_t *nic);
static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
static struct ethtool_ops netdev_ethtool_ops;
static void s2io_set_link(unsigned long data);
-int s2io_set_swapper(nic_t * sp);
+static int s2io_set_swapper(nic_t * sp);
static void s2io_card_down(nic_t *nic);
static int s2io_card_up(nic_t *nic);
-int get_xena_rev_id(struct pci_dev *pdev);
-void restore_xmsi_data(nic_t *nic);
+static int get_xena_rev_id(struct pci_dev *pdev);
+static void restore_xmsi_data(nic_t *nic);
#endif /* _S2IO_H */
--- linux-2.6.15-mm1-full/drivers/net/s2io.c.old 2006-01-05 20:45:51.000000000 +0100
+++ linux-2.6.15-mm1-full/drivers/net/s2io.c 2006-01-05 20:54:26.000000000 +0100
@@ -72,8 +72,8 @@
static char s2io_driver_name[] = "Neterion";
static char s2io_driver_version[] = DRV_VERSION;
-int rxd_size[4] = {32,48,48,64};
-int rxd_count[4] = {127,85,85,63};
+static int rxd_size[4] = {32,48,48,64};
+static int rxd_count[4] = {127,85,85,63};
static inline int RXD_IS_UP2DT(RxD_t *rxdp)
{
@@ -2127,7 +2127,7 @@
}
}
-int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
+static int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
{
struct net_device *dev = nic->dev;
struct sk_buff *frag_list;
@@ -2852,7 +2852,7 @@
* void.
*/
-void s2io_reset(nic_t * sp)
+static void s2io_reset(nic_t * sp)
{
XENA_dev_config_t __iomem *bar0 = sp->bar0;
u64 val64;
@@ -2940,7 +2940,7 @@
* SUCCESS on success and FAILURE on failure.
*/
-int s2io_set_swapper(nic_t * sp)
+static int s2io_set_swapper(nic_t * sp)
{
struct net_device *dev = sp->dev;
XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -3089,7 +3089,7 @@
return ret;
}
-void restore_xmsi_data(nic_t *nic)
+static void restore_xmsi_data(nic_t *nic)
{
XENA_dev_config_t __iomem *bar0 = nic->bar0;
u64 val64;
@@ -3180,7 +3180,7 @@
return 0;
}
-int s2io_enable_msi_x(nic_t *nic)
+static int s2io_enable_msi_x(nic_t *nic)
{
XENA_dev_config_t __iomem *bar0 = nic->bar0;
u64 tx_mat, rx_mat;
@@ -4128,7 +4128,7 @@
* as defined in errno.h file on failure.
*/
-int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
+static int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
{
nic_t *sp = dev->priv;
XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -5713,7 +5713,7 @@
* void.
*/
-void s2io_link(nic_t * sp, int link)
+static void s2io_link(nic_t * sp, int link)
{
struct net_device *dev = (struct net_device *) sp->dev;
@@ -5738,7 +5738,7 @@
* returns the revision ID of the device.
*/
-int get_xena_rev_id(struct pci_dev *pdev)
+static int get_xena_rev_id(struct pci_dev *pdev)
{
u8 id = 0;
int ret;
@@ -6343,7 +6343,7 @@
* Description: This function is the cleanup routine for the driver. It unregist * ers the driver.
*/
-void s2io_closer(void)
+static void s2io_closer(void)
{
pci_unregister_driver(&s2io_driver);
DBG_PRINT(INIT_DBG, "cleanup done\n");
^ permalink raw reply
* [2.6 patch] drivers/net/wireless/hostap/hostap_main.c shouldn't #include C files
From: Adrian Bunk @ 2006-01-14 2:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: jkmaline, hostap, linux-kernel, netdev
This patch contains an attempt to properly build hostap.o without
#include'ing C files.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 5 Jan 2006
drivers/net/wireless/hostap/Makefile | 3
drivers/net/wireless/hostap/hostap.h | 37 +++++++++++
drivers/net/wireless/hostap/hostap_80211.h | 3
drivers/net/wireless/hostap/hostap_80211_rx.c | 11 +++
drivers/net/wireless/hostap/hostap_80211_tx.c | 15 ++++
drivers/net/wireless/hostap/hostap_ap.c | 36 ++++++----
drivers/net/wireless/hostap/hostap_ap.h | 2
drivers/net/wireless/hostap/hostap_common.h | 3
drivers/net/wireless/hostap/hostap_info.c | 3
drivers/net/wireless/hostap/hostap_ioctl.c | 12 ++-
drivers/net/wireless/hostap/hostap_main.c | 60 +-----------------
drivers/net/wireless/hostap/hostap_proc.c | 8 ++
drivers/net/wireless/hostap/hostap_wlan.h | 4 +
include/net/ieee80211_crypt.h | 1
14 files changed, 120 insertions(+), 78 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile.old 2005-12-03 00:40:33.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile 2005-12-03 00:49:47.000000000 +0100
@@ -1,4 +1,5 @@
-hostap-y := hostap_main.o
+hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o hostap_info.o \
+ hostap_ioctl.o hostap_main.o hostap_proc.o
obj-$(CONFIG_HOSTAP) += hostap.o
obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap.h.old 2005-12-03 00:41:48.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap.h 2005-12-03 02:37:21.000000000 +0100
@@ -1,6 +1,15 @@
#ifndef HOSTAP_H
#define HOSTAP_H
+#include <linux/ethtool.h>
+
+#include "hostap_wlan.h"
+#include "hostap_ap.h"
+
+static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
+ 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
+#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
+
/* hostap.c */
extern struct proc_dir_entry *hostap_proc;
@@ -40,6 +49,26 @@
int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
u8 *body, size_t bodylen);
int prism2_sta_deauth(local_info_t *local, u16 reason);
+int prism2_wds_add(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked);
+int prism2_wds_del(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked, int do_not_remove);
+
+
+/* hostap_ap.c */
+
+int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
+int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
+void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
+int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
+void ap_control_kickall(struct ap_data *ap);
+void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
+ struct ieee80211_crypt_data ***crypt);
+int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
+ struct iw_quality qual[], int buf_size,
+ int aplist);
+int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
+int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
/* hostap_proc.c */
@@ -54,4 +83,12 @@
void hostap_info_process(local_info_t *local, struct sk_buff *skb);
+/* hostap_ioctl.c */
+
+extern const struct iw_handler_def hostap_iw_handler_def;
+extern struct ethtool_ops prism2_ethtool_ops;
+
+int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+
+
#endif /* HOSTAP_H */
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_common.h.old 2005-12-03 01:19:43.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_common.h 2005-12-03 01:21:13.000000000 +0100
@@ -1,6 +1,9 @@
#ifndef HOSTAP_COMMON_H
#define HOSTAP_COMMON_H
+#include <linux/types.h>
+#include <linux/if_ether.h>
+
#define BIT(x) (1 << (x))
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_wlan.h.old 2005-12-03 01:22:53.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_wlan.h 2005-12-03 01:26:43.000000000 +0100
@@ -1,6 +1,10 @@
#ifndef HOSTAP_WLAN_H
#define HOSTAP_WLAN_H
+#include <linux/wireless.h>
+#include <linux/netdevice.h>
+#include <net/iw_handler.h>
+
#include "hostap_config.h"
#include "hostap_common.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.h.old 2005-12-03 01:28:46.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.h 2005-12-03 01:29:01.000000000 +0100
@@ -1,6 +1,8 @@
#ifndef HOSTAP_AP_H
#define HOSTAP_AP_H
+#include "hostap_80211.h"
+
/* AP data structures for STAs */
/* maximum number of frames to buffer per STA */
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211.h.old 2005-12-03 01:07:18.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211.h 2005-12-03 01:11:00.000000000 +0100
@@ -1,6 +1,9 @@
#ifndef HOSTAP_80211_H
#define HOSTAP_80211_H
+#include <linux/types.h>
+#include <net/ieee80211_crypt.h>
+
struct hostap_ieee80211_mgmt {
u16 frame_control;
u16 duration;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_main.c.old 2005-12-03 00:40:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_main.c 2005-12-03 02:24:34.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/kmod.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
+#include <linux/etherdevice.h>
#include <net/iw_handler.h>
#include <net/ieee80211.h>
#include <net/ieee80211_crypt.h>
@@ -47,57 +48,6 @@
#define PRISM2_MAX_MTU (PRISM2_MAX_FRAME_SIZE - (6 /* LLC */ + 8 /* WEP */))
-/* hostap.c */
-static int prism2_wds_add(local_info_t *local, u8 *remote_addr,
- int rtnl_locked);
-static int prism2_wds_del(local_info_t *local, u8 *remote_addr,
- int rtnl_locked, int do_not_remove);
-
-/* hostap_ap.c */
-static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
- struct iw_quality qual[], int buf_size,
- int aplist);
-static int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
-static int prism2_hostapd(struct ap_data *ap,
- struct prism2_hostapd_param *param);
-static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
- struct ieee80211_crypt_data ***crypt);
-static void ap_control_kickall(struct ap_data *ap);
-#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
-static int ap_control_add_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac);
-static int ap_control_del_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac);
-static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
-static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev,
- u8 *mac);
-#endif /* !PRISM2_NO_KERNEL_IEEE80211_MGMT */
-
-
-static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
- 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
-#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
-
-
-/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
-/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
-static unsigned char rfc1042_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
-/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
-static unsigned char bridge_tunnel_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
-/* No encapsulation header if EtherType < 0x600 (=length) */
-
-
-/* FIX: these could be compiled separately and linked together to hostap.o */
-#include "hostap_ap.c"
-#include "hostap_info.c"
-#include "hostap_ioctl.c"
-#include "hostap_proc.c"
-#include "hostap_80211_rx.c"
-#include "hostap_80211_tx.c"
-
-
struct net_device * hostap_add_interface(struct local_info *local,
int type, int rtnl_locked,
const char *prefix,
@@ -196,8 +146,8 @@
}
-static int prism2_wds_add(local_info_t *local, u8 *remote_addr,
- int rtnl_locked)
+int prism2_wds_add(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked)
{
struct net_device *dev;
struct list_head *ptr;
@@ -258,8 +208,8 @@
}
-static int prism2_wds_del(local_info_t *local, u8 *remote_addr,
- int rtnl_locked, int do_not_remove)
+int prism2_wds_del(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked, int do_not_remove)
{
unsigned long flags;
struct list_head *ptr;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_rx.c.old 2005-12-03 00:53:21.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_rx.c 2005-12-03 02:35:11.000000000 +0100
@@ -1,7 +1,18 @@
#include <linux/etherdevice.h>
+#include <net/ieee80211_crypt.h>
#include "hostap_80211.h"
#include "hostap.h"
+#include "hostap_ap.h"
+
+/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
+/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
+static unsigned char rfc1042_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
+static unsigned char bridge_tunnel_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+/* No encapsulation header if EtherType < 0x600 (=length) */
void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_tx.c.old 2005-12-03 01:05:49.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_tx.c 2005-12-03 02:35:19.000000000 +0100
@@ -1,3 +1,18 @@
+#include "hostap_80211.h"
+#include "hostap_common.h"
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
+
+/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
+/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
+static unsigned char rfc1042_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
+static unsigned char bridge_tunnel_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+/* No encapsulation header if EtherType < 0x600 (=length) */
+
void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
{
struct ieee80211_hdr_4addr *hdr;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.c.old 2005-12-03 01:18:28.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.c 2005-12-03 02:21:57.000000000 +0100
@@ -16,6 +16,14 @@
* (8802.11: 5.5)
*/
+#include <linux/proc_fs.h>
+#include <linux/delay.h>
+#include <linux/random.h>
+
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
+
static int other_ap_policy[MAX_PARM_DEVICES] = { AP_OTHER_AP_SKIP_ALL,
DEF_INTS };
module_param_array(other_ap_policy, int, NULL, 0444);
@@ -360,8 +368,7 @@
}
-static int ap_control_add_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac)
+int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac)
{
struct mac_entry *entry;
@@ -380,8 +387,7 @@
}
-static int ap_control_del_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac)
+int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac)
{
struct list_head *ptr;
struct mac_entry *entry;
@@ -433,7 +439,7 @@
}
-static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions)
+void ap_control_flush_macs(struct mac_restrictions *mac_restrictions)
{
struct list_head *ptr, *n;
struct mac_entry *entry;
@@ -454,8 +460,7 @@
}
-static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev,
- u8 *mac)
+int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac)
{
struct sta_info *sta;
u16 resp;
@@ -486,7 +491,7 @@
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
-static void ap_control_kickall(struct ap_data *ap)
+void ap_control_kickall(struct ap_data *ap)
{
struct list_head *ptr, *n;
struct sta_info *sta;
@@ -2321,9 +2326,9 @@
}
-static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
- struct iw_quality qual[], int buf_size,
- int aplist)
+int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
+ struct iw_quality qual[], int buf_size,
+ int aplist)
{
struct ap_data *ap = local->ap;
struct list_head *ptr;
@@ -2363,7 +2368,7 @@
/* Translate our list of Access Points & Stations to a card independant
* format that the Wireless Tools will understand - Jean II */
-static int prism2_ap_translate_scan(struct net_device *dev, char *buffer)
+int prism2_ap_translate_scan(struct net_device *dev, char *buffer)
{
struct hostap_interface *iface;
local_info_t *local;
@@ -2608,8 +2613,7 @@
}
-static int prism2_hostapd(struct ap_data *ap,
- struct prism2_hostapd_param *param)
+int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param)
{
switch (param->cmd) {
case PRISM2_HOSTAPD_FLUSH:
@@ -3207,8 +3211,8 @@
}
-static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
- struct ieee80211_crypt_data ***crypt)
+void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
+ struct ieee80211_crypt_data ***crypt)
{
struct sta_info *sta;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_info.c.old 2005-12-03 01:49:24.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_info.c 2005-12-03 01:51:43.000000000 +0100
@@ -1,5 +1,8 @@
/* Host AP driver Info Frame processing (part of hostap.o module) */
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
/* Called only as a tasklet (software IRQ) */
static void prism2_info_commtallies16(local_info_t *local, unsigned char *buf,
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ioctl.c.old 2005-12-03 01:52:34.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ioctl.c 2005-12-03 02:27:09.000000000 +0100
@@ -1,11 +1,13 @@
/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
-#ifdef in_atomic
-/* Get kernel_locked() for in_atomic() */
+#include <linux/types.h>
#include <linux/smp_lock.h>
-#endif
#include <linux/ethtool.h>
+#include <net/ieee80211_crypt.h>
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
static struct iw_statistics *hostap_get_wireless_stats(struct net_device *dev)
{
@@ -3910,7 +3912,7 @@
local->sta_fw_ver & 0xff);
}
-static struct ethtool_ops prism2_ethtool_ops = {
+struct ethtool_ops prism2_ethtool_ops = {
.get_drvinfo = prism2_get_drvinfo
};
@@ -3985,7 +3987,7 @@
(iw_handler) prism2_ioctl_priv_readmif, /* 3 */
};
-static const struct iw_handler_def hostap_iw_handler_def =
+const struct iw_handler_def hostap_iw_handler_def =
{
.num_standard = sizeof(prism2_handler) / sizeof(iw_handler),
.num_private = sizeof(prism2_private_handler) / sizeof(iw_handler),
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_proc.c.old 2005-12-03 02:29:08.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_proc.c 2005-12-03 02:32:00.000000000 +0100
@@ -1,5 +1,12 @@
/* /proc routines for Host AP driver */
+#include <linux/types.h>
+#include <linux/proc_fs.h>
+#include <net/ieee80211_crypt.h>
+
+#include "hostap_wlan.h"
+#include "hostap.h"
+
#define PROC_LIMIT (PAGE_SIZE - 80)
--- linux-2.6.15-mm1-full/include/net/ieee80211_crypt.h.old 2006-01-05 22:28:09.000000000 +0100
+++ linux-2.6.15-mm1-full/include/net/ieee80211_crypt.h 2006-01-05 22:28:26.000000000 +0100
@@ -25,6 +25,7 @@
#include <linux/types.h>
#include <linux/list.h>
+#include <net/ieee80211.h>
#include <asm/atomic.h>
enum {
^ permalink raw reply
* Re: wireless: recap of current issues (configuration)
From: Stuffed Crust @ 2006-01-14 1:17 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev, linux-kernel
In-Reply-To: <1137191522.2520.63.camel@localhost>
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
On Fri, Jan 13, 2006 at 11:32:02PM +0100, Johannes Berg wrote:
> I'm not sure this is worth it. While putting this into the WiPHY device
> creates more logic there, putting knowledge like 'how many different
> channels can this WiPHY device support' etc. into some representation
> that can be used by the stack to decide is much more trouble than it is
> worth.
Do you mean 'simultaneous' channel operation, or something more mundane
like simply 'what frequencies can I run on'?
If you're talking about the former.. things get quite complicated, but
that could be handled by having two WiPHY devices registered.
As for the latter, when you factor in the needs of 802.11d and its
dependents (802.11j, 802.11k, and others) the stack is going to need to
be aware of the available channel sets; both in the sense of hardware
support and also the various regulatory requirements.
The hardware knows what frequencies it supports. Unfortunately this has
to be a somewhat dynamic thing, as this is often not queryable until the
device firmware is up and running.
This can be accomplished by passing a static table to the
register_wiphy_device() call (or perhaps via a struct wiphy_dev
parameter) or through a more explicit, dynamic interface like:
wiphy_register_supported_frequency(hw, 2412).
- Solomon
--
Solomon Peachy ICQ: 1318344
Melbourne, FL
Quidquid latine dictum sit, altum viditur.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: wireless: recap of current issues (configuration)
From: Krzysztof Halasa @ 2006-01-14 0:05 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <20060113221935.GJ16166@tuxdriver.com>
"John W. Linville" <linville@tuxdriver.com> writes:
> Virtual devices will have a mode (e.g. station, AP, WDS, ad-hoc, rfmon,
> raw?, other modes?) which defines its "on the air" behaviour. Should
> this mode be fixed when the wlan device is created?
I think so. If needed one can delete and create.
> Or something
> that can be changed when the net_device is down?
IMHO: unnecessary complicates things.
> It may be necessary to remove, suspend, and/or disable wlan devices
> in order to add, resume, and/or enable other types of wlan devices
> on the same WiPHY device (especialy true for rfmon). A mechanism is
> needed for drivers to be able to influence or disallow combinations
> of wlan devices in accordance with capabilities of the hardware.
If the control messages go through the main (WiPHY) driver it can
decide and/or forward the request further, to the library.
Not sure about netlink. OTOH I'm at all not sure netlink should be
used for configuration. sysfs, ioctl seem a better options. Netlink
is better for state monitoring etc. I don't know it very well though.
> Do "global" config requests go to any associated wlan device?
Are they any global config settings?
sysctl or sysfs maybe?
> Or must they be directed to the WiPHY device? Does it matter?
If you mean "settings for a particular physical card" then WiPHY.
> I think we should require "global" configuration to target the WiPHY
> device, while "local" configuration remains with the wlan device.
If "local" means "concerning the wlan device" then sure, yes.
> (I'm not sure how important this point is?) Either way, the WiPHY
> device will need some way to be able to reject configuration requests
> that are incompatible among its associated wlan devices. Since the
> wlan interface implementations should not be device specific, perhaps
> the 802.11 stack can be smart enough to filter-out most conflicting
> config requests before they get to the WiPHY device?
I don't think so. The hardware driver should get the request first,
the rest should look like a library.
I've played with both approaches for years and I would avoid
"802.11 using the hw driver" scenario if at all possible.
--
Krzysztof Halasa
^ permalink raw reply
* Re: WCONF, netlink based WE replacement.
From: Pavel Machek @ 2006-01-13 23:23 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Michael Buesch, linux-kernel, netdev
In-Reply-To: <20060113095533.5d5df015@dxpl.pdx.osdl.net>
On Pá 13-01-06 09:55:33, Stephen Hemminger wrote:
> On Thu, 12 Jan 2006 18:24:02 +0100
>
> 4. What about non-ieee80211 devices? With the growth of (mostly proprietary)
> cell phone carrier wireless, you don't want to shut out that.
Don't mix it here. Mobile phones normally talk using AT interface,
modem-like.
Pavel
--
Thanks, Sharp!
^ permalink raw reply
* Re: wireless: recap of current issues (stack)
From: Chase Venters @ 2006-01-13 23:03 UTC (permalink / raw)
To: netdev, linux-kernel, Jiri Benc, Stefan Rompf, Mike Kershaw,
Krzysztof Halasa, Robert Hancock, Alistair John Strachan,
Dominik Brodowski, Denis Vlasenko, Danny van Dyk,
Stephen Hemminger, feyd, Andreas Mohr, Bas Vermeulen,
Jean Tourrilhes, Daniel Drake, Ulrich Kunitz, Phil Dibowitz,
Simon Kelley, Michael Buesch, Marcel Holtmann, Patrick McHardy,
Ingo Oeser, Harald Welte <laforg
In-Reply-To: <20060113213200.GG16166@tuxdriver.com>
On Friday 13 January 2006 15:32, John W. Linville wrote:
> Do we need to have both wireless-stable and wireless-devel kernels?
> What about the suggestion of having both stacks in the kernel at once?
> I'm not very excited about two in-kernel stacks. Still, consolidating
> wireless drivers down to two stacks is probably better than what we
> have now...? Either way, we would have to have general understanding
> that at some point (not too far away), one of the stacks would have
> to disappear.
Having not had experience coding for the stacks, I'm not inclined to form an
opinion on which is better. I think on a realistic footing, a stack switch
should only occur if it doesn't come at great expense (unless that great
expense is less than the expense of making the existing stack capable enough
to handle all the devices we want to support).
But I have to NAK the idea of two stacks. There are implications in the 'here
and now', so to speak, but what worries me the most is long term. You know
how it's no fun fixing bugs when you could be adding new features? Let's say
that on May 2006, you drop the hammer and decide that Stack B is the winner.
You've now got to convince / motivate the Stack A users to stop what they're
doing and work hard to migrate to Stack B. There might be stragglers, so
let's say you set a "drop dead date". Now what happens if we reach that date
and some drivers still aren't ready. "Tough," you say, "you've had ample
notice and time to port." Now we've got a flamewar on our hands, because no
one wants to release a new kernel that drops support for things people are
using.
By contrast, if we got softmac in, ieee80211 may still be lacking in some
areas, but if we do the hard work to port a few drivers and get them in-tree
and working well, you start to have happy users. Motivation will build for
others to port and get into the tree (partly because no one wants to be the
odd man out, and their users will probably be frustrated by it too), and part
of the motivation should extend naturally onto improving in-kernel ieee80211
enough to support whatever odd-ball implementations they're dealing with. So
I think you end up with a nice snowball effect.
As an aside to this whole thing, I know we're talking about *kernel* wireless
but it's worthless to most people without good userland support as well.
Anyone have any thoughts and feelings on what things look like on the
desktop? I think if we work closely with some desktop people, we can shepard
in some wonderful new desktop support on top of the new netlink API.
Cheers,
Chase Venters
^ permalink raw reply
* Re: wireless: recap of current issues (other issues)
From: Johannes Berg @ 2006-01-13 23:02 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <1137191711.2520.69.camel@localhost>
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
On Fri, 2006-01-13 at 23:35 +0100, Johannes Berg wrote:
> On Fri, 2006-01-13 at 17:24 -0500, John W. Linville wrote:
>
> > Radiotap headers make sense for an rfmon virtual device. I don't
> > think it makes sense for "normal" usage. Should there be an option
> > for radiotap headers on non-rfmon links?
>
> Yes. For hardware debugging.
Actually, scratch that. For hardware debugging you just add a virtual
rfmon device and go with that, and just don't do anything except 2
virtual devices on the wiphy.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* Re: wireless: recap of current issues
From: Ben Greear @ 2006-01-13 22:49 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <43C80F9A.8020203@candelatech.com>
This is a re-send since the lists ate my reply. I've also
trimmed out all but netdev and lkml email addresses.
> Do "global" config requests go to any associated wlan device?
> Or must they be directed to the WiPHY device? Does it matter?
> I think we should require "global" configuration to target the WiPHY
> device, while "local" configuration remains with the wlan device.
> (I'm not sure how important this point is?) Either way, the WiPHY
> device will need some way to be able to reject configuration requests
> that are incompatible among its associated wlan devices. Since the
> wlan interface implementations should not be device specific, perhaps
> the 802.11 stack can be smart enough to filter-out most conflicting
> config requests before they get to the WiPHY device?
I'd create a generic function that handles most things, but allow the
driver to over-ride this method if it knows better. Something like
is_ok_to_add(new wlan device info);
might need an is_ok_to_remove(foo); as well.
> We need an ethernet<->802.11 translational bridging interface for
> compatibility, and to enable 802.1 bridging with ethernet. This could
> be a configuration setting for a wlan interface. It might be limited
> to wlan interfaces in station (or WDS) mode?
If we can send a raw ethernet frame at the driver/stack, then it can
reject or send as needed. For instance, you should be able to 'bridge'
to a regular station interface _IF_ the source MAC matches the station's
source MAC. This would also allow the packet-socket code to work with
wifi just like it does with wired ethernet (and 802.1Q VLANs, for that matter.)
> Should a default wlan device be created at WiPHY init? Should it
> enable translational bridging? I'm inclined against this, but is it
> worthwhile for compatibility? Could/should this be a configuration
> option for the stack?
I wouldn't...can't see how it helps anything.
> Stack
> =====
>
> Is the in-kernel stack up-to-date w/ SourceForge? No. Why not?
> Can this development be brought into wireless development kernels?
>
> Can the in-kernel stack be saved? With the addition of softmac?
> Is it possible to extend softmac to support virtual wlan devices?
> If not, how do we proceed?
>
> How do we get more drivers in-kernel? (Multiple stacks probably
> don't help beyond the short-term timeframe.)
One thing multiple in-kernel stacks might give us would be an easier way for
developers (especially those not fully versed in wifi)
to try out features of both stacks and make merging between
the stacks easier (with the goal of having only one stack). It would probably
allow more drivers to get in immediately as well, which should get
more developers working on the same core logic.
> Other Issues
> ============
>
> Radiotap headers make sense for an rfmon virtual device. I don't
> think it makes sense for "normal" usage. Should there be an option
> for radiotap headers on non-rfmon links?
>
> Rfmon interferes w/ other interfaces, but may be handy to enter/leave
> w/ little effort. Perhaps a config option for physical device to
> suspend/resume all (non-rfmon) virtual devices before/after enabling
> rfmon virtual device? (Would multiple rfmon devices even make sense?
> If not, is it worth restricting that?)
With regard to conflicting virtual devices: How about treat all 'DOWN'
devices as irrelevent to the physical device. That way, you can have
rfmon, AP, station, etc devices all configured at once, and just ifdown/ifup
the one(s) you want to use at any given point. The virtual interfaces can
keep all config info needed to bring themselves back online.
> What about old hardware w/ inactive maintenance? Deprecate/remove?
> Grandfather them w/ treatment as ethernet devices? Probably don't
> need a pronouncement on this at this time...
Ignore for now..maybe it will get more active maintenance when the
stack solidifies enough to make developing wifi less complex.
> Since we are toying with the issue of multiple stacks (at least in the
> wireless development kernels), some thought needs to be done w.r.t. how
> to make a final decision between the two stacks. An objective lists
> of functional feature requirements seems like a good place to start.
> IOW, I would like to have a list of features that would trigger the
> removal of one stack shortly after the other stack achieves support
> for the list. Is this feasible?
Would it be possible to write a very thin 'shim' stack that could
sit over either device-scape or the current stack? This shim could
start solidifying the API with user-space somewhat independently of
the lower levels. If one stack did not support a particular feature,
then it just returns a failure code. If this is not too much work,
it might allow the stack merge to happen gradually. Of course, this
might be more work than it's worth...
Thanks for all the work you're doing!
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: wireless: recap of current issues (actions)
From: Johannes Berg @ 2006-01-13 22:36 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <20060113222512.GN16166@tuxdriver.com>
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
On Fri, 2006-01-13 at 17:25 -0500, John W. Linville wrote:
> Since we are toying with the issue of multiple stacks (at least in the
> wireless development kernels), some thought needs to be done w.r.t. how
> to make a final decision between the two stacks. An objective lists
> of functional feature requirements seems like a good place to start.
> IOW, I would like to have a list of features that would trigger the
> removal of one stack shortly after the other stack achieves support
> for the list. Is this feasible?
I started collecting some info on
http://johannes.sipsolutions.net/802.11_stacks
That page should probably be moved somewhere (netdev wiki?) where it is
writable by others. I also need to update it to include comments by Jean
Tourrilhes.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* Re: wireless: recap of current issues (other issues)
From: Johannes Berg @ 2006-01-13 22:35 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <20060113222408.GM16166@tuxdriver.com>
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
On Fri, 2006-01-13 at 17:24 -0500, John W. Linville wrote:
> Radiotap headers make sense for an rfmon virtual device. I don't
> think it makes sense for "normal" usage. Should there be an option
> for radiotap headers on non-rfmon links?
Yes. For hardware debugging.
> Rfmon interferes w/ other interfaces, but may be handy to enter/leave
> w/ little effort. Perhaps a config option for physical device to
> suspend/resume all (non-rfmon) virtual devices before/after enabling
> rfmon virtual device? (Would multiple rfmon devices even make sense?
> If not, is it worth restricting that?)
Multiple rfmon devices make sense in hypothetical or future hardware if
different channels are supported on one WiPHY at once, but the rfmon
device shall be restricted to a single one. Since we probably need a way
to deactivate virtual devices anyway, having a config option to
suspend/resume all others doesn't make sense -- userspace programs can
just as well cycle over them and do it themselves.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* Re: wireless: recap of current issues (stack)
From: Johannes Berg @ 2006-01-13 22:34 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <20060113222259.GL16166@tuxdriver.com>
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On Fri, 2006-01-13 at 17:22 -0500, John W. Linville wrote:
> Can the in-kernel stack be saved? With the addition of softmac?
> Is it possible to extend softmac to support virtual wlan devices?
> If not, how do we proceed?
Well, softmac doesn't really have too many issues [that make it
incompatible with the planned stuff, that is]. Right now it layers
above ieee80211_device, and it would continue doing so, with
ieee80211_device transformed into the representation of the virtual STA
device.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox