aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco/hw.c')
-rw-r--r--drivers/net/wireless/orinoco/hw.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c
index 3c7877a7c31c..c09c8437c0b8 100644
--- a/drivers/net/wireless/orinoco/hw.c
+++ b/drivers/net/wireless/orinoco/hw.c
@@ -47,7 +47,7 @@ struct comp_id {
47 u16 id, variant, major, minor; 47 u16 id, variant, major, minor;
48} __packed; 48} __packed;
49 49
50static inline fwtype_t determine_firmware_type(struct comp_id *nic_id) 50static inline enum fwtype determine_firmware_type(struct comp_id *nic_id)
51{ 51{
52 if (nic_id->id < 0x8000) 52 if (nic_id->id < 0x8000)
53 return FIRMWARE_TYPE_AGERE; 53 return FIRMWARE_TYPE_AGERE;
@@ -71,11 +71,11 @@ int determine_fw_capabilities(struct orinoco_private *priv,
71 u32 *hw_ver) 71 u32 *hw_ver)
72{ 72{
73 struct device *dev = priv->dev; 73 struct device *dev = priv->dev;
74 hermes_t *hw = &priv->hw; 74 struct hermes *hw = &priv->hw;
75 int err; 75 int err;
76 struct comp_id nic_id, sta_id; 76 struct comp_id nic_id, sta_id;
77 unsigned int firmver; 77 unsigned int firmver;
78 char tmp[SYMBOL_MAX_VER_LEN+1] __attribute__((aligned(2))); 78 char tmp[SYMBOL_MAX_VER_LEN + 1] __attribute__((aligned(2)));
79 79
80 /* Get the hardware version */ 80 /* Get the hardware version */
81 err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_NICID, &nic_id); 81 err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_NICID, &nic_id);
@@ -280,7 +280,7 @@ int orinoco_hw_read_card_settings(struct orinoco_private *priv, u8 *dev_addr)
280{ 280{
281 struct device *dev = priv->dev; 281 struct device *dev = priv->dev;
282 struct hermes_idstring nickbuf; 282 struct hermes_idstring nickbuf;
283 hermes_t *hw = &priv->hw; 283 struct hermes *hw = &priv->hw;
284 int len; 284 int len;
285 int err; 285 int err;
286 u16 reclen; 286 u16 reclen;
@@ -458,7 +458,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
458{ 458{
459 struct net_device *dev = priv->ndev; 459 struct net_device *dev = priv->ndev;
460 struct wireless_dev *wdev = netdev_priv(dev); 460 struct wireless_dev *wdev = netdev_priv(dev);
461 hermes_t *hw = &priv->hw; 461 struct hermes *hw = &priv->hw;
462 int err; 462 int err;
463 struct hermes_idstring idbuf; 463 struct hermes_idstring idbuf;
464 464
@@ -529,7 +529,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
529 memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val)); 529 memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val));
530 /* WinXP wants partner to configure OWNSSID even in IBSS mode. (jimc) */ 530 /* WinXP wants partner to configure OWNSSID even in IBSS mode. (jimc) */
531 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNSSID, 531 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNSSID,
532 HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), 532 HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),
533 &idbuf); 533 &idbuf);
534 if (err) { 534 if (err) {
535 printk(KERN_ERR "%s: Error %d setting OWNSSID\n", 535 printk(KERN_ERR "%s: Error %d setting OWNSSID\n",
@@ -537,7 +537,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
537 return err; 537 return err;
538 } 538 }
539 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID, 539 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID,
540 HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), 540 HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),
541 &idbuf); 541 &idbuf);
542 if (err) { 542 if (err) {
543 printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n", 543 printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n",
@@ -549,7 +549,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
549 idbuf.len = cpu_to_le16(strlen(priv->nick)); 549 idbuf.len = cpu_to_le16(strlen(priv->nick));
550 memcpy(&idbuf.val, priv->nick, sizeof(idbuf.val)); 550 memcpy(&idbuf.val, priv->nick, sizeof(idbuf.val));
551 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME, 551 err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME,
552 HERMES_BYTES_TO_RECLEN(strlen(priv->nick)+2), 552 HERMES_BYTES_TO_RECLEN(strlen(priv->nick) + 2),
553 &idbuf); 553 &idbuf);
554 if (err) { 554 if (err) {
555 printk(KERN_ERR "%s: Error %d setting nickname\n", 555 printk(KERN_ERR "%s: Error %d setting nickname\n",
@@ -689,7 +689,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
689/* Get tsc from the firmware */ 689/* Get tsc from the firmware */
690int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc) 690int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
691{ 691{
692 hermes_t *hw = &priv->hw; 692 struct hermes *hw = &priv->hw;
693 int err = 0; 693 int err = 0;
694 u8 tsc_arr[4][ORINOCO_SEQ_LEN]; 694 u8 tsc_arr[4][ORINOCO_SEQ_LEN];
695 695
@@ -706,7 +706,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
706 706
707int __orinoco_hw_set_bitrate(struct orinoco_private *priv) 707int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
708{ 708{
709 hermes_t *hw = &priv->hw; 709 struct hermes *hw = &priv->hw;
710 int ratemode = priv->bitratemode; 710 int ratemode = priv->bitratemode;
711 int err = 0; 711 int err = 0;
712 712
@@ -737,7 +737,7 @@ int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
737 737
738int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate) 738int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate)
739{ 739{
740 hermes_t *hw = &priv->hw; 740 struct hermes *hw = &priv->hw;
741 int i; 741 int i;
742 int err = 0; 742 int err = 0;
743 u16 val; 743 u16 val;
@@ -786,7 +786,7 @@ int __orinoco_hw_set_wap(struct orinoco_private *priv)
786{ 786{
787 int roaming_flag; 787 int roaming_flag;
788 int err = 0; 788 int err = 0;
789 hermes_t *hw = &priv->hw; 789 struct hermes *hw = &priv->hw;
790 790
791 switch (priv->firmware_type) { 791 switch (priv->firmware_type) {
792 case FIRMWARE_TYPE_AGERE: 792 case FIRMWARE_TYPE_AGERE:
@@ -818,7 +818,7 @@ int __orinoco_hw_set_wap(struct orinoco_private *priv)
818 * which is needed for 802.1x implementations. */ 818 * which is needed for 802.1x implementations. */
819int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv) 819int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
820{ 820{
821 hermes_t *hw = &priv->hw; 821 struct hermes *hw = &priv->hw;
822 int err = 0; 822 int err = 0;
823 int i; 823 int i;
824 824
@@ -902,7 +902,7 @@ int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
902 902
903int __orinoco_hw_setup_enc(struct orinoco_private *priv) 903int __orinoco_hw_setup_enc(struct orinoco_private *priv)
904{ 904{
905 hermes_t *hw = &priv->hw; 905 struct hermes *hw = &priv->hw;
906 int err = 0; 906 int err = 0;
907 int master_wep_flag; 907 int master_wep_flag;
908 int auth_flag; 908 int auth_flag;
@@ -999,7 +999,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
999 u8 rx_mic[MIC_KEYLEN]; 999 u8 rx_mic[MIC_KEYLEN];
1000 u8 tsc[ORINOCO_SEQ_LEN]; 1000 u8 tsc[ORINOCO_SEQ_LEN];
1001 } __packed buf; 1001 } __packed buf;
1002 hermes_t *hw = &priv->hw; 1002 struct hermes *hw = &priv->hw;
1003 int ret; 1003 int ret;
1004 int err; 1004 int err;
1005 int k; 1005 int k;
@@ -1052,7 +1052,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
1052 1052
1053int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx) 1053int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx)
1054{ 1054{
1055 hermes_t *hw = &priv->hw; 1055 struct hermes *hw = &priv->hw;
1056 int err; 1056 int err;
1057 1057
1058 err = hermes_write_wordrec(hw, USER_BAP, 1058 err = hermes_write_wordrec(hw, USER_BAP,
@@ -1068,7 +1068,7 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
1068 struct net_device *dev, 1068 struct net_device *dev,
1069 int mc_count, int promisc) 1069 int mc_count, int promisc)
1070{ 1070{
1071 hermes_t *hw = &priv->hw; 1071 struct hermes *hw = &priv->hw;
1072 int err = 0; 1072 int err = 0;
1073 1073
1074 if (promisc != priv->promiscuous) { 1074 if (promisc != priv->promiscuous) {
@@ -1111,9 +1111,9 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
1111 1111
1112/* Return : < 0 -> error code ; >= 0 -> length */ 1112/* Return : < 0 -> error code ; >= 0 -> length */
1113int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, 1113int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,
1114 char buf[IW_ESSID_MAX_SIZE+1]) 1114 char buf[IW_ESSID_MAX_SIZE + 1])
1115{ 1115{
1116 hermes_t *hw = &priv->hw; 1116 struct hermes *hw = &priv->hw;
1117 int err = 0; 1117 int err = 0;
1118 struct hermes_idstring essidbuf; 1118 struct hermes_idstring essidbuf;
1119 char *p = (char *)(&essidbuf.val); 1119 char *p = (char *)(&essidbuf.val);
@@ -1166,7 +1166,7 @@ int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,
1166 1166
1167int orinoco_hw_get_freq(struct orinoco_private *priv) 1167int orinoco_hw_get_freq(struct orinoco_private *priv)
1168{ 1168{
1169 hermes_t *hw = &priv->hw; 1169 struct hermes *hw = &priv->hw;
1170 int err = 0; 1170 int err = 0;
1171 u16 channel; 1171 u16 channel;
1172 int freq = 0; 1172 int freq = 0;
@@ -1206,7 +1206,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv)
1206int orinoco_hw_get_bitratelist(struct orinoco_private *priv, 1206int orinoco_hw_get_bitratelist(struct orinoco_private *priv,
1207 int *numrates, s32 *rates, int max) 1207 int *numrates, s32 *rates, int max)
1208{ 1208{
1209 hermes_t *hw = &priv->hw; 1209 struct hermes *hw = &priv->hw;
1210 struct hermes_idstring list; 1210 struct hermes_idstring list;
1211 unsigned char *p = (unsigned char *)&list.val; 1211 unsigned char *p = (unsigned char *)&list.val;
1212 int err = 0; 1212 int err = 0;
@@ -1238,7 +1238,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv,
1238 const struct cfg80211_ssid *ssid) 1238 const struct cfg80211_ssid *ssid)
1239{ 1239{
1240 struct net_device *dev = priv->ndev; 1240 struct net_device *dev = priv->ndev;
1241 hermes_t *hw = &priv->hw; 1241 struct hermes *hw = &priv->hw;
1242 unsigned long flags; 1242 unsigned long flags;
1243 int err = 0; 1243 int err = 0;
1244 1244
@@ -1323,7 +1323,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv,
1323int orinoco_hw_disassociate(struct orinoco_private *priv, 1323int orinoco_hw_disassociate(struct orinoco_private *priv,
1324 u8 *addr, u16 reason_code) 1324 u8 *addr, u16 reason_code)
1325{ 1325{
1326 hermes_t *hw = &priv->hw; 1326 struct hermes *hw = &priv->hw;
1327 int err; 1327 int err;
1328 1328
1329 struct { 1329 struct {
@@ -1346,7 +1346,7 @@ int orinoco_hw_disassociate(struct orinoco_private *priv,
1346int orinoco_hw_get_current_bssid(struct orinoco_private *priv, 1346int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
1347 u8 *addr) 1347 u8 *addr)
1348{ 1348{
1349 hermes_t *hw = &priv->hw; 1349 struct hermes *hw = &priv->hw;
1350 int err; 1350 int err;
1351 1351
1352 err = hw->ops->read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, 1352 err = hw->ops->read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID,