development.7: Refer to new port name for git-arc
The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.
Reviewed by: ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55128
git-arc.1: Refer to new port name
The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.
Reviewed by: ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55127
LinuxKPI: 802.11: catch possible NULL pointer deref with mt76
With mt76 we, for the first time, see that txstat->skb or
txstat->info may not be filled in linuxkpi_ieee80211_tx_status_ext().
Guard for these cases checking for skb and info to be not NULL and
assume a TX failure in case info is NULL.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: set extra tx info flag for EAPOL for mt76
mt76 requires IEEE80211_TX_CTL_USE_MINRATE to be set for EAPOL, so
add it.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: fix a check wrongly giving us random ether addresses all the time
Do not cover the is_valid_ether_addr() check under CONFIG_OF.
Unclear if this is an initial porting or a merging error before the
driver hit the FreeBSD src tree.
The end result was that we always got a random link-layer address,
while the individual drivers may have setup phy->macaddr and this
function would only overwride if given in device tree.
Only if both, driver and and the OF backup, fail then go and use
the random link-layer address.
While here adjust printing the random link-layer address using
a FreeBSD format specifier and not the unsupported Linux one.
Fixes: 6c92544d7c97
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue()
If we are not scheduled before calling wake_tx_queue() packets may
never go out, which at first will look like EAPOL fails (as
wpa_supplicant suggest possibly with a wrong key). Using monitor
mode it will be clear what is going on.
Pass a flag down to wake_tx_queue() to call ieee80211_schedule_txq()
in case (*wake_tx_queue)() is supported or not, which solves the
problem for the lkpi_80211_txq_tx_one() which was failing.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: module Makefiles fix .PATH
The common Makefile.inc had the .PATH set for the common code.
That .PATH is only needed for the mt76_core module, which shares
code for all other drivers. We leave the COMMONDIR variable defined
in Makefile.inc as we need it for CFLAGS+= -I for each driver but
migrate the .PATH to avoid drivers picking up the wrong files.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: sort out MODULE_DEPEND for PCI and USB
It is not enough to depend on mt76_core which then depends on linuxkpi
and linuxkpi_wlan. Given each mt76 driver is its own module, each
also needs to depend on these linuxkpi modules.
In addition the core module usb part also has to depend on linuxkpi_usb.
This in addition to the previously sorted PCI drivers, allows (or will
allow) the individual chipsets (drivers) to load on systems with USB,
if compiled in, as well.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: mt7925: add missing LINUXKPI_PARAM_PREFIX
There is a module_param_named() in the file so we need to set
LINUXKPI_PARAM_PREFIX to get it a uniq sysctl name. mt7921
has the exact same option. Without their individual prefixes
the names would clash on systems with both chipsets and not
work for both.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: make USB compile
This is the mt76-specific changes to make the USB driver targets for
7921 and 7925 compile.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mt76: sort bus attachments in module Makefiles for pci and usb
With PCI enabled and USB still disabled add knobs to (i) enabled
them manually in the common Makefile.inc and (ii) add bus
attachment depend knobs where needed to enable them in individual
drivers. For now the focus is in 7921 and 7925.
Sponsored by: The FreeBSD Foundation
MFC atfer: 3 days
release: Turn off debugging in pkg(8)
Running `pkg -d` in pkg-stage.sh results in multiple GB of network
traffic being written into the log files, which is less than helpful
when it comes to tracking down build failures. Remove the -d flag.
MFC after: 5 days
X-MFC-note: The code in 15 has diverged from 14, but the flag is
there, just in a different place.
Revert "release: Ship firmware from kmods repo on DVD"
While all of the net/wifi-firmware-*-kmod packages are in the "kmod" pkg
repository, the net/wifi-firmware-kmod metapackage itself is not; this
results in the DVD build failing when it can't fetch that.
I'm not sure if the correct fix here is to add kmod-related metapackages
to the kmod repository (even if they themselves do not contain kmods) or
something else; but this needs to be backed out at least temporarily so
that 14.4-BETA1 can happen.
This reverts commit 8c1de31097763ce1d918a3f82c61fd8d30edbe75.
This is a direct commit to releng/14.4 since it is not yet clear whether
this should be permanently removed from other branches and there is no
urgency to do so (since DVD builds are disabled by default).
With hat: re
Approved by: re (cperciva)
sys/sysctl.h: Add missing <sys/kassert.h> include
Hopefully, 'sys/sysctl.h' is really self-contained now.
This fixes the GENERIC-NODEBUG compilation error in 'hwpstate_common.c'
after commit 804329587508 (see below).
Fixes: 1a446f765d9c ("sys/sysctl.h: Make it self-contained when included from the kernel")
Fixes: 804329587508 ("hwpstate{_amd,intel}(4): Move common knobs to a separate file")
Sponsored by: The FreeBSD Foundation
sockets: repair sctp_peeloff(2)
The shim function soattach() may be passed a non-listening socket by SCTP.
NB: the change makes soattach() more hairy, but long term plan is that
this function goes away.
PR: 293010
Fixes: 64f7e3c9c178ab35cb1f8fdf791aec74ede6f6b2
qlnxe: Overhaul setting the multicast MAC filters
When operating the multicast MAC filters, the current usage of
ECORE_FILTER_ADD and ECORE_FILTER_REMOVE are rather misleading.
ECORE_FILTER_ADD reads "adding new filter", but it actually removes
any existing filters and then addes a new one. ECORE_FILTER_REMOVE
reads "removing a filter", but it actually removes all filters.
Let's use ECORE_FILTER_REPLACE and ECORE_FILTER_FLUSH instead to
avoid confusion.
In the current implementation, only one MAC address is passed to
ecore_sp_eth_filter_mcast() and any previously installed filters are
removed, hence it breaks the multicast function. That can be observed
via either assigning new IPv6 addresses to the interface or putting
the interface as a member of lagg(4) interface with LACP aggregation
protocol. Fix that by calculating the multicast filter bins directly
from multicast MAC addresses and replace the filters every time
the bins changes.
[18 lines not shown]
qlnxe: Allow tapping the TX packets
Currently only the packets in the RX path can be captured by tcpdump
as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that
packets in both directions can be captured.
PR: 290973
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54891
qlnxe: Refactor setting the promiscuous and allmulti mode
There are two entry points to set the promiscuous and allmulti mode.
One is ioctl, and another is the init routine. Given they share almost
the identical logic, refactor a little to make the code more clear.
While here, for the ioctl, translate the error to EINVAL to avoid
confusing the net stack.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54890
qlnxev: Remove now unneeded include for opt_inet.h
Since the change [1], this is not required anymore.
This change partially reverts commit 8a847947153e.
[1] 4012b63889e4 qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54889
qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl
Since the change [1], the init routine qlnx_init() works as intended.
Let ether_ioctl() handle SIOCSIFADDR to simplify the code.
Combined with the change [1], this shall be a better fix for PR 287445.
[1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized
PR: 287445
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54888
qlnxe: Avoid reinitializing the interface when it is already initialized
qlnx_init_locked() unconditionally uninitialize the interface thus is
actually reinitializing the interface. Well the init routine qlnx_init()
is to initialize the interface by net stack when assigned with the first
inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
is handled by ether_ioctl() thus the interface is reinitialized no matter
it was initialized or not.
Add a driver status check for that to avoid reinitializing. Further plan
is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
it.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54887
qlnxe: Prevent potential concurrency between ioctls
The driver-managed status flags should be lock protected to be touched.
Also this can serialize ioctls those check the IFF_DRV_RUNNING status.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54886
qlnxe: Fix setting the unicast MAC filter of RX path
When an Ethernet interface is added to lagg(4) as a child interface, its
type, aka if_type, is changed from IFT_ETHER to IFT_IEEE8023ADLAG. Well
changing the link-layer address of the lagg(4) interface will be
propagated to all child interfaces, hence the drivers of child interfaces
shall not presume the type of the interface will not be changed.
Meanwhile, on initializing, an ifnet has been fully attached and it is
guaranteed to have non-null link-layer address so stop NULL checking for
it.
Reviewed by: kbowling
Fixes: 792226e53023 qlnxe: Allow MAC address override
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54885
qlnxe: Avoid memcpy with same source and destination
In case the device is VF, qlnx_get_mac_addr() returns ha->primary_mac
hence it ends up memcpy with same source and destination. Refactor
slightly to avoid that.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54884
qlnxe: Remove a pointless copy back from the link-layer address
On ifnet attaching, ether_ifattach() makes the link-layer address by
shadow copying the ha->primary_mac. Well, the link-layer address will
not be altered during attaching, thus it is pointless to copy it back.
No functional change intended.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54883
hwpstate_amd(4): Rename EPP handler, convert to unsigned int
'val' is supposed to be the storage for a sysctl knob of an 'unsigned
int', so consistently don't specify its width.
While here, rename variables in the handler. The new names feel
clearer, and the 'ret' => 'error' rename is to be more in line with our
tradition.
No functional change intended.
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55002
hwpstate_amd(4): Revamp the softc
As the new CPPC and old P-states modes are exclusive, put their
respective data in a union.
Rename the field containing the content of the CPPC_REQUEST register.
It it now to be accessed using 'cppc.request'.
Use an 'unsigned int' instead of 'uint32_t' for 'flags'. This is an
internal field whose width could be changed at will. We only have one
flag at the moment.
No functional change intended.
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55004