diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-14 01:01:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-14 01:01:12 -0500 |
commit | 076ce4482569ea1a2c27b4ca71a309adaf91d398 (patch) | |
tree | 2ae9e42612f35be897f190983fc292d7af781cd2 /drivers/net/wireless | |
parent | d649a7a81f3b5bacb1d60abd7529894d8234a666 (diff) | |
parent | b23dc5a7cc6ebc9a0d57351da7a0e8454c9ffea3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
sge.c was overlapping two changes, one to use the new
__dev_alloc_page() in net-next, and one to use s->fl_pg_order in net.
ixgbe_phy.c was a set of overlapping whitespace changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 4 |
6 files changed, 27 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c index e0d9f19650b0..eb03943f8463 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c | |||
@@ -284,7 +284,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | |||
284 | 284 | ||
285 | lockdep_assert_held(&mvm->mutex); | 285 | lockdep_assert_held(&mvm->mutex); |
286 | 286 | ||
287 | if (WARN_ON_ONCE(mvm->init_ucode_complete)) | 287 | if (WARN_ON_ONCE(mvm->init_ucode_complete || mvm->calibrating)) |
288 | return 0; | 288 | return 0; |
289 | 289 | ||
290 | iwl_init_notification_wait(&mvm->notif_wait, | 290 | iwl_init_notification_wait(&mvm->notif_wait, |
@@ -334,6 +334,8 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | |||
334 | goto out; | 334 | goto out; |
335 | } | 335 | } |
336 | 336 | ||
337 | mvm->calibrating = true; | ||
338 | |||
337 | /* Send TX valid antennas before triggering calibrations */ | 339 | /* Send TX valid antennas before triggering calibrations */ |
338 | ret = iwl_send_tx_ant_cfg(mvm, mvm->fw->valid_tx_ant); | 340 | ret = iwl_send_tx_ant_cfg(mvm, mvm->fw->valid_tx_ant); |
339 | if (ret) | 341 | if (ret) |
@@ -358,11 +360,17 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) | |||
358 | MVM_UCODE_CALIB_TIMEOUT); | 360 | MVM_UCODE_CALIB_TIMEOUT); |
359 | if (!ret) | 361 | if (!ret) |
360 | mvm->init_ucode_complete = true; | 362 | mvm->init_ucode_complete = true; |
363 | |||
364 | if (ret && iwl_mvm_is_radio_killed(mvm)) { | ||
365 | IWL_DEBUG_RF_KILL(mvm, "RFKILL while calibrating.\n"); | ||
366 | ret = 1; | ||
367 | } | ||
361 | goto out; | 368 | goto out; |
362 | 369 | ||
363 | error: | 370 | error: |
364 | iwl_remove_notification(&mvm->notif_wait, &calib_wait); | 371 | iwl_remove_notification(&mvm->notif_wait, &calib_wait); |
365 | out: | 372 | out: |
373 | mvm->calibrating = false; | ||
366 | if (iwlmvm_mod_params.init_dbg && !mvm->nvm_data) { | 374 | if (iwlmvm_mod_params.init_dbg && !mvm->nvm_data) { |
367 | /* we want to debug INIT and we have no NVM - fake */ | 375 | /* we want to debug INIT and we have no NVM - fake */ |
368 | mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + | 376 | mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index f308e52781f6..57325589ee5b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -825,6 +825,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) | |||
825 | 825 | ||
826 | mvm->scan_status = IWL_MVM_SCAN_NONE; | 826 | mvm->scan_status = IWL_MVM_SCAN_NONE; |
827 | mvm->ps_disabled = false; | 827 | mvm->ps_disabled = false; |
828 | mvm->calibrating = false; | ||
828 | 829 | ||
829 | /* just in case one was running */ | 830 | /* just in case one was running */ |
830 | ieee80211_remain_on_channel_expired(mvm->hw); | 831 | ieee80211_remain_on_channel_expired(mvm->hw); |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 256765accbc6..d015fac06a62 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -548,6 +548,7 @@ struct iwl_mvm { | |||
548 | enum iwl_ucode_type cur_ucode; | 548 | enum iwl_ucode_type cur_ucode; |
549 | bool ucode_loaded; | 549 | bool ucode_loaded; |
550 | bool init_ucode_complete; | 550 | bool init_ucode_complete; |
551 | bool calibrating; | ||
551 | u32 error_event_table; | 552 | u32 error_event_table; |
552 | u32 log_event_table; | 553 | u32 log_event_table; |
553 | u32 umac_error_event_table; | 554 | u32 umac_error_event_table; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index bd52ecfabedb..7a9578567f4f 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -427,6 +427,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
427 | } | 427 | } |
428 | mvm->sf_state = SF_UNINIT; | 428 | mvm->sf_state = SF_UNINIT; |
429 | mvm->low_latency_agg_frame_limit = 6; | 429 | mvm->low_latency_agg_frame_limit = 6; |
430 | mvm->cur_ucode = IWL_UCODE_INIT; | ||
430 | 431 | ||
431 | mutex_init(&mvm->mutex); | 432 | mutex_init(&mvm->mutex); |
432 | mutex_init(&mvm->d0i3_suspend_mutex); | 433 | mutex_init(&mvm->d0i3_suspend_mutex); |
@@ -757,6 +758,7 @@ void iwl_mvm_set_hw_ctkill_state(struct iwl_mvm *mvm, bool state) | |||
757 | static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | 758 | static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) |
758 | { | 759 | { |
759 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); | 760 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); |
761 | bool calibrating = ACCESS_ONCE(mvm->calibrating); | ||
760 | 762 | ||
761 | if (state) | 763 | if (state) |
762 | set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); | 764 | set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); |
@@ -765,7 +767,15 @@ static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | |||
765 | 767 | ||
766 | wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); | 768 | wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); |
767 | 769 | ||
768 | return state && mvm->cur_ucode != IWL_UCODE_INIT; | 770 | /* iwl_run_init_mvm_ucode is waiting for results, abort it */ |
771 | if (calibrating) | ||
772 | iwl_abort_notification_waits(&mvm->notif_wait); | ||
773 | |||
774 | /* | ||
775 | * Stop the device if we run OPERATIONAL firmware or if we are in the | ||
776 | * middle of the calibrations. | ||
777 | */ | ||
778 | return state && (mvm->cur_ucode != IWL_UCODE_INIT || calibrating); | ||
769 | } | 779 | } |
770 | 780 | ||
771 | static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) | 781 | static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 40a290603ead..836725e92687 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -913,7 +913,8 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) | |||
913 | * restart. So don't process again if the device is | 913 | * restart. So don't process again if the device is |
914 | * already dead. | 914 | * already dead. |
915 | */ | 915 | */ |
916 | if (test_bit(STATUS_DEVICE_ENABLED, &trans->status)) { | 916 | if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) { |
917 | IWL_DEBUG_INFO(trans, "DEVICE_ENABLED bit was set and is now cleared\n"); | ||
917 | iwl_pcie_tx_stop(trans); | 918 | iwl_pcie_tx_stop(trans); |
918 | iwl_pcie_rx_stop(trans); | 919 | iwl_pcie_rx_stop(trans); |
919 | 920 | ||
@@ -943,7 +944,6 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) | |||
943 | /* clear all status bits */ | 944 | /* clear all status bits */ |
944 | clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); | 945 | clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); |
945 | clear_bit(STATUS_INT_ENABLED, &trans->status); | 946 | clear_bit(STATUS_INT_ENABLED, &trans->status); |
946 | clear_bit(STATUS_DEVICE_ENABLED, &trans->status); | ||
947 | clear_bit(STATUS_TPOWER_PMI, &trans->status); | 947 | clear_bit(STATUS_TPOWER_PMI, &trans->status); |
948 | clear_bit(STATUS_RFKILL, &trans->status); | 948 | clear_bit(STATUS_RFKILL, &trans->status); |
949 | 949 | ||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 209db62ee627..77fbf3035038 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2191,7 +2191,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
2191 | if (err != 0) { | 2191 | if (err != 0) { |
2192 | printk(KERN_DEBUG "mac80211_hwsim: device_bind_driver failed (%d)\n", | 2192 | printk(KERN_DEBUG "mac80211_hwsim: device_bind_driver failed (%d)\n", |
2193 | err); | 2193 | err); |
2194 | goto failed_hw; | 2194 | goto failed_bind; |
2195 | } | 2195 | } |
2196 | 2196 | ||
2197 | skb_queue_head_init(&data->pending); | 2197 | skb_queue_head_init(&data->pending); |
@@ -2397,6 +2397,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
2397 | return idx; | 2397 | return idx; |
2398 | 2398 | ||
2399 | failed_hw: | 2399 | failed_hw: |
2400 | device_release_driver(data->dev); | ||
2401 | failed_bind: | ||
2400 | device_unregister(data->dev); | 2402 | device_unregister(data->dev); |
2401 | failed_drvdata: | 2403 | failed_drvdata: |
2402 | ieee80211_free_hw(hw); | 2404 | ieee80211_free_hw(hw); |