diff options
Diffstat (limited to 'drivers/net/wireless/orinoco/hw.c')
| -rw-r--r-- | drivers/net/wireless/orinoco/hw.c | 56 | 
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index b4772c1c613..e27e32851f1 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c @@ -47,7 +47,7 @@ struct comp_id {  	u16 id, variant, major, minor;  } __packed; -static inline fwtype_t determine_firmware_type(struct comp_id *nic_id) +static inline enum fwtype determine_firmware_type(struct comp_id *nic_id)  {  	if (nic_id->id < 0x8000)  		return FIRMWARE_TYPE_AGERE; @@ -71,11 +71,11 @@ int determine_fw_capabilities(struct orinoco_private *priv,  			      u32 *hw_ver)  {  	struct device *dev = priv->dev; -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err;  	struct comp_id nic_id, sta_id;  	unsigned int firmver; -	char tmp[SYMBOL_MAX_VER_LEN+1] __attribute__((aligned(2))); +	char tmp[SYMBOL_MAX_VER_LEN + 1] __attribute__((aligned(2)));  	/* Get the hardware version */  	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)  {  	struct device *dev = priv->dev;  	struct hermes_idstring nickbuf; -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int len;  	int err;  	u16 reclen; @@ -458,7 +458,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)  {  	struct net_device *dev = priv->ndev;  	struct wireless_dev *wdev = netdev_priv(dev); -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err;  	struct hermes_idstring idbuf; @@ -529,7 +529,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)  	memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val));  	/* WinXP wants partner to configure OWNSSID even in IBSS mode. (jimc) */  	err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNSSID, -			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), +			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),  			&idbuf);  	if (err) {  		printk(KERN_ERR "%s: Error %d setting OWNSSID\n", @@ -537,7 +537,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)  		return err;  	}  	err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID, -			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), +			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),  			&idbuf);  	if (err) {  		printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n", @@ -549,7 +549,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)  	idbuf.len = cpu_to_le16(strlen(priv->nick));  	memcpy(&idbuf.val, priv->nick, sizeof(idbuf.val));  	err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME, -				 HERMES_BYTES_TO_RECLEN(strlen(priv->nick)+2), +				 HERMES_BYTES_TO_RECLEN(strlen(priv->nick) + 2),  				 &idbuf);  	if (err) {  		printk(KERN_ERR "%s: Error %d setting nickname\n", @@ -689,7 +689,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)  /* Get tsc from the firmware */  int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	u8 tsc_arr[4][ORINOCO_SEQ_LEN]; @@ -706,7 +706,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)  int __orinoco_hw_set_bitrate(struct orinoco_private *priv)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int ratemode = priv->bitratemode;  	int err = 0; @@ -737,7 +737,7 @@ int __orinoco_hw_set_bitrate(struct orinoco_private *priv)  int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int i;  	int err = 0;  	u16 val; @@ -786,7 +786,7 @@ int __orinoco_hw_set_wap(struct orinoco_private *priv)  {  	int roaming_flag;  	int err = 0; -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	switch (priv->firmware_type) {  	case FIRMWARE_TYPE_AGERE: @@ -818,7 +818,7 @@ int __orinoco_hw_set_wap(struct orinoco_private *priv)   * which is needed for 802.1x implementations. */  int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	int i; @@ -902,7 +902,7 @@ int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)  int __orinoco_hw_setup_enc(struct orinoco_private *priv)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	int master_wep_flag;  	int auth_flag; @@ -988,8 +988,8 @@ int __orinoco_hw_setup_enc(struct orinoco_private *priv)   * tsc must be NULL or up to 8 bytes   */  int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx, -			      int set_tx, u8 *key, u8 *rsc, size_t rsc_len, -			      u8 *tsc, size_t tsc_len) +			      int set_tx, const u8 *key, const u8 *rsc, +			      size_t rsc_len, const u8 *tsc, size_t tsc_len)  {  	struct {  		__le16 idx; @@ -999,7 +999,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,  		u8 rx_mic[MIC_KEYLEN];  		u8 tsc[ORINOCO_SEQ_LEN];  	} __packed buf; -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int ret;  	int err;  	int k; @@ -1031,7 +1031,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,  	else  		buf.tsc[4] = 0x10; -	/* Wait upto 100ms for tx queue to empty */ +	/* Wait up to 100ms for tx queue to empty */  	for (k = 100; k > 0; k--) {  		udelay(1000);  		ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, @@ -1052,7 +1052,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,  int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err;  	err = hermes_write_wordrec(hw, USER_BAP, @@ -1068,7 +1068,7 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,  				    struct net_device *dev,  				    int mc_count, int promisc)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	if (promisc != priv->promiscuous) { @@ -1111,9 +1111,9 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,  /* Return : < 0 -> error code ; >= 0 -> length */  int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, -			 char buf[IW_ESSID_MAX_SIZE+1]) +			 char buf[IW_ESSID_MAX_SIZE + 1])  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	struct hermes_idstring essidbuf;  	char *p = (char *)(&essidbuf.val); @@ -1166,7 +1166,7 @@ int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,  int orinoco_hw_get_freq(struct orinoco_private *priv)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err = 0;  	u16 channel;  	int freq = 0; @@ -1193,7 +1193,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv)  		goto out;  	} -	freq = ieee80211_dsss_chan_to_freq(channel); +	freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);   out:  	orinoco_unlock(priv, &flags); @@ -1206,7 +1206,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv)  int orinoco_hw_get_bitratelist(struct orinoco_private *priv,  			       int *numrates, s32 *rates, int max)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	struct hermes_idstring list;  	unsigned char *p = (unsigned char *)&list.val;  	int err = 0; @@ -1238,7 +1238,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv,  			    const struct cfg80211_ssid *ssid)  {  	struct net_device *dev = priv->ndev; -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	unsigned long flags;  	int err = 0; @@ -1323,7 +1323,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv,  int orinoco_hw_disassociate(struct orinoco_private *priv,  			    u8 *addr, u16 reason_code)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err;  	struct { @@ -1346,7 +1346,7 @@ int orinoco_hw_disassociate(struct orinoco_private *priv,  int orinoco_hw_get_current_bssid(struct orinoco_private *priv,  				 u8 *addr)  { -	hermes_t *hw = &priv->hw; +	struct hermes *hw = &priv->hw;  	int err;  	err = hw->ops->read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID,  | 
