aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco.c
diff options
context:
space:
mode:
authorDavid Gibson <hermes@gibson.dropbear.id.au>2005-05-12 20:02:58 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-12 20:02:58 -0400
commit1fc5eb642805fa724b67fd17f008b582b0400919 (patch)
tree10d6b550196126e7d948210cb17bc2989aa09180 /drivers/net/wireless/orinoco.c
parent7bb7c3a326f509acbdaf550b54fba565544ef200 (diff)
[PATCH] Orinoco: kill dump_recs
Remove the dump_recs debugging iwpriv command. It will be replaced later with the simpler and more flexible get_rid command. Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/orinoco.c')
-rw-r--r--drivers/net/wireless/orinoco.c191
1 files changed, 0 insertions, 191 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 01cf28568bc2..6e4d0e7d43a9 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -607,7 +607,6 @@ struct hermes_rx_descriptor {
607static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 607static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
608static int __orinoco_program_rids(struct net_device *dev); 608static int __orinoco_program_rids(struct net_device *dev);
609static void __orinoco_set_multicast_list(struct net_device *dev); 609static void __orinoco_set_multicast_list(struct net_device *dev);
610static int orinoco_debug_dump_recs(struct net_device *dev);
611 610
612/********************************************************************/ 611/********************************************************************/
613/* Internal helper functions */ 612/* Internal helper functions */
@@ -3861,7 +3860,6 @@ orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3861 { SIOCIWFIRSTPRIV + 0x7, 0, 3860 { SIOCIWFIRSTPRIV + 0x7, 0,
3862 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 3861 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
3863 "get_ibssport" }, 3862 "get_ibssport" },
3864 { SIOCIWLASTPRIV, 0, 0, "dump_recs" },
3865 }; 3863 };
3866 3864
3867 wrq->u.data.length = sizeof(privtab) / sizeof(privtab[0]); 3865 wrq->u.data.length = sizeof(privtab) / sizeof(privtab[0]);
@@ -3949,14 +3947,6 @@ orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3949 err = orinoco_ioctl_getibssport(dev, wrq); 3947 err = orinoco_ioctl_getibssport(dev, wrq);
3950 break; 3948 break;
3951 3949
3952 case SIOCIWLASTPRIV:
3953 err = orinoco_debug_dump_recs(dev);
3954 if (err)
3955 printk(KERN_ERR "%s: Unable to dump records (%d)\n",
3956 dev->name, err);
3957 break;
3958
3959
3960 default: 3950 default:
3961 err = -EOPNOTSUPP; 3951 err = -EOPNOTSUPP;
3962 } 3952 }
@@ -3970,187 +3960,6 @@ orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3970 return err; 3960 return err;
3971} 3961}
3972 3962
3973struct {
3974 u16 rid;
3975 char *name;
3976 int displaytype;
3977#define DISPLAY_WORDS 0
3978#define DISPLAY_BYTES 1
3979#define DISPLAY_STRING 2
3980#define DISPLAY_XSTRING 3
3981} record_table[] = {
3982#define DEBUG_REC(name,type) { HERMES_RID_##name, #name, DISPLAY_##type }
3983 DEBUG_REC(CNFPORTTYPE,WORDS),
3984 DEBUG_REC(CNFOWNMACADDR,BYTES),
3985 DEBUG_REC(CNFDESIREDSSID,STRING),
3986 DEBUG_REC(CNFOWNCHANNEL,WORDS),
3987 DEBUG_REC(CNFOWNSSID,STRING),
3988 DEBUG_REC(CNFOWNATIMWINDOW,WORDS),
3989 DEBUG_REC(CNFSYSTEMSCALE,WORDS),
3990 DEBUG_REC(CNFMAXDATALEN,WORDS),
3991 DEBUG_REC(CNFPMENABLED,WORDS),
3992 DEBUG_REC(CNFPMEPS,WORDS),
3993 DEBUG_REC(CNFMULTICASTRECEIVE,WORDS),
3994 DEBUG_REC(CNFMAXSLEEPDURATION,WORDS),
3995 DEBUG_REC(CNFPMHOLDOVERDURATION,WORDS),
3996 DEBUG_REC(CNFOWNNAME,STRING),
3997 DEBUG_REC(CNFOWNDTIMPERIOD,WORDS),
3998 DEBUG_REC(CNFMULTICASTPMBUFFERING,WORDS),
3999 DEBUG_REC(CNFWEPENABLED_AGERE,WORDS),
4000 DEBUG_REC(CNFMANDATORYBSSID_SYMBOL,WORDS),
4001 DEBUG_REC(CNFWEPDEFAULTKEYID,WORDS),
4002 DEBUG_REC(CNFDEFAULTKEY0,BYTES),
4003 DEBUG_REC(CNFDEFAULTKEY1,BYTES),
4004 DEBUG_REC(CNFMWOROBUST_AGERE,WORDS),
4005 DEBUG_REC(CNFDEFAULTKEY2,BYTES),
4006 DEBUG_REC(CNFDEFAULTKEY3,BYTES),
4007 DEBUG_REC(CNFWEPFLAGS_INTERSIL,WORDS),
4008 DEBUG_REC(CNFWEPKEYMAPPINGTABLE,WORDS),
4009 DEBUG_REC(CNFAUTHENTICATION,WORDS),
4010 DEBUG_REC(CNFMAXASSOCSTA,WORDS),
4011 DEBUG_REC(CNFKEYLENGTH_SYMBOL,WORDS),
4012 DEBUG_REC(CNFTXCONTROL,WORDS),
4013 DEBUG_REC(CNFROAMINGMODE,WORDS),
4014 DEBUG_REC(CNFHOSTAUTHENTICATION,WORDS),
4015 DEBUG_REC(CNFRCVCRCERROR,WORDS),
4016 DEBUG_REC(CNFMMLIFE,WORDS),
4017 DEBUG_REC(CNFALTRETRYCOUNT,WORDS),
4018 DEBUG_REC(CNFBEACONINT,WORDS),
4019 DEBUG_REC(CNFAPPCFINFO,WORDS),
4020 DEBUG_REC(CNFSTAPCFINFO,WORDS),
4021 DEBUG_REC(CNFPRIORITYQUSAGE,WORDS),
4022 DEBUG_REC(CNFTIMCTRL,WORDS),
4023 DEBUG_REC(CNFTHIRTY2TALLY,WORDS),
4024 DEBUG_REC(CNFENHSECURITY,WORDS),
4025 DEBUG_REC(CNFGROUPADDRESSES,BYTES),
4026 DEBUG_REC(CNFCREATEIBSS,WORDS),
4027 DEBUG_REC(CNFFRAGMENTATIONTHRESHOLD,WORDS),
4028 DEBUG_REC(CNFRTSTHRESHOLD,WORDS),
4029 DEBUG_REC(CNFTXRATECONTROL,WORDS),
4030 DEBUG_REC(CNFPROMISCUOUSMODE,WORDS),
4031 DEBUG_REC(CNFBASICRATES_SYMBOL,WORDS),
4032 DEBUG_REC(CNFPREAMBLE_SYMBOL,WORDS),
4033 DEBUG_REC(CNFSHORTPREAMBLE,WORDS),
4034 DEBUG_REC(CNFWEPKEYS_AGERE,BYTES),
4035 DEBUG_REC(CNFEXCLUDELONGPREAMBLE,WORDS),
4036 DEBUG_REC(CNFTXKEY_AGERE,WORDS),
4037 DEBUG_REC(CNFAUTHENTICATIONRSPTO,WORDS),
4038 DEBUG_REC(CNFBASICRATES,WORDS),
4039 DEBUG_REC(CNFSUPPORTEDRATES,WORDS),
4040 DEBUG_REC(CNFTICKTIME,WORDS),
4041 DEBUG_REC(CNFSCANREQUEST,WORDS),
4042 DEBUG_REC(CNFJOINREQUEST,WORDS),
4043 DEBUG_REC(CNFAUTHENTICATESTATION,WORDS),
4044 DEBUG_REC(CNFCHANNELINFOREQUEST,WORDS),
4045 DEBUG_REC(MAXLOADTIME,WORDS),
4046 DEBUG_REC(DOWNLOADBUFFER,WORDS),
4047 DEBUG_REC(PRIID,WORDS),
4048 DEBUG_REC(PRISUPRANGE,WORDS),
4049 DEBUG_REC(CFIACTRANGES,WORDS),
4050 DEBUG_REC(NICSERNUM,XSTRING),
4051 DEBUG_REC(NICID,WORDS),
4052 DEBUG_REC(MFISUPRANGE,WORDS),
4053 DEBUG_REC(CFISUPRANGE,WORDS),
4054 DEBUG_REC(CHANNELLIST,WORDS),
4055 DEBUG_REC(REGULATORYDOMAINS,WORDS),
4056 DEBUG_REC(TEMPTYPE,WORDS),
4057/* DEBUG_REC(CIS,BYTES), */
4058 DEBUG_REC(STAID,WORDS),
4059 DEBUG_REC(CURRENTSSID,STRING),
4060 DEBUG_REC(CURRENTBSSID,BYTES),
4061 DEBUG_REC(COMMSQUALITY,WORDS),
4062 DEBUG_REC(CURRENTTXRATE,WORDS),
4063 DEBUG_REC(CURRENTBEACONINTERVAL,WORDS),
4064 DEBUG_REC(CURRENTSCALETHRESHOLDS,WORDS),
4065 DEBUG_REC(PROTOCOLRSPTIME,WORDS),
4066 DEBUG_REC(SHORTRETRYLIMIT,WORDS),
4067 DEBUG_REC(LONGRETRYLIMIT,WORDS),
4068 DEBUG_REC(MAXTRANSMITLIFETIME,WORDS),
4069 DEBUG_REC(MAXRECEIVELIFETIME,WORDS),
4070 DEBUG_REC(CFPOLLABLE,WORDS),
4071 DEBUG_REC(AUTHENTICATIONALGORITHMS,WORDS),
4072 DEBUG_REC(PRIVACYOPTIONIMPLEMENTED,WORDS),
4073 DEBUG_REC(OWNMACADDR,BYTES),
4074 DEBUG_REC(SCANRESULTSTABLE,WORDS),
4075 DEBUG_REC(PHYTYPE,WORDS),
4076 DEBUG_REC(CURRENTCHANNEL,WORDS),
4077 DEBUG_REC(CURRENTPOWERSTATE,WORDS),
4078 DEBUG_REC(CCAMODE,WORDS),
4079 DEBUG_REC(SUPPORTEDDATARATES,WORDS),
4080 DEBUG_REC(BUILDSEQ,BYTES),
4081 DEBUG_REC(FWID,XSTRING)
4082#undef DEBUG_REC
4083};
4084
4085#define DEBUG_LTV_SIZE 128
4086
4087static int orinoco_debug_dump_recs(struct net_device *dev)
4088{
4089 struct orinoco_private *priv = netdev_priv(dev);
4090 hermes_t *hw = &priv->hw;
4091 u8 *val8;
4092 u16 *val16;
4093 int i,j;
4094 u16 length;
4095 int err;
4096
4097 /* I'm not sure: we might have a lock here, so we'd better go
4098 atomic, just in case. */
4099 val8 = kmalloc(DEBUG_LTV_SIZE + 2, GFP_ATOMIC);
4100 if (! val8)
4101 return -ENOMEM;
4102 val16 = (u16 *)val8;
4103
4104 for (i = 0; i < ARRAY_SIZE(record_table); i++) {
4105 u16 rid = record_table[i].rid;
4106 int len;
4107
4108 memset(val8, 0, DEBUG_LTV_SIZE + 2);
4109
4110 err = hermes_read_ltv(hw, USER_BAP, rid, DEBUG_LTV_SIZE,
4111 &length, val8);
4112 if (err) {
4113 DEBUG(0, "Error %d reading RID 0x%04x\n", err, rid);
4114 continue;
4115 }
4116 val16 = (u16 *)val8;
4117 if (length == 0)
4118 continue;
4119
4120 printk(KERN_DEBUG "%-15s (0x%04x): length=%d (%d bytes)\tvalue=",
4121 record_table[i].name,
4122 rid, length, (length-1)*2);
4123 len = min(((int)length-1)*2, DEBUG_LTV_SIZE);
4124
4125 switch (record_table[i].displaytype) {
4126 case DISPLAY_WORDS:
4127 for (j = 0; j < len / 2; j++)
4128 printk("%04X-", le16_to_cpu(val16[j]));
4129 break;
4130
4131 case DISPLAY_BYTES:
4132 default:
4133 for (j = 0; j < len; j++)
4134 printk("%02X:", val8[j]);
4135 break;
4136
4137 case DISPLAY_STRING:
4138 len = min(len, le16_to_cpu(val16[0])+2);
4139 val8[len] = '\0';
4140 printk("\"%s\"", (char *)&val16[1]);
4141 break;
4142
4143 case DISPLAY_XSTRING:
4144 printk("'%s'", (char *)val8);
4145 }
4146
4147 printk("\n");
4148 }
4149
4150 kfree(val8);
4151
4152 return 0;
4153}
4154 3963
4155/********************************************************************/ 3964/********************************************************************/
4156/* Debugging */ 3965/* Debugging */