diff options
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/cfg80211.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c index 2e00a4b389e6..7c4f44a9c3e6 100644 --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c | |||
@@ -678,6 +678,9 @@ static int iwm_cfg80211_set_txpower(struct wiphy *wiphy, | |||
678 | case TX_POWER_AUTOMATIC: | 678 | case TX_POWER_AUTOMATIC: |
679 | return 0; | 679 | return 0; |
680 | case TX_POWER_FIXED: | 680 | case TX_POWER_FIXED: |
681 | if (!test_bit(IWM_STATUS_READY, &iwm->status)) | ||
682 | return 0; | ||
683 | |||
681 | ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX, | 684 | ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX, |
682 | CFG_TX_PWR_LIMIT_USR, dbm * 2); | 685 | CFG_TX_PWR_LIMIT_USR, dbm * 2); |
683 | if (ret < 0) | 686 | if (ret < 0) |
@@ -685,6 +688,7 @@ static int iwm_cfg80211_set_txpower(struct wiphy *wiphy, | |||
685 | 688 | ||
686 | return iwm_tx_power_trigger(iwm); | 689 | return iwm_tx_power_trigger(iwm); |
687 | default: | 690 | default: |
691 | IWM_ERR(iwm, "Unsupported power type: %d\n", type); | ||
688 | return -EOPNOTSUPP; | 692 | return -EOPNOTSUPP; |
689 | } | 693 | } |
690 | 694 | ||
@@ -721,6 +725,33 @@ static int iwm_cfg80211_set_power_mgmt(struct wiphy *wiphy, | |||
721 | CFG_POWER_INDEX, iwm->conf.power_index); | 725 | CFG_POWER_INDEX, iwm->conf.power_index); |
722 | } | 726 | } |
723 | 727 | ||
728 | int iwm_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, | ||
729 | struct cfg80211_pmksa *pmksa) | ||
730 | { | ||
731 | struct iwm_priv *iwm = wiphy_to_iwm(wiphy); | ||
732 | |||
733 | return iwm_send_pmkid_update(iwm, pmksa, IWM_CMD_PMKID_ADD); | ||
734 | } | ||
735 | |||
736 | int iwm_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, | ||
737 | struct cfg80211_pmksa *pmksa) | ||
738 | { | ||
739 | struct iwm_priv *iwm = wiphy_to_iwm(wiphy); | ||
740 | |||
741 | return iwm_send_pmkid_update(iwm, pmksa, IWM_CMD_PMKID_DEL); | ||
742 | } | ||
743 | |||
744 | int iwm_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) | ||
745 | { | ||
746 | struct iwm_priv *iwm = wiphy_to_iwm(wiphy); | ||
747 | struct cfg80211_pmksa pmksa; | ||
748 | |||
749 | memset(&pmksa, 0, sizeof(struct cfg80211_pmksa)); | ||
750 | |||
751 | return iwm_send_pmkid_update(iwm, &pmksa, IWM_CMD_PMKID_FLUSH); | ||
752 | } | ||
753 | |||
754 | |||
724 | static struct cfg80211_ops iwm_cfg80211_ops = { | 755 | static struct cfg80211_ops iwm_cfg80211_ops = { |
725 | .change_virtual_intf = iwm_cfg80211_change_iface, | 756 | .change_virtual_intf = iwm_cfg80211_change_iface, |
726 | .add_key = iwm_cfg80211_add_key, | 757 | .add_key = iwm_cfg80211_add_key, |
@@ -737,6 +768,9 @@ static struct cfg80211_ops iwm_cfg80211_ops = { | |||
737 | .set_tx_power = iwm_cfg80211_set_txpower, | 768 | .set_tx_power = iwm_cfg80211_set_txpower, |
738 | .get_tx_power = iwm_cfg80211_get_txpower, | 769 | .get_tx_power = iwm_cfg80211_get_txpower, |
739 | .set_power_mgmt = iwm_cfg80211_set_power_mgmt, | 770 | .set_power_mgmt = iwm_cfg80211_set_power_mgmt, |
771 | .set_pmksa = iwm_cfg80211_set_pmksa, | ||
772 | .del_pmksa = iwm_cfg80211_del_pmksa, | ||
773 | .flush_pmksa = iwm_cfg80211_flush_pmksa, | ||
740 | }; | 774 | }; |
741 | 775 | ||
742 | static const u32 cipher_suites[] = { | 776 | static const u32 cipher_suites[] = { |
@@ -782,6 +816,7 @@ struct wireless_dev *iwm_wdev_alloc(int sizeof_bus, struct device *dev) | |||
782 | 816 | ||
783 | set_wiphy_dev(wdev->wiphy, dev); | 817 | set_wiphy_dev(wdev->wiphy, dev); |
784 | wdev->wiphy->max_scan_ssids = UMAC_WIFI_IF_PROBE_OPTION_MAX; | 818 | wdev->wiphy->max_scan_ssids = UMAC_WIFI_IF_PROBE_OPTION_MAX; |
819 | wdev->wiphy->max_num_pmkids = UMAC_MAX_NUM_PMKIDS; | ||
785 | wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 820 | wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
786 | BIT(NL80211_IFTYPE_ADHOC); | 821 | BIT(NL80211_IFTYPE_ADHOC); |
787 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &iwm_band_2ghz; | 822 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &iwm_band_2ghz; |