aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/nl80211.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7ca4b5133123..8887c6e5fca8 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2854,6 +2854,9 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
2854 if (!rdev->ops->get_key) 2854 if (!rdev->ops->get_key)
2855 return -EOPNOTSUPP; 2855 return -EOPNOTSUPP;
2856 2856
2857 if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
2858 return -ENOENT;
2859
2857 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); 2860 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
2858 if (!msg) 2861 if (!msg)
2859 return -ENOMEM; 2862 return -ENOMEM;
@@ -2873,10 +2876,6 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
2873 nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr)) 2876 nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr))
2874 goto nla_put_failure; 2877 goto nla_put_failure;
2875 2878
2876 if (pairwise && mac_addr &&
2877 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
2878 return -ENOENT;
2879
2880 err = rdev_get_key(rdev, dev, key_idx, pairwise, mac_addr, &cookie, 2879 err = rdev_get_key(rdev, dev, key_idx, pairwise, mac_addr, &cookie,
2881 get_key_callback); 2880 get_key_callback);
2882 2881
@@ -3047,7 +3046,7 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)
3047 wdev_lock(dev->ieee80211_ptr); 3046 wdev_lock(dev->ieee80211_ptr);
3048 err = nl80211_key_allowed(dev->ieee80211_ptr); 3047 err = nl80211_key_allowed(dev->ieee80211_ptr);
3049 3048
3050 if (key.type == NL80211_KEYTYPE_PAIRWISE && mac_addr && 3049 if (key.type == NL80211_KEYTYPE_GROUP && mac_addr &&
3051 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) 3050 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
3052 err = -ENOENT; 3051 err = -ENOENT;
3053 3052
e/arch/arm/boot/dts/imx28.dtsi?id=640bf0607c110b0be4da04b9d480bf0aad9de772#n95'>95 ssp1: ssp@80012000 { 95 ssp1: ssp@80012000 { 96 reg = <0x80012000 2000>; 96 reg = <0x80012000 0x2000>; 97 interrupts = <97 83>; 97 interrupts = <97 83>; 98 fsl,ssp-dma-channel = <1>; 98 fsl,ssp-dma-channel = <1>; 99 status = "disabled"; 99 status = "disabled"; 100 }; 100 }; 101 101 102 ssp2: ssp@80014000 { 102 ssp2: ssp@80014000 { 103 reg = <0x80014000 2000>; 103 reg = <0x80014000 0x2000>; 104 interrupts = <98 84>; 104 interrupts = <98 84>; 105 fsl,ssp-dma-channel = <2>; 105 fsl,ssp-dma-channel = <2>; 106 status = "disabled"; 106 status = "disabled"; 107 }; 107 }; 108 108 109 ssp3: ssp@80016000 { 109 ssp3: ssp@80016000 { 110 reg = <0x80016000 2000>; 110 reg = <0x80016000 0x2000>; 111 interrupts = <99 85>; 111 interrupts = <99 85>; 112 fsl,ssp-dma-channel = <3>; 112 fsl,ssp-dma-channel = <3>; 113 status = "disabled"; 113 status = "disabled";@@ -117,7 +117,7 @@ 117 #address-cells = <1>; 117 #address-cells = <1>; 118 #size-cells = <0>; 118 #size-cells = <0>; 119 compatible = "fsl,imx28-pinctrl", "simple-bus"; 119 compatible = "fsl,imx28-pinctrl", "simple-bus"; 120 reg = <0x80018000 2000>; 120 reg = <0x80018000 0x2000>; 121 121 122 gpio0: gpio@0 { 122 gpio0: gpio@0 { 123 compatible = "fsl,imx28-gpio", "fsl,mxs-gpio"; 123 compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";@@ -510,96 +510,96 @@ 510 }; 510 }; 511 511 512 digctl@8001c000 { 512 digctl@8001c000 { 513 reg = <0x8001c000 2000>; 513 reg = <0x8001c000 0x2000>; 514 interrupts = <89>; 514 interrupts = <89>; 515 status = "disabled"; 515 status = "disabled"; 516 }; 516 }; 517 517 518 etm@80022000 { 518 etm@80022000 { 519 reg = <0x80022000 2000>; 519 reg = <0x80022000 0x2000>; 520 status = "disabled"; 520 status = "disabled"; 521 }; 521 }; 522 522 523 dma-apbx@80024000 { 523 dma-apbx@80024000 { 524 compatible = "fsl,imx28-dma-apbx"; 524 compatible = "fsl,imx28-dma-apbx"; 525 reg = <0x80024000 2000>; 525 reg = <0x80024000 0x2000>; 526 }; 526 }; 527 527 528 dcp@80028000 { 528 dcp@80028000 { 529 reg = <0x80028000 2000>; 529 reg = <0x80028000 0x2000>; 530 interrupts = <52 53 54>; 530 interrupts = <52 53 54>; 531 status = "disabled"; 531 status = "disabled"; 532 }; 532 }; 533 533 534 pxp@8002a000 { 534 pxp@8002a000 { 535 reg = <0x8002a000 2000>; 535 reg = <0x8002a000 0x2000>; 536 interrupts = <39>; 536 interrupts = <39>; 537 status = "disabled"; 537 status = "disabled"; 538 }; 538 }; 539 539 540 ocotp@8002c000 { 540 ocotp@8002c000 { 541 reg = <0x8002c000 2000>; 541 reg = <0x8002c000 0x2000>; 542 status = "disabled"; 542 status = "disabled"; 543 }; 543 }; 544 544 545 axi-ahb@8002e000 { 545 axi-ahb@8002e000 { 546 reg = <0x8002e000 2000>; 546 reg = <0x8002e000 0x2000>; 547 status = "disabled"; 547 status = "disabled"; 548 }; 548 }; 549 549 550 lcdif@80030000 { 550 lcdif@80030000 { 551 compatible = "fsl,imx28-lcdif"; 551 compatible = "fsl,imx28-lcdif"; 552 reg = <0x80030000 2000>; 552 reg = <0x80030000 0x2000>; 553 interrupts = <38 86>; 553 interrupts = <38 86>; 554 status = "disabled"; 554 status = "disabled"; 555 }; 555 }; 556 556 557 can0: can@80032000 { 557 can0: can@80032000 { 558 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 558 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 559 reg = <0x80032000 2000>; 559 reg = <0x80032000 0x2000>; 560 interrupts = <8>; 560 interrupts = <8>; 561 status = "disabled"; 561 status = "disabled"; 562 }; 562 }; 563 563 564 can1: can@80034000 { 564 can1: can@80034000 { 565 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 565 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 566 reg = <0x80034000 2000>; 566 reg = <0x80034000 0x2000>; 567 interrupts = <9>; 567 interrupts = <9>; 568 status = "disabled"; 568 status = "disabled"; 569 }; 569 }; 570 570 571 simdbg@8003c000 { 571 simdbg@8003c000 { 572 reg = <0x8003c000 200>; 572 reg = <0x8003c000 0x200>; 573 status = "disabled"; 573 status = "disabled"; 574 }; 574 }; 575 575 576 simgpmisel@8003c200 { 576 simgpmisel@8003c200 { 577 reg = <0x8003c200 100>; 577 reg = <0x8003c200 0x100>;