Added the frame drop logic for pre-associated tx frames.

This commit is contained in:
mark 2000-08-11 17:31:29 +00:00
parent d4131f7580
commit 36b94786a6
1 changed files with 16 additions and 0 deletions

View File

@ -384,6 +384,22 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
/* particularly handy in the above case */
netdev->trans_start = jiffies;
/* Check to see that a valid mode is set */
switch( wlandev->macmode ) {
case WLAN_MACMODE_IBSS_STA:
case WLAN_MACMODE_ESS_STA:
case WLAN_MACMODE_ESS_AP:
break;
default:
/* Mode isn't set yet, just drop the frame and return success */
/* TODO: we need a saner way to handle this */
netdev->tbusy = 0;
dev_kfree_skb(skb);
WLAN_LOG_NOTICE0("Tx attempt prior to association, frame dropped.\n");
return 0;
break;
}
/* OK, now we setup the ether to 802.11 conversion */
pb = p80211pb_alloc();
if ( pb == NULL ) {