Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290677
b: refs/heads/master
c: 4a98677
h: refs/heads/master
i:
  290675: 1192a61
v: v3
  • Loading branch information
Don Fry authored and Wey-Yi Guy committed Feb 17, 2012
1 parent ca21c1a commit 834ded4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 30 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: 06e03f8ce91b71c6ce4134c8bf9ed801aed0382c
refs/heads/master: 4a986777a53d5fe8fd92ef30e0e8eedd0ff800b1
8 changes: 2 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@

#include "iwl-dev.h"

struct iwlagn_ucode_capabilities {
u32 max_probe_length;
u32 standard_phy_calibration_size;
u32 flags;
};
struct iwl_ucode_capabilities;

extern struct ieee80211_ops iwlagn_hw_ops;

Expand All @@ -88,7 +84,7 @@ void iwlagn_prepare_restart(struct iwl_priv *priv);
/* MAC80211 */
struct ieee80211_hw *iwl_alloc_all(void);
int iwlagn_mac_setup_register(struct iwl_priv *priv,
struct iwlagn_ucode_capabilities *capa);
struct iwl_ucode_capabilities *capa);
void iwlagn_mac_unregister(struct iwl_priv *priv);

/* RXON */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ iwlagn_iface_combinations_p2p[] = {
* other mac80211 functions grouped here.
*/
int iwlagn_mac_setup_register(struct iwl_priv *priv,
struct iwlagn_ucode_capabilities *capa)
struct iwl_ucode_capabilities *capa)
{
int ret;
struct ieee80211_hw *hw = priv->hw;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@ enum iwl_trans_state {
* Set during transport allocation.
* @hw_id_str: a string with info about HW ID. Set during transport allocation.
* @ucode_write_complete: indicates that the ucode has been copied.
* @ucode_rt: run time ucode image
* @ucode_init: init ucode image
* @ucode_wowlan: wake on wireless ucode image (optional)
* @nvm_device_type: indicates OTP or eeprom
* @pm_support: set to true in start_hw if link pm is supported
* @calib_results: list head for init calibration results
Expand Down
38 changes: 19 additions & 19 deletions trunk/drivers/net/wireless/iwlwifi/iwl-ucode.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ static int iwl_parse_v1_v2_firmware(struct iwl_nic *nic,
static int iwl_parse_tlv_firmware(struct iwl_nic *nic,
const struct firmware *ucode_raw,
struct iwlagn_firmware_pieces *pieces,
struct iwlagn_ucode_capabilities *capa)
struct iwl_ucode_capabilities *capa)
{
struct iwl_tlv_ucode_header *ucode = (void *)ucode_raw->data;
struct iwl_ucode_tlv *tlv;
Expand Down Expand Up @@ -1012,6 +1012,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
{
struct iwl_nic *nic = context;
struct iwl_cfg *cfg = cfg(nic);
struct iwl_fw *fw = &nic->fw;
struct iwl_priv *priv = priv(nic); /* temporary */
struct iwl_ucode_header *ucode;
int err;
Expand All @@ -1022,11 +1023,10 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
u32 api_ver;
char buildstr[25];
u32 build;
struct iwlagn_ucode_capabilities ucode_capa = {
.max_probe_length = 200,
.standard_phy_calibration_size =
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE,
};

fw->ucode_capa.max_probe_length = 200;
fw->ucode_capa.standard_phy_calibration_size =
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;

if (!api_ok)
api_ok = api_max;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
err = iwl_parse_v1_v2_firmware(nic, ucode_raw, &pieces);
else
err = iwl_parse_tlv_firmware(nic, ucode_raw, &pieces,
&ucode_capa);
&fw->ucode_capa);

if (err)
goto try_again;
Expand Down Expand Up @@ -1219,23 +1219,23 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
cfg->base_params->max_event_log_size;
nic->inst_errlog_ptr = pieces.inst_errlog_ptr;
#ifndef CONFIG_IWLWIFI_P2P
ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
#endif

priv->new_scan_threshold_behaviour =
!!(ucode_capa.flags & IWL_UCODE_TLV_FLAGS_NEWSCAN);
!!(fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_NEWSCAN);

if (!(cfg->sku & EEPROM_SKU_CAP_IPAN_ENABLE))
ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;

/*
* if not PAN, then don't support P2P -- might be a uCode
* packaging bug or due to the eeprom check above
*/
if (!(ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN))
ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
if (!(fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN))
fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_P2P;

if (ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN) {
if (fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN) {
priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN;
nic->shrd->cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
} else {
Expand All @@ -1246,25 +1246,25 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
* figure out the offset of chain noise reset and gain commands
* base on the size of standard phy calibration commands table size
*/
if (ucode_capa.standard_phy_calibration_size >
if (fw->ucode_capa.standard_phy_calibration_size >
IWL_MAX_PHY_CALIBRATE_TBL_SIZE)
ucode_capa.standard_phy_calibration_size =
fw->ucode_capa.standard_phy_calibration_size =
IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE;

priv->phy_calib_chain_noise_reset_cmd =
ucode_capa.standard_phy_calibration_size;
fw->ucode_capa.standard_phy_calibration_size;
priv->phy_calib_chain_noise_gain_cmd =
ucode_capa.standard_phy_calibration_size + 1;
fw->ucode_capa.standard_phy_calibration_size + 1;

/* initialize all valid contexts */
iwl_init_context(priv, ucode_capa.flags);
iwl_init_context(priv, fw->ucode_capa.flags);

/**************************************************
* This is still part of probe() in a sense...
*
* 9. Setup and register with mac80211 and debugfs
**************************************************/
err = iwlagn_mac_setup_register(priv, &ucode_capa);
err = iwlagn_mac_setup_register(priv, &fw->ucode_capa);
if (err)
goto out_unbind;

Expand Down

0 comments on commit 834ded4

Please sign in to comment.