aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-18 15:13:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-18 15:13:27 -0400
commit8cfe523a1294da65ef95b6ed7b0f7db5629f8d88 (patch)
treed6118f2e2a55f5906a0c9b42bf6d33c5551cd583
parent31fdc5553b42abd7e29bb7b89f6ba07514eb4763 (diff)
parentbcb7ad7bcbef030e6ba71ede1f9866368aca7c99 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c27
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c11
-rw-r--r--drivers/net/wireless/rndis_wlan.c2
-rw-r--r--include/net/bluetooth/hci.h6
-rw-r--r--include/net/mac80211.h6
-rw-r--r--net/bluetooth/hci_event.c48
-rw-r--r--net/bluetooth/l2cap_core.c7
-rw-r--r--net/bluetooth/mgmt.c18
-rw-r--r--net/bluetooth/smp.c11
-rw-r--r--net/mac80211/cfg.c3
-rw-r--r--net/mac80211/mlme.c4
-rw-r--r--net/mac80211/sta_info.h5
-rw-r--r--net/wireless/reg.c2
-rw-r--r--net/wireless/util.c2
14 files changed, 124 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4de4473776ac..dac1a2709e3c 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -971,6 +971,15 @@ void ath_hw_pll_work(struct work_struct *work)
971 hw_pll_work.work); 971 hw_pll_work.work);
972 u32 pll_sqsum; 972 u32 pll_sqsum;
973 973
974 /*
975 * ensure that the PLL WAR is executed only
976 * after the STA is associated (or) if the
977 * beaconing had started in interfaces that
978 * uses beacons.
979 */
980 if (!(sc->sc_flags & SC_OP_BEACONS))
981 return;
982
974 if (AR_SREV_9485(sc->sc_ah)) { 983 if (AR_SREV_9485(sc->sc_ah)) {
975 984
976 ath9k_ps_wakeup(sc); 985 ath9k_ps_wakeup(sc);
@@ -1443,15 +1452,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1443 } 1452 }
1444 } 1453 }
1445 1454
1446 if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
1447 ((vif->type == NL80211_IFTYPE_ADHOC) &&
1448 sc->nvifs > 0)) {
1449 ath_err(common, "Cannot create ADHOC interface when other"
1450 " interfaces already exist.\n");
1451 ret = -EINVAL;
1452 goto out;
1453 }
1454
1455 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); 1455 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
1456 1456
1457 sc->nvifs++; 1457 sc->nvifs++;
@@ -1476,15 +1476,6 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1476 mutex_lock(&sc->mutex); 1476 mutex_lock(&sc->mutex);
1477 ath9k_ps_wakeup(sc); 1477 ath9k_ps_wakeup(sc);
1478 1478
1479 /* See if new interface type is valid. */
1480 if ((new_type == NL80211_IFTYPE_ADHOC) &&
1481 (sc->nvifs > 1)) {
1482 ath_err(common, "When using ADHOC, it must be the only"
1483 " interface.\n");
1484 ret = -EINVAL;
1485 goto out;
1486 }
1487
1488 if (ath9k_uses_beacons(new_type) && 1479 if (ath9k_uses_beacons(new_type) &&
1489 !ath9k_uses_beacons(vif->type)) { 1480 !ath9k_uses_beacons(vif->type)) {
1490 if (sc->nbcnvifs >= ATH_BCBUF) { 1481 if (sc->nbcnvifs >= ATH_BCBUF) {
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index 8173ab66066d..89f9a2a45de3 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -27,6 +27,17 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv,
27 struct cfg80211_ap_settings *params) { 27 struct cfg80211_ap_settings *params) {
28 int i; 28 int i;
29 29
30 if (!params->privacy) {
31 bss_config->protocol = PROTOCOL_NO_SECURITY;
32 bss_config->key_mgmt = KEY_MGMT_NONE;
33 bss_config->wpa_cfg.length = 0;
34 priv->sec_info.wep_enabled = 0;
35 priv->sec_info.wpa_enabled = 0;
36 priv->sec_info.wpa2_enabled = 0;
37
38 return 0;
39 }
40
30 switch (params->auth_type) { 41 switch (params->auth_type) {
31 case NL80211_AUTHTYPE_OPEN_SYSTEM: 42 case NL80211_AUTHTYPE_OPEN_SYSTEM:
32 bss_config->auth_mode = WLAN_AUTH_OPEN; 43 bss_config->auth_mode = WLAN_AUTH_OPEN;
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 2e9e6af21362..dfcd02ab6cae 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2110,7 +2110,7 @@ resize_buf:
2110 while (check_bssid_list_item(bssid, bssid_len, buf, len)) { 2110 while (check_bssid_list_item(bssid, bssid_len, buf, len)) {
2111 if (rndis_bss_info_update(usbdev, bssid) && match_bssid && 2111 if (rndis_bss_info_update(usbdev, bssid) && match_bssid &&
2112 matched) { 2112 matched) {
2113 if (!ether_addr_equal(bssid->mac, match_bssid)) 2113 if (ether_addr_equal(bssid->mac, match_bssid))
2114 *matched = true; 2114 *matched = true;
2115 } 2115 }
2116 2116
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 66a7b579e31c..3def64ba77fa 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1144,6 +1144,12 @@ struct extended_inquiry_info {
1144 __u8 data[240]; 1144 __u8 data[240];
1145} __packed; 1145} __packed;
1146 1146
1147#define HCI_EV_KEY_REFRESH_COMPLETE 0x30
1148struct hci_ev_key_refresh_complete {
1149 __u8 status;
1150 __le16 handle;
1151} __packed;
1152
1147#define HCI_EV_IO_CAPA_REQUEST 0x31 1153#define HCI_EV_IO_CAPA_REQUEST 0x31
1148struct hci_ev_io_capa_request { 1154struct hci_ev_io_capa_request {
1149 bdaddr_t bdaddr; 1155 bdaddr_t bdaddr;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1937c7d98304..95e39b6a02ec 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1940,6 +1940,11 @@ enum ieee80211_rate_control_changed {
1940 * to also unregister the device. If it returns 1, then mac80211 1940 * to also unregister the device. If it returns 1, then mac80211
1941 * will also go through the regular complete restart on resume. 1941 * will also go through the regular complete restart on resume.
1942 * 1942 *
1943 * @set_wakeup: Enable or disable wakeup when WoWLAN configuration is
1944 * modified. The reason is that device_set_wakeup_enable() is
1945 * supposed to be called when the configuration changes, not only
1946 * in suspend().
1947 *
1943 * @add_interface: Called when a netdevice attached to the hardware is 1948 * @add_interface: Called when a netdevice attached to the hardware is
1944 * enabled. Because it is not called for monitor mode devices, @start 1949 * enabled. Because it is not called for monitor mode devices, @start
1945 * and @stop must be implemented. 1950 * and @stop must be implemented.
@@ -2966,6 +2971,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
2966 * ieee80211_generic_frame_duration - Calculate the duration field for a frame 2971 * ieee80211_generic_frame_duration - Calculate the duration field for a frame
2967 * @hw: pointer obtained from ieee80211_alloc_hw(). 2972 * @hw: pointer obtained from ieee80211_alloc_hw().
2968 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 2973 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
2974 * @band: the band to calculate the frame duration on
2969 * @frame_len: the length of the frame. 2975 * @frame_len: the length of the frame.
2970 * @rate: the rate at which the frame is going to be transmitted. 2976 * @rate: the rate at which the frame is going to be transmitted.
2971 * 2977 *
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4eefb7f65cf6..94ad124a4ea3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3043,6 +3043,50 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
3043 hci_dev_unlock(hdev); 3043 hci_dev_unlock(hdev);
3044} 3044}
3045 3045
3046static void hci_key_refresh_complete_evt(struct hci_dev *hdev,
3047 struct sk_buff *skb)
3048{
3049 struct hci_ev_key_refresh_complete *ev = (void *) skb->data;
3050 struct hci_conn *conn;
3051
3052 BT_DBG("%s status %u handle %u", hdev->name, ev->status,
3053 __le16_to_cpu(ev->handle));
3054
3055 hci_dev_lock(hdev);
3056
3057 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
3058 if (!conn)
3059 goto unlock;
3060
3061 if (!ev->status)
3062 conn->sec_level = conn->pending_sec_level;
3063
3064 clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
3065
3066 if (ev->status && conn->state == BT_CONNECTED) {
3067 hci_acl_disconn(conn, HCI_ERROR_AUTH_FAILURE);
3068 hci_conn_put(conn);
3069 goto unlock;
3070 }
3071
3072 if (conn->state == BT_CONFIG) {
3073 if (!ev->status)
3074 conn->state = BT_CONNECTED;
3075
3076 hci_proto_connect_cfm(conn, ev->status);
3077 hci_conn_put(conn);
3078 } else {
3079 hci_auth_cfm(conn, ev->status);
3080
3081 hci_conn_hold(conn);
3082 conn->disc_timeout = HCI_DISCONN_TIMEOUT;
3083 hci_conn_put(conn);
3084 }
3085
3086unlock:
3087 hci_dev_unlock(hdev);
3088}
3089
3046static inline u8 hci_get_auth_req(struct hci_conn *conn) 3090static inline u8 hci_get_auth_req(struct hci_conn *conn)
3047{ 3091{
3048 /* If remote requests dedicated bonding follow that lead */ 3092 /* If remote requests dedicated bonding follow that lead */
@@ -3559,6 +3603,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
3559 hci_extended_inquiry_result_evt(hdev, skb); 3603 hci_extended_inquiry_result_evt(hdev, skb);
3560 break; 3604 break;
3561 3605
3606 case HCI_EV_KEY_REFRESH_COMPLETE:
3607 hci_key_refresh_complete_evt(hdev, skb);
3608 break;
3609
3562 case HCI_EV_IO_CAPA_REQUEST: 3610 case HCI_EV_IO_CAPA_REQUEST:
3563 hci_io_capa_request_evt(hdev, skb); 3611 hci_io_capa_request_evt(hdev, skb);
3564 break; 3612 break;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 24f144b72a96..8394e3615ef6 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1295,7 +1295,12 @@ static void security_timeout(struct work_struct *work)
1295 struct l2cap_conn *conn = container_of(work, struct l2cap_conn, 1295 struct l2cap_conn *conn = container_of(work, struct l2cap_conn,
1296 security_timer.work); 1296 security_timer.work);
1297 1297
1298 l2cap_conn_del(conn->hcon, ETIMEDOUT); 1298 BT_DBG("conn %p", conn);
1299
1300 if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) {
1301 smp_chan_destroy(conn);
1302 l2cap_conn_del(conn->hcon, ETIMEDOUT);
1303 }
1299} 1304}
1300 1305
1301static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) 1306static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 25d220776079..991d5b667674 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1873,6 +1873,22 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status)
1873 pairing_complete(cmd, mgmt_status(status)); 1873 pairing_complete(cmd, mgmt_status(status));
1874} 1874}
1875 1875
1876static void le_connect_complete_cb(struct hci_conn *conn, u8 status)
1877{
1878 struct pending_cmd *cmd;
1879
1880 BT_DBG("status %u", status);
1881
1882 if (!status)
1883 return;
1884
1885 cmd = find_pairing(conn);
1886 if (!cmd)
1887 BT_DBG("Unable to find a pending command");
1888 else
1889 pairing_complete(cmd, mgmt_status(status));
1890}
1891
1876static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, 1892static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
1877 u16 len) 1893 u16 len)
1878{ 1894{
@@ -1934,6 +1950,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
1934 /* For LE, just connecting isn't a proof that the pairing finished */ 1950 /* For LE, just connecting isn't a proof that the pairing finished */
1935 if (cp->addr.type == BDADDR_BREDR) 1951 if (cp->addr.type == BDADDR_BREDR)
1936 conn->connect_cfm_cb = pairing_complete_cb; 1952 conn->connect_cfm_cb = pairing_complete_cb;
1953 else
1954 conn->connect_cfm_cb = le_connect_complete_cb;
1937 1955
1938 conn->security_cfm_cb = pairing_complete_cb; 1956 conn->security_cfm_cb = pairing_complete_cb;
1939 conn->disconn_cfm_cb = pairing_complete_cb; 1957 conn->disconn_cfm_cb = pairing_complete_cb;
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 6fc7c4708f3e..37df4e9b3896 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -648,7 +648,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
648 648
649 auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM; 649 auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM;
650 650
651 ret = tk_request(conn, 0, auth, rsp->io_capability, req->io_capability); 651 ret = tk_request(conn, 0, auth, req->io_capability, rsp->io_capability);
652 if (ret) 652 if (ret)
653 return SMP_UNSPECIFIED; 653 return SMP_UNSPECIFIED;
654 654
@@ -703,7 +703,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
703 return 0; 703 return 0;
704} 704}
705 705
706static u8 smp_ltk_encrypt(struct l2cap_conn *conn) 706static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
707{ 707{
708 struct smp_ltk *key; 708 struct smp_ltk *key;
709 struct hci_conn *hcon = conn->hcon; 709 struct hci_conn *hcon = conn->hcon;
@@ -712,6 +712,9 @@ static u8 smp_ltk_encrypt(struct l2cap_conn *conn)
712 if (!key) 712 if (!key)
713 return 0; 713 return 0;
714 714
715 if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated)
716 return 0;
717
715 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) 718 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags))
716 return 1; 719 return 1;
717 720
@@ -732,7 +735,7 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
732 735
733 hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req); 736 hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req);
734 737
735 if (smp_ltk_encrypt(conn)) 738 if (smp_ltk_encrypt(conn, hcon->pending_sec_level))
736 return 0; 739 return 0;
737 740
738 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) 741 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags))
@@ -771,7 +774,7 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
771 return 1; 774 return 1;
772 775
773 if (hcon->link_mode & HCI_LM_MASTER) 776 if (hcon->link_mode & HCI_LM_MASTER)
774 if (smp_ltk_encrypt(conn)) 777 if (smp_ltk_encrypt(conn, sec_level))
775 goto done; 778 goto done;
776 779
777 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) 780 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags))
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e9cecca5c44d..7d5108a867ad 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2093,6 +2093,9 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
2093 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 2093 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
2094 int i, ret; 2094 int i, ret;
2095 2095
2096 if (!ieee80211_sdata_running(sdata))
2097 return -ENETDOWN;
2098
2096 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) { 2099 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
2097 ret = drv_set_bitrate_mask(local, sdata, mask); 2100 ret = drv_set_bitrate_mask(local, sdata, mask);
2098 if (ret) 2101 if (ret)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 91d84cc77bbf..66e4fcdd1c6b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1352,6 +1352,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1352 if (WARN_ON(!ifmgd->associated)) 1352 if (WARN_ON(!ifmgd->associated))
1353 return; 1353 return;
1354 1354
1355 ieee80211_stop_poll(sdata);
1356
1355 memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); 1357 memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
1356 1358
1357 ifmgd->associated = NULL; 1359 ifmgd->associated = NULL;
@@ -2612,8 +2614,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
2612 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2614 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2613 u8 frame_buf[DEAUTH_DISASSOC_LEN]; 2615 u8 frame_buf[DEAUTH_DISASSOC_LEN];
2614 2616
2615 ieee80211_stop_poll(sdata);
2616
2617 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, 2617 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
2618 false, frame_buf); 2618 false, frame_buf);
2619 mutex_unlock(&ifmgd->mtx); 2619 mutex_unlock(&ifmgd->mtx);
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 3bb24a121c95..a470e1123a55 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -271,6 +271,9 @@ struct sta_ampdu_mlme {
271 * @plink_timer: peer link watch timer 271 * @plink_timer: peer link watch timer
272 * @plink_timer_was_running: used by suspend/resume to restore timers 272 * @plink_timer_was_running: used by suspend/resume to restore timers
273 * @t_offset: timing offset relative to this host 273 * @t_offset: timing offset relative to this host
274 * @t_offset_setpoint: reference timing offset of this sta to be used when
275 * calculating clockdrift
276 * @ch_type: peer's channel type
274 * @debugfs: debug filesystem info 277 * @debugfs: debug filesystem info
275 * @dead: set to true when sta is unlinked 278 * @dead: set to true when sta is unlinked
276 * @uploaded: set to true when sta is uploaded to the driver 279 * @uploaded: set to true when sta is uploaded to the driver
@@ -278,6 +281,8 @@ struct sta_ampdu_mlme {
278 * @sta: station information we share with the driver 281 * @sta: station information we share with the driver
279 * @sta_state: duplicates information about station state (for debug) 282 * @sta_state: duplicates information about station state (for debug)
280 * @beacon_loss_count: number of times beacon loss has triggered 283 * @beacon_loss_count: number of times beacon loss has triggered
284 * @supports_40mhz: tracks whether the station advertised 40 MHz support
285 * as we overwrite its HT parameters with the currently used value
281 */ 286 */
282struct sta_info { 287struct sta_info {
283 /* General information, mostly static */ 288 /* General information, mostly static */
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 15f347477a99..baf5704740ee 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1389,7 +1389,7 @@ static void reg_set_request_processed(void)
1389 spin_unlock(&reg_requests_lock); 1389 spin_unlock(&reg_requests_lock);
1390 1390
1391 if (last_request->initiator == NL80211_REGDOM_SET_BY_USER) 1391 if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
1392 cancel_delayed_work_sync(&reg_timeout); 1392 cancel_delayed_work(&reg_timeout);
1393 1393
1394 if (need_more_processing) 1394 if (need_more_processing)
1395 schedule_work(&reg_work); 1395 schedule_work(&reg_work);
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 8f2d68fc3a44..316cfd00914f 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -804,7 +804,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
804 ntype == NL80211_IFTYPE_P2P_CLIENT)) 804 ntype == NL80211_IFTYPE_P2P_CLIENT))
805 return -EBUSY; 805 return -EBUSY;
806 806
807 if (ntype != otype) { 807 if (ntype != otype && netif_running(dev)) {
808 err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr, 808 err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr,
809 ntype); 809 ntype);
810 if (err) 810 if (err)