Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203790
b: refs/heads/master
c: c6fa17e
h: refs/heads/master
v: v3
  • Loading branch information
Wey-Yi Guy committed Jul 23, 2010
1 parent 4ea51c2 commit 456a305
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bc5774f4e1df0204e68bfcd84e122d430dcf35c
refs/heads/master: c6fa17ed3fadaf056173c409c0877df428a152ec
17 changes: 12 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3932,8 +3932,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct ieee80211_hw *hw;
struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
unsigned long flags;
u16 pci_cmd;
u8 perm_addr[ETH_ALEN];
u16 pci_cmd, num_mac;

/************************
* 1. Allocating HW data
Expand Down Expand Up @@ -4051,9 +4050,17 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out_free_eeprom;

/* extract MAC Address */
iwl_eeprom_get_mac(priv, perm_addr);
IWL_DEBUG_INFO(priv, "MAC address: %pM\n", perm_addr);
SET_IEEE80211_PERM_ADDR(priv->hw, perm_addr);
iwl_eeprom_get_mac(priv, priv->addresses[0].addr);
IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->addresses[0].addr);
priv->hw->wiphy->addresses = priv->addresses;
priv->hw->wiphy->n_addresses = 1;
num_mac = iwl_eeprom_query16(priv, EEPROM_NUM_MAC_ADDRESS);
if (num_mac > 1) {
memcpy(priv->addresses[1].addr, priv->addresses[0].addr,
ETH_ALEN);
priv->addresses[1].addr[5]++;
priv->hw->wiphy->n_addresses++;
}

/************************
* 5. Setup HW constants
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@ struct iwl_priv {
u32 hw_wa_rev;
u8 rev_id;

/* EEPROM MAC addresses */
struct mac_address addresses[2];

/* uCode images, save to reload in case of failure */
int fw_index; /* firmware we're trying to load */
u32 ucode_ver; /* version of ucode, copy of
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ struct iwl_eeprom_calib_info {
#define EEPROM_WOWLAN_MODE (2*0x47) /* 2 bytes */
#define EEPROM_RADIO_CONFIG (2*0x48) /* 2 bytes */
#define EEPROM_3945_M_VERSION (2*0x4A) /* 1 bytes */
#define EEPROM_NUM_MAC_ADDRESS (2*0x4C) /* 2 bytes */

/* The following masks are to be applied on EEPROM_RADIO_CONFIG */
#define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */
Expand Down

0 comments on commit 456a305

Please sign in to comment.