Skip to content

Commit

Permalink
iwmc3200wifi: Dont set the UMAC power limit when interface is down
Browse files Browse the repository at this point in the history
When we're down, we shouldnt try to set the UMAC power limit. We just return 0
instead, and cfg80211 toggles the soft rfkill state.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Nov 28, 2009
1 parent 902b666 commit fe19176
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/iwmc3200wifi/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,13 +678,17 @@ static int iwm_cfg80211_set_txpower(struct wiphy *wiphy,
case TX_POWER_AUTOMATIC:
return 0;
case TX_POWER_FIXED:
if (!test_bit(IWM_STATUS_READY, &iwm->status))
return 0;

ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_TX_PWR_LIMIT_USR, dbm * 2);
if (ret < 0)
return ret;

return iwm_tx_power_trigger(iwm);
default:
IWM_ERR(iwm, "Unsupported power type: %d\n", type);
return -EOPNOTSUPP;
}

Expand Down

0 comments on commit fe19176

Please sign in to comment.