mirror of https://github.com/PCSX2/pcsx2.git
DEV9: Add adapter reset function
This commit is contained in:
parent
284ec35699
commit
b23873e0ed
|
@ -67,6 +67,12 @@ void tx_put(NetPacket* pkt)
|
|||
//pkt must be copied if its not processed by here, since it can be allocated on the callers stack
|
||||
}
|
||||
|
||||
void ad_reset()
|
||||
{
|
||||
if (nif != nullptr)
|
||||
nif->reset();
|
||||
}
|
||||
|
||||
NetAdapter* GetNetAdapter()
|
||||
{
|
||||
NetAdapter* na = nullptr;
|
||||
|
|
|
@ -117,6 +117,7 @@ public:
|
|||
virtual bool isInitialised() = 0;
|
||||
virtual bool recv(NetPacket* pkt); //gets a packet
|
||||
virtual bool send(NetPacket* pkt); //sends the packet and deletes it when done
|
||||
virtual void reset(){};
|
||||
virtual void reloadSettings() = 0;
|
||||
virtual void close(){};
|
||||
virtual ~NetAdapter();
|
||||
|
@ -145,6 +146,8 @@ private:
|
|||
};
|
||||
|
||||
void tx_put(NetPacket* ptr);
|
||||
void ad_reset();
|
||||
|
||||
void InitNet();
|
||||
void ReconfigureLiveNet(const Pcsx2Config& old_config);
|
||||
void TermNet();
|
||||
|
|
|
@ -267,6 +267,7 @@ void emac3_write(u32 addr)
|
|||
if (value == 0x380f0000)
|
||||
{
|
||||
Console.WriteLn("DEV9: Adapter Detection Hack - Resetting RX/TX");
|
||||
ad_reset();
|
||||
_DEV9irq(SMAP_INTR_RXEND | SMAP_INTR_TXEND | SMAP_INTR_TXDNV, 5);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue