Added gback's patch to fix the wext registration for non-pcmcia platforms.

This commit is contained in:
mark 2002-01-21 21:15:37 +00:00
parent 7e0709aad4
commit 9b6e5b4567
3 changed files with 41 additions and 10 deletions

View File

@ -90,5 +90,6 @@ config:
@./Configure
tags:
ctags -R
ctags `find . -name '*.[ch]' -o -name '*.mk' -o -name '[Mm]akefile'`
# ctags -R

View File

@ -85,7 +85,8 @@ iw_stats* p80211wext_get_wireless_stats (struct net_device *dev)
/* forward the request to a hardware- dependent function.
* FIX: should it be possible to do abstract MIB- requests (ie. for
* getting the link quality) on the p80211- level?!
* getting the link quality) on the p80211- level?!
* ANSWER: [MSM] Yes, it should. It just isn't done yet.
*/
wstats = (*(wlandev->get_wireless_stats))(dev);
@ -120,7 +121,10 @@ int p80211wext_support_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
int err = 0;
DBFENTER;
/*
* MSM: These should be doable up here too....
*/
err = (*(wlandev->support_ioctl))(dev, iwr, cmd);
DBFEXIT;

View File

@ -2279,6 +2279,32 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev)
return;
}
/*----------------------------------------------------------------
* register_wext_functions
*
* Add wireless extension functions to wlandevice_t* if supported
*
* Arguments:
* wlandev wlan device structure
*
* Returns:
* nothing
*
* Side effects:
*
* Call context:
* process
----------------------------------------------------------------*/
static void register_wext_functions(wlandevice_t *wlandev)
{
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
wlandev->get_wireless_stats = &prism2wext_get_wireless_stats;
wlandev->support_ioctl = &prism2wext_support_ioctl;
#endif
#endif
}
#if (WLAN_HOSTIF == WLAN_PCMCIA)
/*----------------------------------------------------------------
* prism2sta_attach
@ -2360,12 +2386,7 @@ dev_link_t *prism2sta_attach(void)
wlandev->txframe = &prism2sta_txframe;
wlandev->mlmerequest = &prism2sta_mlmerequest;
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
wlandev->get_wireless_stats = &prism2wext_get_wireless_stats;
wlandev->support_ioctl = &prism2wext_support_ioctl;
#endif
#endif
register_wext_functions(wlandev);
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->node.dev_name;
@ -3025,7 +3046,8 @@ static int prism2sta_probe_pci(struct pci_dev *pdev,
wlandev->txframe = &prism2sta_txframe;
wlandev->mlmerequest = &prism2sta_mlmerequest;
/* Set up the remaining entries in the wlan common way */
register_wext_functions(wlandev);
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->name;
if ( wlan_setup(wlandev) != 0 ) {
kfree_s(priv->hw, sizeof(hfa384x_t));
@ -3241,6 +3263,8 @@ static int prism2sta_probe_plx(struct pci_dev *pdev,
wlandev->txframe = &prism2sta_txframe;
wlandev->mlmerequest = &prism2sta_mlmerequest;
register_wext_functions(wlandev);
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->name;
wlandev->name[0] = '\0';
@ -3398,6 +3422,8 @@ static void *prism2sta_probe_usb(
wlandev->txframe = &prism2sta_txframe;
wlandev->mlmerequest = &prism2sta_mlmerequest;
register_wext_functions(wlandev);
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->name;
result = wlan_setup(wlandev);