aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ipw2200.c508
1 files changed, 1 insertions, 507 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index b89ede14419c..8e17308b5539 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -6159,70 +6159,6 @@ static void ipw_bg_abort_scan(void *data)
6159 up(&priv->sem); 6159 up(&priv->sem);
6160} 6160}
6161 6161
6162#if WIRELESS_EXT < 18
6163/* Support for wpa_supplicant before WE-18, deprecated. */
6164
6165/* following definitions must match definitions in driver_ipw.c */
6166
6167#define IPW_IOCTL_WPA_SUPPLICANT SIOCIWFIRSTPRIV+30
6168
6169#define IPW_CMD_SET_WPA_PARAM 1
6170#define IPW_CMD_SET_WPA_IE 2
6171#define IPW_CMD_SET_ENCRYPTION 3
6172#define IPW_CMD_MLME 4
6173
6174#define IPW_PARAM_WPA_ENABLED 1
6175#define IPW_PARAM_TKIP_COUNTERMEASURES 2
6176#define IPW_PARAM_DROP_UNENCRYPTED 3
6177#define IPW_PARAM_PRIVACY_INVOKED 4
6178#define IPW_PARAM_AUTH_ALGS 5
6179#define IPW_PARAM_IEEE_802_1X 6
6180
6181#define IPW_MLME_STA_DEAUTH 1
6182#define IPW_MLME_STA_DISASSOC 2
6183
6184#define IPW_CRYPT_ERR_UNKNOWN_ALG 2
6185#define IPW_CRYPT_ERR_UNKNOWN_ADDR 3
6186#define IPW_CRYPT_ERR_CRYPT_INIT_FAILED 4
6187#define IPW_CRYPT_ERR_KEY_SET_FAILED 5
6188#define IPW_CRYPT_ERR_TX_KEY_SET_FAILED 6
6189#define IPW_CRYPT_ERR_CARD_CONF_FAILED 7
6190
6191#define IPW_CRYPT_ALG_NAME_LEN 16
6192
6193struct ipw_param {
6194 u32 cmd;
6195 u8 sta_addr[ETH_ALEN];
6196 union {
6197 struct {
6198 u8 name;
6199 u32 value;
6200 } wpa_param;
6201 struct {
6202 u32 len;
6203 u8 reserved[32];
6204 u8 data[0];
6205 } wpa_ie;
6206 struct {
6207 u32 command;
6208 u32 reason_code;
6209 } mlme;
6210 struct {
6211 u8 alg[IPW_CRYPT_ALG_NAME_LEN];
6212 u8 set_tx;
6213 u32 err;
6214 u8 idx;
6215 u8 seq[8]; /* sequence counter (set: RX, get: TX) */
6216 u16 key_len;
6217 u8 key[0];
6218 } crypt;
6219
6220 } u;
6221};
6222
6223/* end of driver_ipw.c code */
6224#endif
6225
6226static int ipw_wpa_enable(struct ipw_priv *priv, int value) 6162static int ipw_wpa_enable(struct ipw_priv *priv, int value)
6227{ 6163{
6228 /* This is called when wpa_supplicant loads and closes the driver 6164 /* This is called when wpa_supplicant loads and closes the driver
@@ -6231,11 +6167,6 @@ static int ipw_wpa_enable(struct ipw_priv *priv, int value)
6231 return 0; 6167 return 0;
6232} 6168}
6233 6169
6234#if WIRELESS_EXT < 18
6235#define IW_AUTH_ALG_OPEN_SYSTEM 0x1
6236#define IW_AUTH_ALG_SHARED_KEY 0x2
6237#endif
6238
6239static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value) 6170static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value)
6240{ 6171{
6241 struct ieee80211_device *ieee = priv->ieee; 6172 struct ieee80211_device *ieee = priv->ieee;
@@ -6283,416 +6214,6 @@ static int ipw_set_rsn_capa(struct ipw_priv *priv,
6283 return ipw_send_cmd(priv, &cmd); 6214 return ipw_send_cmd(priv, &cmd);
6284} 6215}
6285 6216
6286#if WIRELESS_EXT < 18
6287static int ipw_wpa_set_param(struct net_device *dev, u8 name, u32 value)
6288{
6289 struct ipw_priv *priv = ieee80211_priv(dev);
6290 struct ieee80211_crypt_data *crypt;
6291 unsigned long flags;
6292 int ret = 0;
6293
6294 switch (name) {
6295 case IPW_PARAM_WPA_ENABLED:
6296 ret = ipw_wpa_enable(priv, value);
6297 break;
6298
6299 case IPW_PARAM_TKIP_COUNTERMEASURES:
6300 crypt = priv->ieee->crypt[priv->ieee->tx_keyidx];
6301 if (!crypt || !crypt->ops->set_flags || !crypt->ops->get_flags) {
6302 IPW_WARNING("Can't set TKIP countermeasures: "
6303 "crypt not set!\n");
6304 break;
6305 }
6306
6307 flags = crypt->ops->get_flags(crypt->priv);
6308
6309 if (value)
6310 flags |= IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
6311 else
6312 flags &= ~IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
6313
6314 crypt->ops->set_flags(flags, crypt->priv);
6315
6316 break;
6317
6318 case IPW_PARAM_DROP_UNENCRYPTED:{
6319 /* HACK:
6320 *
6321 * wpa_supplicant calls set_wpa_enabled when the driver
6322 * is loaded and unloaded, regardless of if WPA is being
6323 * used. No other calls are made which can be used to
6324 * determine if encryption will be used or not prior to
6325 * association being expected. If encryption is not being
6326 * used, drop_unencrypted is set to false, else true -- we
6327 * can use this to determine if the CAP_PRIVACY_ON bit should
6328 * be set.
6329 */
6330 struct ieee80211_security sec = {
6331 .flags = SEC_ENABLED,
6332 .enabled = value,
6333 };
6334 priv->ieee->drop_unencrypted = value;
6335 /* We only change SEC_LEVEL for open mode. Others
6336 * are set by ipw_wpa_set_encryption.
6337 */
6338 if (!value) {
6339 sec.flags |= SEC_LEVEL;
6340 sec.level = SEC_LEVEL_0;
6341 } else {
6342 sec.flags |= SEC_LEVEL;
6343 sec.level = SEC_LEVEL_1;
6344 }
6345 if (priv->ieee->set_security)
6346 priv->ieee->set_security(priv->ieee->dev, &sec);
6347 break;
6348 }
6349
6350 case IPW_PARAM_PRIVACY_INVOKED:
6351 priv->ieee->privacy_invoked = value;
6352 break;
6353
6354 case IPW_PARAM_AUTH_ALGS:
6355 ret = ipw_wpa_set_auth_algs(priv, value);
6356 break;
6357
6358 case IPW_PARAM_IEEE_802_1X:
6359 priv->ieee->ieee802_1x = value;
6360 break;
6361
6362 default:
6363 IPW_ERROR("%s: Unknown WPA param: %d\n", dev->name, name);
6364 ret = -EOPNOTSUPP;
6365 }
6366
6367 return ret;
6368}
6369
6370static int ipw_wpa_mlme(struct net_device *dev, int command, int reason)
6371{
6372 struct ipw_priv *priv = ieee80211_priv(dev);
6373 int ret = 0;
6374
6375 switch (command) {
6376 case IPW_MLME_STA_DEAUTH:
6377 // silently ignore
6378 break;
6379
6380 case IPW_MLME_STA_DISASSOC:
6381 ipw_disassociate(priv);
6382 break;
6383
6384 default:
6385 IPW_ERROR("%s: Unknown MLME request: %d\n", dev->name, command);
6386 ret = -EOPNOTSUPP;
6387 }
6388
6389 return ret;
6390}
6391
6392static int ipw_wpa_ie_cipher2level(u8 cipher)
6393{
6394 switch (cipher) {
6395 case 4: /* CCMP */
6396 return SEC_LEVEL_3;
6397 case 2: /* TKIP */
6398 return SEC_LEVEL_2;
6399 case 5: /* WEP104 */
6400 case 1: /* WEP40 */
6401 return SEC_LEVEL_1;
6402 case 0: /* NONE */
6403 return SEC_LEVEL_0;
6404 default:
6405 return -1;
6406 }
6407}
6408
6409static int ipw_wpa_set_wpa_ie(struct net_device *dev,
6410 struct ipw_param *param, int plen)
6411{
6412 struct ipw_priv *priv = ieee80211_priv(dev);
6413 struct ieee80211_device *ieee = priv->ieee;
6414 u8 *buf;
6415 u8 *ptk, *gtk;
6416 int level;
6417
6418 if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
6419 (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
6420 return -EINVAL;
6421
6422 if (param->u.wpa_ie.len) {
6423 buf = kmalloc(param->u.wpa_ie.len, GFP_KERNEL);
6424 if (buf == NULL)
6425 return -ENOMEM;
6426
6427 memcpy(buf, param->u.wpa_ie.data, param->u.wpa_ie.len);
6428 kfree(ieee->wpa_ie);
6429 ieee->wpa_ie = buf;
6430 ieee->wpa_ie_len = param->u.wpa_ie.len;
6431 } else {
6432 kfree(ieee->wpa_ie);
6433 ieee->wpa_ie = NULL;
6434 ieee->wpa_ie_len = 0;
6435 goto done;
6436 }
6437
6438 if (priv->ieee->host_encrypt)
6439 goto done;
6440
6441 /* HACK: Parse wpa_ie here to get pairwise suite, otherwise
6442 * we need to change driver_ipw.c from wpa_supplicant. This
6443 * is OK since -Dipw is deprecated. The -Dwext driver has a
6444 * clean way to handle this. */
6445 gtk = ptk = (u8 *) ieee->wpa_ie;
6446 if (ieee->wpa_ie[0] == 0x30) { /* RSN IE */
6447 gtk += 4 + 3;
6448 ptk += 4 + 4 + 2 + 3;
6449 } else { /* WPA IE */
6450 gtk += 8 + 3;
6451 ptk += 8 + 4 + 2 + 3;
6452 }
6453
6454 if (ptk - (u8 *) ieee->wpa_ie > ieee->wpa_ie_len)
6455 return -EINVAL;
6456
6457 level = ipw_wpa_ie_cipher2level(*gtk);
6458 ipw_set_hw_decrypt_multicast(priv, level);
6459
6460 level = ipw_wpa_ie_cipher2level(*ptk);
6461 ipw_set_hw_decrypt_unicast(priv, level);
6462
6463 done:
6464 ipw_wpa_assoc_frame(priv, ieee->wpa_ie, ieee->wpa_ie_len);
6465 return 0;
6466}
6467
6468/* implementation borrowed from hostap driver */
6469
6470static int ipw_wpa_set_encryption(struct net_device *dev,
6471 struct ipw_param *param, int param_len)
6472{
6473 int ret = 0;
6474 int group_key = 0;
6475 struct ipw_priv *priv = ieee80211_priv(dev);
6476 struct ieee80211_device *ieee = priv->ieee;
6477 struct ieee80211_crypto_ops *ops;
6478 struct ieee80211_crypt_data **crypt;
6479
6480 struct ieee80211_security sec = {
6481 .flags = 0,
6482 };
6483
6484 param->u.crypt.err = 0;
6485 param->u.crypt.alg[IPW_CRYPT_ALG_NAME_LEN - 1] = '\0';
6486
6487 if (param_len !=
6488 (int)((char *)param->u.crypt.key - (char *)param) +
6489 param->u.crypt.key_len) {
6490 IPW_DEBUG_INFO("Len mismatch %d, %d\n", param_len,
6491 param->u.crypt.key_len);
6492 return -EINVAL;
6493 }
6494 if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff &&
6495 param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff &&
6496 param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) {
6497 if (param->u.crypt.idx >= WEP_KEYS)
6498 return -EINVAL;
6499 crypt = &ieee->crypt[param->u.crypt.idx];
6500 } else {
6501 return -EINVAL;
6502 }
6503
6504 if (param->u.crypt.idx != 0)
6505 group_key = 1;
6506
6507 sec.flags |= SEC_ENABLED | SEC_ENCRYPT;
6508 if (strcmp(param->u.crypt.alg, "none") == 0) {
6509 if (crypt) {
6510 sec.enabled = 0;
6511 sec.encrypt = 0;
6512 sec.level = SEC_LEVEL_0;
6513 sec.flags |= SEC_LEVEL;
6514 ieee80211_crypt_delayed_deinit(ieee, crypt);
6515 }
6516 goto done;
6517 }
6518 sec.enabled = 1;
6519 sec.encrypt = 1;
6520
6521 /* IPW HW cannot build TKIP MIC, host decryption still needed. */
6522 if (strcmp(param->u.crypt.alg, "TKIP") == 0) {
6523 if (group_key)
6524 ieee->host_mc_decrypt = 1;
6525 else
6526 ieee->host_encrypt_msdu = 1;
6527 }
6528
6529 /*if (!(ieee->host_encrypt || ieee->host_encrypt_msdu ||
6530 ieee->host_decrypt))
6531 goto skip_host_crypt; */
6532 if (group_key ? !ieee->host_mc_decrypt :
6533 !(ieee->host_encrypt || ieee->host_decrypt ||
6534 ieee->host_encrypt_msdu))
6535 goto skip_host_crypt;
6536
6537 ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
6538 if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
6539 request_module("ieee80211_crypt_wep");
6540 ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
6541 } else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
6542 request_module("ieee80211_crypt_tkip");
6543 ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
6544 } else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
6545 request_module("ieee80211_crypt_ccmp");
6546 ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
6547 }
6548 if (ops == NULL) {
6549 IPW_DEBUG_INFO("%s: unknown crypto alg '%s'\n",
6550 dev->name, param->u.crypt.alg);
6551 param->u.crypt.err = IPW_CRYPT_ERR_UNKNOWN_ALG;
6552 ret = -EINVAL;
6553 goto done;
6554 }
6555
6556 if (*crypt == NULL || (*crypt)->ops != ops) {
6557 struct ieee80211_crypt_data *new_crypt;
6558
6559 ieee80211_crypt_delayed_deinit(ieee, crypt);
6560
6561 new_crypt = (struct ieee80211_crypt_data *)
6562 kmalloc(sizeof(*new_crypt), GFP_KERNEL);
6563 if (new_crypt == NULL) {
6564 ret = -ENOMEM;
6565 goto done;
6566 }
6567 memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
6568 new_crypt->ops = ops;
6569 if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
6570 new_crypt->priv =
6571 new_crypt->ops->init(param->u.crypt.idx);
6572
6573 if (new_crypt->priv == NULL) {
6574 kfree(new_crypt);
6575 param->u.crypt.err = IPW_CRYPT_ERR_CRYPT_INIT_FAILED;
6576 ret = -EINVAL;
6577 goto done;
6578 }
6579
6580 *crypt = new_crypt;
6581 }
6582
6583 if (param->u.crypt.key_len > 0 && (*crypt)->ops->set_key &&
6584 (*crypt)->ops->set_key(param->u.crypt.key,
6585 param->u.crypt.key_len, param->u.crypt.seq,
6586 (*crypt)->priv) < 0) {
6587 IPW_DEBUG_INFO("%s: key setting failed\n", dev->name);
6588 param->u.crypt.err = IPW_CRYPT_ERR_KEY_SET_FAILED;
6589 ret = -EINVAL;
6590 goto done;
6591 }
6592
6593 skip_host_crypt:
6594 if (param->u.crypt.set_tx) {
6595 ieee->tx_keyidx = param->u.crypt.idx;
6596 sec.active_key = param->u.crypt.idx;
6597 sec.flags |= SEC_ACTIVE_KEY;
6598 } else
6599 sec.flags &= ~SEC_ACTIVE_KEY;
6600
6601 if (param->u.crypt.alg != NULL) {
6602 memcpy(sec.keys[param->u.crypt.idx],
6603 param->u.crypt.key, param->u.crypt.key_len);
6604 sec.key_sizes[param->u.crypt.idx] = param->u.crypt.key_len;
6605 sec.flags |= (1 << param->u.crypt.idx);
6606
6607 if (strcmp(param->u.crypt.alg, "WEP") == 0) {
6608 sec.flags |= SEC_LEVEL;
6609 sec.level = SEC_LEVEL_1;
6610 } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) {
6611 sec.flags |= SEC_LEVEL;
6612 sec.level = SEC_LEVEL_2;
6613 } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) {
6614 sec.flags |= SEC_LEVEL;
6615 sec.level = SEC_LEVEL_3;
6616 }
6617 /* Don't set sec level for group keys. */
6618 if (group_key)
6619 sec.flags &= ~SEC_LEVEL;
6620 }
6621 done:
6622 if (ieee->set_security)
6623 ieee->set_security(ieee->dev, &sec);
6624
6625 /* Do not reset port if card is in Managed mode since resetting will
6626 * generate new IEEE 802.11 authentication which may end up in looping
6627 * with IEEE 802.1X. If your hardware requires a reset after WEP
6628 * configuration (for example... Prism2), implement the reset_port in
6629 * the callbacks structures used to initialize the 802.11 stack. */
6630 if (ieee->reset_on_keychange &&
6631 ieee->iw_mode != IW_MODE_INFRA &&
6632 ieee->reset_port && ieee->reset_port(dev)) {
6633 IPW_DEBUG_INFO("%s: reset_port failed\n", dev->name);
6634 param->u.crypt.err = IPW_CRYPT_ERR_CARD_CONF_FAILED;
6635 return -EINVAL;
6636 }
6637
6638 return ret;
6639}
6640
6641static int ipw_wpa_supplicant(struct net_device *dev, struct iw_point *p)
6642{
6643 struct ipw_param *param;
6644 struct ipw_priv *priv = ieee80211_priv(dev);
6645 int ret = 0;
6646
6647 IPW_DEBUG_INFO("wpa_supplicant: len=%d\n", p->length);
6648
6649 if (p->length < sizeof(struct ipw_param) || !p->pointer)
6650 return -EINVAL;
6651
6652 param = (struct ipw_param *)kmalloc(p->length, GFP_KERNEL);
6653 if (param == NULL)
6654 return -ENOMEM;
6655
6656 if (copy_from_user(param, p->pointer, p->length)) {
6657 kfree(param);
6658 return -EFAULT;
6659 }
6660
6661 down(&priv->sem);
6662 switch (param->cmd) {
6663
6664 case IPW_CMD_SET_WPA_PARAM:
6665 ret = ipw_wpa_set_param(dev, param->u.wpa_param.name,
6666 param->u.wpa_param.value);
6667 break;
6668
6669 case IPW_CMD_SET_WPA_IE:
6670 ret = ipw_wpa_set_wpa_ie(dev, param, p->length);
6671 break;
6672
6673 case IPW_CMD_SET_ENCRYPTION:
6674 ret = ipw_wpa_set_encryption(dev, param, p->length);
6675 break;
6676
6677 case IPW_CMD_MLME:
6678 ret = ipw_wpa_mlme(dev, param->u.mlme.command,
6679 param->u.mlme.reason_code);
6680 break;
6681
6682 default:
6683 IPW_ERROR("%s: Unknown WPA supplicant request: %d\n",
6684 dev->name, param->cmd);
6685 ret = -EOPNOTSUPP;
6686 }
6687
6688 up(&priv->sem);
6689 if (ret == 0 && copy_to_user(p->pointer, param, p->length))
6690 ret = -EFAULT;
6691
6692 kfree(param);
6693 return ret;
6694}
6695#else
6696/* 6217/*
6697 * WE-18 support 6218 * WE-18 support
6698 */ 6219 */
@@ -7021,7 +6542,6 @@ static int ipw_wx_set_mlme(struct net_device *dev,
7021 } 6542 }
7022 return 0; 6543 return 0;
7023} 6544}
7024#endif
7025 6545
7026#ifdef CONFIG_IPW_QOS 6546#ifdef CONFIG_IPW_QOS
7027 6547
@@ -9391,7 +8911,6 @@ static int ipw_wx_get_retry(struct net_device *dev,
9391 return 0; 8911 return 0;
9392} 8912}
9393 8913
9394#if WIRELESS_EXT > 17
9395static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid, 8914static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
9396 int essid_len) 8915 int essid_len)
9397{ 8916{
@@ -9455,14 +8974,12 @@ static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
9455 up(&priv->sem); 8974 up(&priv->sem);
9456 return err; 8975 return err;
9457} 8976}
9458#endif /* WIRELESS_EXT > 17 */
9459 8977
9460static int ipw_wx_set_scan(struct net_device *dev, 8978static int ipw_wx_set_scan(struct net_device *dev,
9461 struct iw_request_info *info, 8979 struct iw_request_info *info,
9462 union iwreq_data *wrqu, char *extra) 8980 union iwreq_data *wrqu, char *extra)
9463{ 8981{
9464 struct ipw_priv *priv = ieee80211_priv(dev); 8982 struct ipw_priv *priv = ieee80211_priv(dev);
9465#if WIRELESS_EXT > 17
9466 struct iw_scan_req *req = NULL; 8983 struct iw_scan_req *req = NULL;
9467 if (wrqu->data.length 8984 if (wrqu->data.length
9468 && wrqu->data.length == sizeof(struct iw_scan_req)) { 8985 && wrqu->data.length == sizeof(struct iw_scan_req)) {
@@ -9473,7 +8990,7 @@ static int ipw_wx_set_scan(struct net_device *dev,
9473 return 0; 8990 return 0;
9474 } 8991 }
9475 } 8992 }
9476#endif 8993
9477 IPW_DEBUG_WX("Start scan\n"); 8994 IPW_DEBUG_WX("Start scan\n");
9478 8995
9479 queue_work(priv->workqueue, &priv->request_scan); 8996 queue_work(priv->workqueue, &priv->request_scan);
@@ -9923,7 +9440,6 @@ static iw_handler ipw_wx_handlers[] = {
9923 IW_IOCTL(SIOCGIWSPY) = iw_handler_get_spy, 9440 IW_IOCTL(SIOCGIWSPY) = iw_handler_get_spy,
9924 IW_IOCTL(SIOCSIWTHRSPY) = iw_handler_set_thrspy, 9441 IW_IOCTL(SIOCSIWTHRSPY) = iw_handler_set_thrspy,
9925 IW_IOCTL(SIOCGIWTHRSPY) = iw_handler_get_thrspy, 9442 IW_IOCTL(SIOCGIWTHRSPY) = iw_handler_get_thrspy,
9926#if WIRELESS_EXT > 17
9927 IW_IOCTL(SIOCSIWGENIE) = ipw_wx_set_genie, 9443 IW_IOCTL(SIOCSIWGENIE) = ipw_wx_set_genie,
9928 IW_IOCTL(SIOCGIWGENIE) = ipw_wx_get_genie, 9444 IW_IOCTL(SIOCGIWGENIE) = ipw_wx_get_genie,
9929 IW_IOCTL(SIOCSIWMLME) = ipw_wx_set_mlme, 9445 IW_IOCTL(SIOCSIWMLME) = ipw_wx_set_mlme,
@@ -9931,7 +9447,6 @@ static iw_handler ipw_wx_handlers[] = {
9931 IW_IOCTL(SIOCGIWAUTH) = ipw_wx_get_auth, 9447 IW_IOCTL(SIOCGIWAUTH) = ipw_wx_get_auth,
9932 IW_IOCTL(SIOCSIWENCODEEXT) = ipw_wx_set_encodeext, 9448 IW_IOCTL(SIOCSIWENCODEEXT) = ipw_wx_set_encodeext,
9933 IW_IOCTL(SIOCGIWENCODEEXT) = ipw_wx_get_encodeext, 9449 IW_IOCTL(SIOCGIWENCODEEXT) = ipw_wx_get_encodeext,
9934#endif
9935}; 9450};
9936 9451
9937enum { 9452enum {
@@ -11317,24 +10832,6 @@ static void ipw_bg_down(void *data)
11317 up(&priv->sem); 10832 up(&priv->sem);
11318} 10833}
11319 10834
11320#if WIRELESS_EXT < 18
11321static int ipw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
11322{
11323 struct iwreq *wrq = (struct iwreq *)rq;
11324 int ret = -1;
11325 switch (cmd) {
11326 case IPW_IOCTL_WPA_SUPPLICANT:
11327 ret = ipw_wpa_supplicant(dev, &wrq->u.data);
11328 return ret;
11329
11330 default:
11331 return -EOPNOTSUPP;
11332 }
11333
11334 return -EOPNOTSUPP;
11335}
11336#endif
11337
11338/* Called by register_netdev() */ 10835/* Called by register_netdev() */
11339static int ipw_net_init(struct net_device *dev) 10836static int ipw_net_init(struct net_device *dev)
11340{ 10837{
@@ -11512,9 +11009,6 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11512 net_dev->open = ipw_net_open; 11009 net_dev->open = ipw_net_open;
11513 net_dev->stop = ipw_net_stop; 11010 net_dev->stop = ipw_net_stop;
11514 net_dev->init = ipw_net_init; 11011 net_dev->init = ipw_net_init;
11515#if WIRELESS_EXT < 18
11516 net_dev->do_ioctl = ipw_ioctl;
11517#endif
11518 net_dev->get_stats = ipw_net_get_stats; 11012 net_dev->get_stats = ipw_net_get_stats;
11519 net_dev->set_multicast_list = ipw_net_set_multicast_list; 11013 net_dev->set_multicast_list = ipw_net_set_multicast_list;
11520 net_dev->set_mac_address = ipw_net_set_mac_address; 11014 net_dev->set_mac_address = ipw_net_set_mac_address;