diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-20 09:14:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:02:32 -0400 |
commit | 3ef5a262ad0061d6147da7e3ee03aead7c160d91 (patch) | |
tree | 73c907612c251150cb4d08901ab4ba6c06ff0e77 | |
parent | 54fb0579b9a35101b01d7b277a933e6af200ae88 (diff) |
Staging: rtl8192e: fix for stack bug
This should be a fix for the lockup bug when attaching to an access
point.
Patch came from a diff from RealTek. Hopefully it resolves the issue.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c | 16 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192_pm.c | 9 |
3 files changed, 11 insertions, 16 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c index 7fcda9ba7964..7c21aaab9063 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c | |||
@@ -530,22 +530,12 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee, | |||
530 | union iwreq_data *wrqu, char *extra) | 530 | union iwreq_data *wrqu, char *extra) |
531 | { | 531 | { |
532 | strcpy(wrqu->name, "802.11"); | 532 | strcpy(wrqu->name, "802.11"); |
533 | if(ieee->modulation & IEEE80211_CCK_MODULATION){ | 533 | if(ieee->modulation & IEEE80211_CCK_MODULATION) |
534 | strcat(wrqu->name, "b"); | 534 | strcat(wrqu->name, "b"); |
535 | if(ieee->modulation & IEEE80211_OFDM_MODULATION) | 535 | if(ieee->modulation & IEEE80211_OFDM_MODULATION) |
536 | strcat(wrqu->name, "/g"); | ||
537 | }else if(ieee->modulation & IEEE80211_OFDM_MODULATION) | ||
538 | strcat(wrqu->name, "g"); | 536 | strcat(wrqu->name, "g"); |
539 | if (ieee->mode & (IEEE_N_24G | IEEE_N_5G)) | 537 | if (ieee->mode & (IEEE_N_24G | IEEE_N_5G)) |
540 | strcat(wrqu->name, "/n"); | 538 | strcat(wrqu->name, "n"); |
541 | |||
542 | if((ieee->state == IEEE80211_LINKED) || | ||
543 | (ieee->state == IEEE80211_LINKED_SCANNING)) | ||
544 | strcat(wrqu->name," linked"); | ||
545 | else if(ieee->state != IEEE80211_NOLINK) | ||
546 | strcat(wrqu->name," link.."); | ||
547 | |||
548 | |||
549 | return 0; | 539 | return 0; |
550 | } | 540 | } |
551 | 541 | ||
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c index 7162f61edfaf..223483126b0e 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | |||
@@ -843,7 +843,7 @@ int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, | |||
843 | } else | 843 | } else |
844 | idx = ieee->tx_keyidx; | 844 | idx = ieee->tx_keyidx; |
845 | 845 | ||
846 | if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY && | 846 | if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) && |
847 | ext->alg != IW_ENCODE_ALG_WEP) | 847 | ext->alg != IW_ENCODE_ALG_WEP) |
848 | if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA) | 848 | if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA) |
849 | return -EINVAL; | 849 | return -EINVAL; |
diff --git a/drivers/staging/rtl8192e/r8192_pm.c b/drivers/staging/rtl8192e/r8192_pm.c index f898a19fe3fd..feef29b0a893 100644 --- a/drivers/staging/rtl8192e/r8192_pm.c +++ b/drivers/staging/rtl8192e/r8192_pm.c | |||
@@ -34,7 +34,9 @@ int rtl8192E_suspend (struct pci_dev *pdev, pm_message_t state) | |||
34 | if (!netif_running(dev)) | 34 | if (!netif_running(dev)) |
35 | goto out_pci_suspend; | 35 | goto out_pci_suspend; |
36 | 36 | ||
37 | dev->stop(dev); | 37 | if (dev->netdev_ops->ndo_stop) |
38 | dev->netdev_ops->ndo_stop(dev); | ||
39 | // dev->stop(dev); | ||
38 | #if 0 | 40 | #if 0 |
39 | 41 | ||
40 | netif_carrier_off(dev); | 42 | netif_carrier_off(dev); |
@@ -150,7 +152,10 @@ int rtl8192E_resume (struct pci_dev *pdev) | |||
150 | 152 | ||
151 | netif_device_attach(dev); | 153 | netif_device_attach(dev); |
152 | 154 | ||
153 | dev->open(dev); | 155 | if (dev->netdev_ops->ndo_open) |
156 | dev->netdev_ops->ndo_open(dev); | ||
157 | |||
158 | // dev->open(dev); | ||
154 | out: | 159 | out: |
155 | RT_TRACE(COMP_POWER, "<================r8192E resume call.\n"); | 160 | RT_TRACE(COMP_POWER, "<================r8192E resume call.\n"); |
156 | return 0; | 161 | return 0; |