1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

[ath] convert recent changes over to HAL format.

This is needed to compile the ath tools, that includes this code
to run in userland.

Tested:

* Carambola 2, AR9331, STA mode
This commit is contained in:
Adrian Chadd 2016-05-20 06:06:21 +00:00
parent de06886d2b
commit b1940deb18
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300267

View File

@ -424,7 +424,7 @@ addchan(struct ath_hal *ah, struct ieee80211_channel chans[],
struct ieee80211_channel *c;
if (*nchans >= maxchans)
return (ENOBUFS);
return (HAL_ENOMEM);
c = &chans[(*nchans)++];
c->ic_freq = freq;
@ -443,10 +443,11 @@ copychan_prev(struct ath_hal *ah, struct ieee80211_channel chans[],
{
struct ieee80211_channel *c;
KASSERT(*nchans > 0, ("channel list is empty\n"));
if (*nchans == 0)
return (HAL_EINVAL);
if (*nchans >= maxchans)
return (ENOBUFS);
return (HAL_ENOMEM);
c = &chans[(*nchans)++];
c[0] = c[-1];
@ -632,8 +633,8 @@ getchannels(struct ath_hal *ah,
else if (cm->flags & IEEE80211_CHAN_2GHZ)
rd = rd2GHz;
else {
KASSERT(0, ("%s: Unkonwn HAL flags 0x%x\n",
__func__, cm->flags));
ath_hal_printf(ah, "%s: Unkonwn HAL flags 0x%x\n",
__func__, cm->flags);
return HAL_EINVAL;
}