diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 18:21:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:46 -0400 |
commit | 5217c571c898371c540e49671600d54346b2e123 (patch) | |
tree | 6a43660fb5669c02a0ba11f7a53404790638c7a3 /drivers/net/wireless/orinoco/hw.c | |
parent | 721aa2f75b00399074eb443fdf16d797b4504a36 (diff) |
orinoco: convert mode setting to cfg80211
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/hw.c')
-rw-r--r-- | drivers/net/wireless/orinoco/hw.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index 56627d91aa7..4600fe4a7e1 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
8 | #include <linux/ieee80211.h> | 8 | #include <linux/ieee80211.h> |
9 | #include <linux/wireless.h> | 9 | #include <linux/wireless.h> |
10 | 10 | #include <net/cfg80211.h> | |
11 | #include "hermes.h" | 11 | #include "hermes.h" |
12 | #include "hermes_rid.h" | 12 | #include "hermes_rid.h" |
13 | #include "orinoco.h" | 13 | #include "orinoco.h" |
@@ -409,6 +409,7 @@ void orinoco_get_ratemode_cfg(int ratemode, int *bitrate, int *automatic) | |||
409 | int orinoco_hw_program_rids(struct orinoco_private *priv) | 409 | int orinoco_hw_program_rids(struct orinoco_private *priv) |
410 | { | 410 | { |
411 | struct net_device *dev = priv->ndev; | 411 | struct net_device *dev = priv->ndev; |
412 | struct wireless_dev *wdev = netdev_priv(dev); | ||
412 | hermes_t *hw = &priv->hw; | 413 | hermes_t *hw = &priv->hw; |
413 | int err; | 414 | int err; |
414 | struct hermes_idstring idbuf; | 415 | struct hermes_idstring idbuf; |
@@ -431,7 +432,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv) | |||
431 | return err; | 432 | return err; |
432 | } | 433 | } |
433 | /* Set the channel/frequency */ | 434 | /* Set the channel/frequency */ |
434 | if (priv->channel != 0 && priv->iw_mode != IW_MODE_INFRA) { | 435 | if (priv->channel != 0 && priv->iw_mode != NL80211_IFTYPE_STATION) { |
435 | err = hermes_write_wordrec(hw, USER_BAP, | 436 | err = hermes_write_wordrec(hw, USER_BAP, |
436 | HERMES_RID_CNFOWNCHANNEL, | 437 | HERMES_RID_CNFOWNCHANNEL, |
437 | priv->channel); | 438 | priv->channel); |
@@ -612,7 +613,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv) | |||
612 | } | 613 | } |
613 | } | 614 | } |
614 | 615 | ||
615 | if (priv->iw_mode == IW_MODE_MONITOR) { | 616 | if (priv->iw_mode == NL80211_IFTYPE_MONITOR) { |
616 | /* Enable monitor mode */ | 617 | /* Enable monitor mode */ |
617 | dev->type = ARPHRD_IEEE80211; | 618 | dev->type = ARPHRD_IEEE80211; |
618 | err = hermes_docmd_wait(hw, HERMES_CMD_TEST | | 619 | err = hermes_docmd_wait(hw, HERMES_CMD_TEST | |
@@ -630,6 +631,9 @@ int orinoco_hw_program_rids(struct orinoco_private *priv) | |||
630 | priv->promiscuous = 0; | 631 | priv->promiscuous = 0; |
631 | priv->mc_count = 0; | 632 | priv->mc_count = 0; |
632 | 633 | ||
634 | /* Record mode change */ | ||
635 | wdev->iftype = priv->iw_mode; | ||
636 | |||
633 | return 0; | 637 | return 0; |
634 | } | 638 | } |
635 | 639 | ||
@@ -884,7 +888,7 @@ int __orinoco_hw_setup_enc(struct orinoco_private *priv) | |||
884 | } else | 888 | } else |
885 | master_wep_flag = 0; | 889 | master_wep_flag = 0; |
886 | 890 | ||
887 | if (priv->iw_mode == IW_MODE_MONITOR) | 891 | if (priv->iw_mode == NL80211_IFTYPE_MONITOR) |
888 | master_wep_flag |= HERMES_WEP_HOST_DECRYPT; | 892 | master_wep_flag |= HERMES_WEP_HOST_DECRYPT; |
889 | 893 | ||
890 | /* Master WEP setting : on/off */ | 894 | /* Master WEP setting : on/off */ |