On Friday 14 May 2010 07:32:58 n n wrote:
> Hi, all
>    I'm a student at NYU and I'm very interested in ath5k driver code.
> 
> What I'm trying to do now is to make the ath5k broadcast my own "hello
> packet" every 3 sec.
> 
> I've successfully put a timer in the ath5k_attach() function, and it works
> good.
> Next, I put ieee80211_subif_start_xmit(skb, dev) in the timer.
> Here comes the problem. The ieee80211_subif_start_xmit(skb, dev) wants the
> struct net_device *dev, but in ath5k_attach we only have struct
> ieee80211_hw *hw.
> I dont konw where to get the struct net_device *dev.
> 
> Is anyone can help me?
> Plz~~~~~

you are mixing layers here. ieee80211_subif_start_xmit() is a function of 
mac80211 and you are in the ath5k driver code, so you can either just use 

static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb,
                          struct ath5k_txq *txq)

directly, and give it a complete WLAN packet, including 802.11 headers and all 
- or you but your timer somewhere else where you can access the net_device.

bruno
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to